Skip to content

Make main green: source-form e2e harness, section-mode launch reads, checks-job repairs - #133

Merged
TheGreatAxios merged 8 commits into
mainfrom
cl-main-green-2
Aug 20, 2026
Merged

Make main green: source-form e2e harness, section-mode launch reads, checks-job repairs#133
TheGreatAxios merged 8 commits into
mainfrom
cl-main-green-2

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Main's CI has been red since the milestone merge (#108) — both jobs. This
puts them back green and fixes the real regressions the red was hiding.

walking-skeleton

The e2e harness still spoke the pre-cutover deploy dialect. It pushed
a bare workflow.json into the asset repo and deployed with
{assetId, sources}. The source-form gate rejects the envelope
(path-violation: … the workflow.json envelope form is no longer supported), so seven suites died at the push. The harness now publishes
through the platform's own createGitWorkflowPusher (rendering
@corbits/workflow-source's tree) and carries the pushed commit into a
{source, entry} deploy body — the same path the seed and the product
take, so the suite can't drift from them again.

Agent-chat reuse compared definition row ids. A code-sourced deploy
projects a fresh workflow_definition row per frozen wire projection, so
the id a chat recorded at creation and the id the picker offers later are
routinely different rows over the one asset that is the agent:
"reopen my chat with this agent" minted a duplicate instead. Reuse now
compares the asset.

Fixture alignment alongside those: the folded-run backfill insert
predated workbench_launch's NOT NULL current_run_id; local-rip's
planner gate counted definition rows (re-projected per run) and now names
the agents that appeared, which is what the gate was always about; and
the chat settings test ran on bun's 5s default while its siblings allow
90s.

(The section-mode launch read — readFoldedBody choking on CL-6329's
onTrigger turn — was fixed on main in parallel while this branch was in
flight; this branch keeps main's implementation and drops its own.)

checks

Lint failed on prettier drift, which meant eslint and the unit suite
never ran — and both were red behind it. Fixed: the formatting, three
unused symbols left by the section swap, the task-planner fake db (which
predated the launch path's frozen-projection read), and agent_turns'
missing check:no-product-tenancy allowlist ruling.

The toast suite's order-dependent failure is fixed at the cause.
mock.module rewrites the module registry for the whole process and bun
offers no way to take it back, so three suites that stubbed
@corbits/react-ui's toast left the stub installed for every file
loaded after them; toast-single-system.test.tsx renders the real
toaster and observed nothing. The shared spy now delegates to the real
toast instead of replacing it, and the counting suite clears sonner's
global store before each test. Verified across repeated full-suite runs.

Browser walkthrough

Steps 05-07 still assumed the pre-CL-6342 flow where the sidebar's "+"
minted a workbench on the spot. The harness now opens the picker, chooses
"Just start talking", and presses Create.

Proof

All three walking-skeleton steps pass locally against a scratch Postgres:
bun test scripts/e2e (36 pass, 1 skip, 18 files), bun test test/isolation (41), bun test apps/hub/test (109). bun run typecheck, bun run lint, bun run build, bun run test, the
structural self-tests, and every check:* pass.

Noted, not fixed here

  • A run-scoped re-projection lands a new workflow_definition row under
    the agent's own name on every launch, so a tenant's definition list
    grows per launch and "newest sibling by name" resolution can pick a
    run's own derived row. The reuse fix above works around it at the one
    place it broke; the identity model itself wants a ticket.
  • CL-6067 reproduced once during live golden-path verification: after a
    hub restart, a reloaded shell stayed disconnected (no Myra sidebar row
    within 15s) on the first attempt and connected on the second. Fresh
    evidence that the reconnect is flaky, not fixed.

The launch-body reader only understood a definition whose one agent step
sat at the top level, so a room agent's section-mode definition
(CL-6329's onTrigger turn) failed every read with "step turn is not a
step primitive" — inviting an agent into a chat 500'd. It now unwraps
the section and reads the agent step inside, for both the inert
projection and the live shape.

Agent-chat reuse compared definition row ids. A code-sourced deploy
projects a fresh workflow_definition row per frozen wire projection, so
the id a chat recorded at creation and the id the picker offers later
are routinely different rows over the one asset that is the agent, and
"reopen my chat with this agent" minted a duplicate instead. Reuse now
compares the definition's asset.
…ced deploy

The walking-skeleton suites still published a bare workflow.json and
deployed with the pre-cutover {assetId, sources} body, so every suite
that publishes a workflow died at the push with "path-violation: the
workflow.json envelope form is no longer supported". The harness now
publishes through the platform's own pusher (@corbits/hub-client's
createGitWorkflowPusher, rendering @corbits/workflow-source's tree) and
carries the pushed commit into a {source, entry} deploy body, so the
suite exercises the one publication path the seed and the product use.

Also: the folded-run backfill fixture predated workbench_launch's
NOT NULL current_run_id; the local-rip planner gate counted definition
rows, which a code-sourced deploy re-projects per run, so it now names
the agents that appeared; and the chat settings test ran on bun's 5s
default while its siblings allow 90s.
… agent_turns' allowlist ruling

Six test files had drifted from prettier, failing lint before eslint or
the unit suite ever ran. Behind that, the task-planner fake db predated
the launch path's frozen-projection read (db.select is not a function),
and CL-6329's agent_turns table was added to @corbits/chat's schema
without the explicit allowlist ruling check:no-product-tenancy requires.
main landed the same section-aware inert reader (extractAgentBearingStep);
kept its implementation and dropped this branch's duplicate, along with
the tests main already covers. readLiveFoldedBody keeps its folded-only
scope: its one caller is the in-process workbench-host launch.
`mock.module` rewrites the module registry for the whole process and bun
offers no way to take it back, so three suites that stubbed
`@corbits/react-ui`'s `toast` left the stub installed for every file bun
loaded after them — `toast-single-system.test.tsx` renders the real
toaster and observed nothing, failing four assertions in full-suite runs
and none in isolation.

The shared spy delegates to the real `toast` instead of replacing it, so
the three suites keep the call record they assert on while any file that
mounts a `<Toaster />` still sees real toasts. Sonner's store is global
and outlives a mount, so the counting suite clears it before each test.
Steps 05-07 still assumed the pre-CL-6342 flow, where the sidebar's "+"
minted a workbench on the spot. It opens the picker now, so the harness
chooses a kind and presses Create the way a person does.
@TheGreatAxios
TheGreatAxios merged commit 8189f86 into main Aug 20, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant