Skip to content

e2e/streamed-drift-e2e.sh fails at step 1: unknown member answers 404, not 400 #1014

Closed

Description

@lex00

e2e/streamed-drift-e2e.sh fails at its first step on behold main 5676314: it expects 400 for an unknown member and gets 404, because behold demo choudoufu-estate serves estate/monolith, which declares no workspace. behold c833451 (before epic:engine-ship) fails the same way, so it is older than the epic. behold#998's maintainer run uses this script.

Found at epic:engine-ship's epic-ready (2026-10-26).

Activity

  1. lex00 commented on Oct 26, 2026

    @lex00
    ContributorAuthor

    Audit correction (2026-10-26):

    The scope is wider than the e2e's step 1. The cause is that behold demo choudoufu-estate serves estate/monolith (the estate dirs, demos.test.ts:173) rather than a workspace. That blocks both the palette row and the route:

    • The palette row "Stream drift card by card" exists only when projectInfo.workspace is set (web/app.js:12446-12449).
    • The route answers 404 no-workspace before the member check (src/drift-stream.ts:211), which is the 404 this issue sees.

    The round-2 unit makes the demo serve the workspace. See #998 for the items this unblocks.

  2. added
    epic:engine-ship
    on Oct 26, 2026
  3. lex00 commented on Oct 26, 2026

    @lex00
    ContributorAuthor

    Merged into integration/engine-ship as bf62b04 (unit branch unit/es2-behold-1014).

    What landed:

    • demos.json: the choudoufu-estate entry gains serve.workspace: true. src/demos.ts adds DemoServe.workspace (validated as a boolean) and loadDemo returns workspaceRoot for such an entry; src/cli.ts serves that root, so behold demo choudoufu-estate runs behold serve <copy> --env live and the server reads example-choudoufu-estate/chant.workspace.json as a declared workspace. That puts projectInfo.workspace on /api/project, so the palette row "Stream drift card by card: monolith" appears, and POST /api/workspace/drift/stream gets past the no-workspace 404 to its member check (unknown member: 400).
    • serve.dirs stays on the entry. It is what the panel's demo switch (POST /api/demos/open) still serves, because switchServedProject never serves a declared workspace. Making the switch serve workspaces is out of this unit's scope.
    • e2e/streamed-drift-e2e.sh: a new step 0 checks /api/project names the workspace with monolith among its members, and fails with what it got before step 1 can report a misleading 404. Its header says the demo is served from the workspace root.
    • src/demos.test.ts: tests for the workspaceRoot result, the boolean validation, and the shipped entry (workspace: true, chant.workspace.json present). Written, not run.
    • README.md and the demo description say the estate is served as the declared workspace.

    Checked: tsc --noEmit on behold is clean.

    Still missing, waits for epic-ready: running e2e/streamed-drift-e2e.sh (and e2e/choudoufu-estate-floci-e2e.sh, which now also goes through the workspace serve; its member ids and the split route's projectDir should be unchanged since the workspace's first drawn member is still monolith, but that is unverified) and the vitest run. #998's live run stays the maintainer's.

  4. lex00 commented on Oct 26, 2026

    @lex00
    ContributorAuthor

    Epic-ready fix for the streamed-drift e2e red (integration/engine-ship 47d5aa2, FAIL: a second start answered 202).

    Cause: the server's in-flight check was right (one run at a time, server-wide). The first run had already ended when the second POST arrived. The choudoufu-estate demo is an estate, and an estate stacks alike cards by default (#877), so /api/graph drew the monolith's 21 cards as five stacks titled aws_iam_policy ×3 and so on. The script sent those titles as addresses; resourceBlocks drops them, so the run emitted begin, failed ("no resource cards to ask about"), end within a few ms, and the second start found nothing in flight. The page's memberAddresses (web/drift-stream.js) had the same flaw, so the palette row "Stream drift card by card" asked about nothing in the default view.

    Fix, merge 9f8d257 on integration/engine-ship (unit commit d6ae7f3, branch unit/es2-behold-fix-drift):

    • web/drift-stream.js: memberAddresses sends the ids a stack card holds (_stackOf, which are <member>/<address>) in place of the stack's title.
    • web/drift-stream.test.js: new, covers plain cards and stacked ones.
    • e2e/streamed-drift-e2e.sh: reads /api/graph?alike=0 and opens the page at ?alike=0 for step 3 (it counts 21 individual cards), and fails early if it did not get 21 addresses.

    Result: e2e/streamed-drift-e2e.sh all green on the local chant 0.124.53 tarballs (steps 0 to 3: 400 for an unknown member, 202 then 409, 21 starts and 21 records arriving at least 300 ms apart, the silent resource not-observed / not-reached, and the page colouring the 21 cards one by one). npx vitest run web/drift-stream.test.js src/drift-stream.test.ts: 14 passed. npm run tsc clean. No src change.

    Still open: a streamed record does not paint a stack card in the stacked view (cardsFor matches only individual cards); the stream runs there, but the colours show only with stacking off. The #998 live run is still the maintainer's.

  5. lex00 commented on Oct 26, 2026

    @lex00
    ContributorAuthor

    Closing. Epic-ready (epic:engine-ship round 2, 2026-10-26) ran on behold integration/engine-ship 9f8d257. It merged into main as a08dadc, whose tree equals 9f8d257.

    • Published chant (fresh worktree, npm ci only, chant 0.124.52 from npm): tsc 0, build 0, vitest 4750 passed, 25 skipped.
    • Local chant 0.124.53 (npm pack of chant 4b359afcc, installed --no-save): tsc 0, build 0, vitest 4753 passed, 23 skipped.
    • behold main CI on a08dadc (run 40407758155): success.

    e2e/streamed-drift-e2e.sh on 9f8d257 (local chant, choudoufu 567c49d89a, scratch floci) printed "streamed drift e2e: all green":

    • step 0: behold serves the declared workspace, with monolith among its members;
    • step 1: an unknown member gets 400;
    • step 2: 202 and then 409, 21 starts and 21 records at least 300 ms apart, and aws_cloudwatch_log_group.team_c_2 settling as not-observed / not-reached;
    • step 3: the page colours the 21 cards one by one.

    Landed in merge bf62b04. The epic-ready fix for the stacked-card addresses is merge 9f8d257. src/demos.test.ts (35), src/drift-stream.test.ts (12) and web/drift-stream.test.js (2) passed in both runs.

    Left over, and not part of this issue:

    • In the stacked view (alike cards stacked, the default for an estate), a streamed record does not paint the stack card, because cardsFor matches only individual cards. The colours show with stacking off.
    • e2e/choudoufu-estate-floci-e2e.sh now goes through the workspace serve too and was not run.
    • behold#998's live run is still the maintainer's.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic:engine-ship

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions