Skip to content

test(ci): verify the packed tier 2 journey - #453

Merged
allisonmahmood merged 3 commits into
mainfrom
tier2/413-tier2-e2e
Oct 1, 2026
Merged

allisonmahmood merged 3 commits into
mainfrom
tier2/413-tier2-e2e

Conversation

@allisonmahmood

Copy link
Copy Markdown
Owner

What changed

Tier 2 needs an end-to-end check that its assembled features work from the packed release, not only in package tests.

Adds a packed journey covering init, all handler kinds, both dev mounts, publish, two-viewer subscriptions, lost-reply mutation retry, shared tables and stores, handles, staged uploads, members, CSV, and tier changes both ways. It runs in a separate tier2-smoke CI job and is documented in docs/DEVELOPMENT.md. No product fixes or skipped expectations.

Stacked on tier2/412-log-view. This PR targets that branch and contains only the packed-e2e work for #413, against spec #384. The reference CRM journey and tier-picking check remain manual checks on main after the stack merges, as recorded on #413. No example CRM ships, and this PR does not close the issue.

How it was verified

  • Packed tier 2 e2e passed locally in 152 seconds.
  • Typecheck, lint, changed-file formatting, Standards review and Spec review passed.
  • Full offline suite: 1,585 passed, two failures in unchanged tests. The Postgres numeric-drift case timed out; the CSS watcher recovery case returned the prior import refusal. Running those two files alone with one worker passed all 22 tests.

Release impact

  • Not breaking. Acceptance tests, CI wiring and development documentation only.
  • Breaking.

Implemented with GPT-6 Astra in the omp harness.

@github-actions github-actions Bot added area:ci CI, shared testing infrastructure, development scripts and tooling area:docs Touches the docs area size:l 501-1,000 changed lines labels Sep 30, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Astra review

Reviewed 258d4f4 against origin/tier2/412-log-view at edfda35, using the three-dot diff. One pass, no subagents; merge-blocking findings only.

Standards

No merge-blocking method or YAGNI findings. The journey reuses the existing packed runner's release setup and process cleanup rather than introducing another runner. The change stays within acceptance coverage, CI wiring and documentation.

Spec

No merge-blocking intent findings against #413 and #384. The journey covers packed tier 2 initialization, all handler kinds, both dev mounts, publication, two-viewer subscriptions, lost-reply mutation retry, shared tables and stores, handles, staged uploads, a member column, CSV import/export and tier changes both ways.

The fresh-agent CRM journey and tier-picking check are explicitly deferred until the stack merges in the scope clarification on #413. Their absence here is not a missing requirement for this PR.

Verification: pnpm test:packed-tier2-e2e passed locally in 155 seconds against the isolated real server, Postgres, workerd and Chromium. GitHub CI was still pending when checked; this does not certify all CI checks as green.

Summary: Standards 0 blockers, no worst issue; Spec 0 blockers, no worst issue.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Opus review

One blocking finding, and it is a repo setting rather than code. The diff itself is sound.

1. tier2-smoke is not a required check, so a red journey does not block a merge

.github/workflows/ci.yml:135 adds the job. The main CI ruleset (id 22387632) requires only test (22), test (24), lint, cli-smoke, clerk-live, dependency-review and postgres-concurrency. If the journey fails, the job goes red and the PR still merges into main. The ticket's done-when is "the e2e is green in CI", and its whole purpose is to catch assembled regressions, so a check that does not gate anything leaves it half-wired.

Fix: add tier2-smoke to the ruleset's required status checks when this lands. The other option is to run pnpm test:packed-tier2-e2e as a step in cli-smoke, which is already required. That costs about 3.5 minutes inside its 20-minute budget but adds nothing to the ruleset. Either works; the separate job plus a ruleset entry keeps the failure signal clearer.

Ticket coverage (what the journey asserts versus only touches)

Ticket item Verdict Where
init --tier 2 from the packed release Asserted: tier, installed, pnpm typecheck of the starter. It runs through the harness's digest-addressed tarball and a clean offline npm install, not workspace sources packed-tier2-e2e.mjs:29-42,105-106
A handler of each kind Asserted: query, mutation and action all run in dev and hosted, and publish reports exactly action/mutation/query :190-211,220-226
dev with both mounts Asserted: distinct origins, distinct viewers, the member list equals the two mount identities, and the colleague mount sees the owner's write :181-203
Publish Asserted: tier 2 plus sha256 and byte count for both artifacts :218-230
Subscribed page across two viewers Asserted in dev and hosted through useQuery text with no reload. Two isolated contexts in one Chromium, which is equivalent for cookies and sessions :203,244,293,309,333,363
Mutation retry() after a lost reply Asserted, and it can fail: the reply is dropped only after a real committed 200, unknown_outcome carries retry, both requests share one string key, the retry returns the dropped row, and the list shows exactly one "Lost reply" row :259-303
Shared table and shared store Asserted: dev fixtures and hosted source data read back with exact contents, plus a shared-store handle download :204-210,245-256
Handle and staged upload Asserted: stage, adopt in an action, handle download, file contents compared :211-212,306-307
Member column Touched. Only valid member ids are written (created.owner === viewer, tier 1 me.user.id). Nothing checks the spec's invalid_row refusal of a non-candidate, so a t.member() that behaved like t.text() would still pass. Not blocking, because the primitives ticket owns that check, but one tier 1 insert with a bogus owner expecting invalid_row would make this row real :153,243,331
CSV import and export Asserted: a quoted comma survives parse, and the downloaded notes.csv must match the bytes exactly :308-314
Tier change both ways Asserted: 2→1 keeps rows and allows direct writes; 1→2 shows "Reload to keep saving", gives the stale tier 1 document server_required, and the reloaded tier 2 page writes :316-365

Checked and clean

  • Product code. The diff touches only ci.yml, package.json, docs/DEVELOPMENT.md, scripts/packed-cli-e2e.mjs (the --tier2 branch) and the new scripts/packed-tier2-e2e.mjs. The ticket's rule holds.
  • Flakiness. No wall-clock sleeps. Every wait is on an observable result. Ports come from reserveLoopbackPort. The patch dev daemon is registered in patchDevCleanup before it starts, and the browser server goes through registerSpawnedChild, so both are covered by the existing cleanup and signal paths. The temp root is the harness's own. The five-minute race latches SIGTERM, which gives exit 143.
  • Method. It reuses the packed harness (packing, the real server, Postgres, seeding, cleanup) behind --tier2 instead of copying it, which is the right call. The chromium.launchServer block and the offline-route context duplicate runTier1Flow (packed-cli-e2e.mjs:3487-3503) and could become one helper. Not blocking.
  • CI run. tier2-smoke passed on 258d4f4 in 4m36s; the journey step took 3m24s and logged every stage through PASS. The 15-minute job timeout leaves plenty of headroom.

Reviewed with Claude Opus 5.5 in Claude Code.

@allisonmahmood

allisonmahmood commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner Author

Review response

Fixed member-column coverage in 0e03b16: the packed journey inserts a non-member id and requires invalid_row. The subsequent successful write and exact subscribed row list verify that the refused insert left no row. Updated DEVELOPMENT.md.

Whole-stack CI-stability fix

Separate commit c803676 is a CI-stability fix for the whole stack, replacing the previous Node 22 escalation:

  • Every case in packages/patchy/src/cli.test.ts launches the real CLI. The file now sets a 30-second default by construction, replacing 27 per-case overrides. The two expanded install/typecheck scenarios retain their existing 120-second budget.
  • scripts/dev/src/main.test.ts likewise sets a file-local 30-second default for its three dev-CLI subprocess cases, removing three redundant overrides.
  • Audited the other CLI-spawning suites. devLifecycle.test.ts and SdkApi.test.ts already give their CLI scenarios longer explicit budgets; those mixed suites remain unchanged. Pure in-process cases retain their existing deadlines.
  • No assertions or production timeouts changed. Documented the scope in DEVELOPMENT.md.

Verification on c803676

  • All 10 checks passed on their first attempt, with no CI reruns: test (22), test (24), lint, cli-smoke, tier2-smoke, clerk-live, postgres-concurrency, dependency-review, image, and label. The CI, image, and label workflow runs each report run_attempt: 1 and the exact latest commit SHA. CI run.
  • Node 22 passed in 13m16s; Node 24 in 13m19s; tier2-smoke in 4m28s. GitHub reports the PR merge state as CLEAN.
  • Local CLI suite: 244/244 passed. The dev-runner, lifecycle, and SDK suites passed another 33/33. A temporary reporter verified the collected budgets: 242 CLI cases at 30 seconds, two at 120 seconds, three dev-runner cases at 30 seconds, and neighboring in-process cases still at five seconds. Callback AST comparison confirmed unchanged assertions and scenario bodies. Lint, typecheck, and formatting passed.
  • Local verification note: I initially ran typecheck concurrently with the CLI suite, which rebuilt and removed artifacts while tests used them. After the build completed, the complete CLI suite passed against stable artifacts. This was a local verification mistake, not a CI retry.

Remaining dispositions

  • Opus's required-check finding still stands. tier2-smoke remains a separate job. Allison must add tier2-smoke to the main CI ruleset, id 22387632. The ruleset still omits it; I made no ruleset changes. The action remains recorded on #413.
  • Opus's optional browser/helper extraction remains unchanged because it is not a correctness problem.
  • Astra found no merge-blocking issues. Rechecked conversation comments, review bodies, and inline review comments after this push; no new findings or Grok feedback were present.
  • Fresh-agent CRM and tier-picking checks remain manual on main after the stack merges. Neither was run here, and no CRM example ships.

Code and CI are ready. Allison's required-check action remains outstanding. No merge performed.

@github-actions github-actions Bot added the area:cli Touches the cli area label Sep 30, 2026
Base automatically changed from tier2/412-log-view to main October 1, 2026 07:39
CI-stability fix for the whole stack: give subprocess-only CLI suites a file-local 30-second budget instead of accumulating per-case exceptions. Preserve pure in-process defaults, assertions, longer scenario budgets, and production timeouts.
@allisonmahmood
allisonmahmood merged commit 99d767a into main Oct 1, 2026
10 checks passed
@allisonmahmood
allisonmahmood deleted the tier2/413-tier2-e2e branch October 1, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:docs Touches the docs area size:l 501-1,000 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: the packed tier 2 e2e, the reference CRM journey by a fresh agent and the tier-picking check

1 participant