Skip to content

ci: a v18 → v19 source-upgrade gate — a committed 18.6.0-shaped project (template exportsOf wiring) goes through migrate meta --from 18 --write, validate, build, boot and --stored on every PR touching the upgrade path, no LLM needed #39009

Description

@objectstack-fleet

qa#1 · os-justin · session_01QSeKYpxQpmErd1ixfkgbYh

Filing gate: ③ a task the maintainer dispatched · Source: maintainer. In the verification seat's session on 2026-12-01 the maintainer asked 「这些开发在处理的时候没有自己测试吗」. The seat proposed this gate at p1, and the maintainer answered 「同意」.
Ruling-ref: priority:p1 — maintainer 「同意」 (2026-12-01; GA focus 「重点解决 v18到 v19 的升级」, #38907)

Grading: area:build · domain:devx · Feature (CI) · p1. Child of the 19.0.0 GA tracking card #38907, section B.

Business reason

Every upgrade-path defect found on 2026-12-01 passed its own unit tests and was caught only by a hand-run acceptance (#38920, #38847 cell U):

The migration tool's tests use stacks written as literals, and #38550's note says "the upgrade tool can migrate the source" on that basis. No CI job walks the path a real 18.x user takes. The gates that exist cover neighbouring ground only:

So a regression on the source path reaches users first.

What to build

A job (a new workflow, or a leg of scaffold-e2e.yml) that runs without any model key:

  1. Fixture. Commit a v18 project shaped like a user's:

    Generate the database once with the published 18.6.0 CLI and commit it with a provenance note, the way the scenario fixtures do (scenarios: the verified builds the ask rounds run on are committed fixtures beside their cards #34920).

  2. Upgrade. Install this checkout's packed tarballs, the same way scaffold-e2e.yml does, then run os migrate meta --from 18 --write. Assert:

    • it exits 0;
    • every mechanical change is written;
    • a re-run reports applied: 0;
    • engines.protocol reads '^19'.
  3. Build and data.

    • Run os validate, os build (with no access-matrix drift left unexplained) and os migrate apply --yes on the fixture database.
    • Run os migrate meta --stored. It must exit non-zero, or rewrite, whenever a stored row stays invalid.
  4. Boot.

    • Start the app.
    • Every seeded record reads back.
    • The stored view is served valid.
    • Read the permission-set fixture's field reads, and assert them as the ruled 19 behaviour.
  5. Second wiring. Run the same steps against a helper-built stack (composeStacks / a defineStack helper, the HotCRM shape) for the edits the tool can prove.

Trigger: PRs touching packages/cli/**/migrate*, packages/spec/src/**/migrations/**, the template, or ADR-0087 entries. Also nightly on main.

Expected first state: red, on #38879, #38922, #38923 and #38925. The job lands as non-required while those are open, then becomes required before 19.0.0 GA. Its readings go on #38907.

Reader

A devx-lane dev, with the domain:server owner of os migrate meta for the assertions. The verification seat supplies the fixture shape from #38920 S1, and keeps hand-running the upgrade acceptance on release candidates until this job is green.

Dedupe

Searched:

  • upgrade e2e scaffold migrate CI: none open;
  • "migrate meta" CI gate template: none.

Read scaffold-e2e.yml and upgrade-harness-optin.yml (#24522): neither runs the source migration.

Activity

  1. added
    enhancement
    priority:p1
    domain:devx
    on Dec 2, 2026
  2. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ

    First touch · 2026-12-02T00:05Z

    定级(作者按维护者「同意」定的 p1 保留):area:build · Feature · p1 · 18→19 源码升级路径无 CI 门,回归先落到用户 · 2026-12-01 五个升级缺陷都过了单测、靠手跑验收才抓到

  3. added
    pm:queue
    on Dec 2, 2026
  4. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

    Claim: PM loop round 1 (seat-held big card; not zoned: governed .github/workflows/**)
    Session: session_01QSeKYnrQ7UMtHofKQVjcH2
    Thread session: session_01QSeKYnQLxmc8FwPpCabvUr
    Account: os-justin
    Branch: claude/issue-39009-upgrade-source-gate
    Worktree: objectstack-issue-39009 (in the thread's container)
    Domain: domain:devx
    Seat: repo:objectstack@os-justin
    File surface: one new workflow under .github/workflows/, one new fixture directory (v18 sources, an 18.6.0 SQLite database generated by the published 18.6.0 CLI, provenance note), one new runner script with its tests, any workflow/gate register entry the repo's gates demand for a new workflow, the changeset or skip-changeset (stop on breach; explain in the report)
    Container & model: L, mode:cloud (packs every publishable tarball and boots an app: build-heavy, one card one container), model: opus (dispatch-gates --tier: no path-derived mandate; floor sonnet · default opus · ceiling fable — default tier), effort: high
    Clause-②: no
    Metadata-protocol: none
    Landing: governed (check-governed-merges --test over the planned surface: .github/workflows/** hits the register), so the PR is Tier H and goes to the maintainer. The job lands non-required; it becomes required before 19.0.0 GA, per the card.
    Responsibility: no CI job walks the source path a real 18.x user takes (migrate meta --from 18 --write → validate → build → apply → boot → --stored) | scaffold-e2e.yml (new scaffold) and upgrade-harness-optin.yml (data, opt-in) | every v18 → v19 upgrade; five defects of 2026-12-01 passed their unit tests
    Thread-read: 7330148113
    Prior rulings read: the maintainer's 「同意」 (2026-12-01, the card's Ruling-ref); #34365 for the permission-set boot assertion; #34920 for committing a generated database with provenance.
    Premise: holds (origin/main ffda6da: no workflow runs os migrate meta; the two gates named above were read)
    Serial constraints cleared: check-handover --inflight (2026-12-02T13:24Z): the surface is new files only. #39126 (repo:cloud#3) claims packages/ as a placeholder whose stated reason is the approvals engine; no file of this surface is in it.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 2, 2026
  6. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnQLxmc8FwPpCabvUr
    os-dev-report

    Served tier: opus (session model: opus, last served claude-opus-5-5), effort high, as dispatched.

    Workflow run on head 3e569944c1 (run 46912699833, job v18 → v19 source upgrade). Steps: Self-test the runner ✅, Build the framework the fixture depends on ✅, Pack this checkout's publishable packages ✅, Walk the v18 → v19 upgrade ❌ (declared expected red), Upload the walk's logs ✅. The walk read 25 PASS, 1 FAIL:

    [T1] PASS every @objectstack/* dependency resolves from a packed tarball of this checkout
    [T2] FAIL (expected red, waits on #38924) the dry run names the permission entry whose own field row hides a field beside View All / Modify All (crm18_auditor, crm18_contact.salary)
    [T3]-[T9] PASS (--write exit 0; 12 of 12 written, re-check agrees; re-run applied 0; engines.protocol '^19'; validate; the access-matrix step named; build under the drift rule)
    [D1]-[D4] PASS (migrate apply --yes; migrate protocol --to 19 --apply --yes; --stored exits non-zero; --stored --apply rewrites the view row)
    [B1]-[B8] PASS (boot; 18 passwords; every seeded record; stored view served valid with its columns; auditor reads no salary; auditor salary edit 403 PERMISSION_DENIED; member reads no account notes; validation 400 VALIDATION_FAILED)
    [H1]-[H5] PASS (helper wiring: every site written or named with its builder; exit 1 exactly when left by hand; re-run applied 0; validate; build)
    Expected red, waiting on an open fix: T2 (#38924).
    Verdict: RED.
    

    §C expected-red list on current origin/main. This replaces the four-row table in the PR body, which was measured at the branch base ffda6dab9e, before #39131 and #39136 merged. The seat writes the body.

    Test name Waits on Error signature
    [T2] the dry run names the permission entry whose own field row hides a field beside View All / Modify All (crm18_auditor, crm18_contact.salary) #38924 (open) neither the dry run's JSON nor its human report names \salary`: the auditor set's viewAllFields addition is listed with no word that its own `crm18_contact.salary` row now hides the field from it (read and edit) on 19`

    At the base ffda6dab9e, T8 (#38925), D3, D4 and B4 (#38923) were also red. In the merge preview they turned green when #39131 and #39136 merged. Their waitsOn were dropped in 3619b4e1, so a regression there now reads UNEXPECTED.

    {
      "issue": 39009,
      "status": "done",
      "branch": "claude/issue-39009-upgrade-source-gate",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39150",
      "session": "session_01QSeKYnQLxmc8FwPpCabvUr",
      "premise_still_valid": true,
      "summary": "New non-required workflow Upgrade Source Gate (.github/workflows/upgrade-source-gate.yml). It is triggered by the migrate CLI, authored-source writer, spec migrations, template and its own files; it also runs nightly and on workflow_dispatch. Everything else lives in packages/qa/upgrade-source/: an 18.6.0 blank-template project (exportsOf wiring unchanged, master-detail + lookup, bulkActions views, the #38924 permission-set shape, validation rule, record flow, dataset, dashboard, committed access-matrix.json); the SQLite database the PUBLISHED 18.6.0 CLI wrote for it, as SQL text with manifest and provenance (generate-fixture-db.mjs is the exact command); a composeStacks(createCrmStack(…)) helper wiring; and run.mjs, 26 assertions plus a 30-case --self-test. On head 3e569944c1 the job is red on T2 only (waits on #38924) and every other check is green. No claim comment existed on #39009 when this ran, and none was posted (the seat claims).",
      "tests": "node packages/qa/upgrade-source/run.mjs --self-test → '✓ upgrade-source run.mjs self-test: 30 cases in 10 batteries pass.' (10 pinned batteries plus the verdict handshake). Local walk against node scripts/publish-smoke-pack.mjs tarballs of the base ffda6dab9e: exit 1. T2 is red as expected; T8/D3/D4/B4 are red only because their fixes postdate that base. The other 21 PASS. CI walk on the 3e569944c1 merge preview: 25 PASS, T2 FAIL (quoted above). Repo tests the fixture first tripped, re-run after the fix: pnpm --filter @objectstack/platform-objects exec vitest run --maxWorkers=2 src/managed-api-method-affordance-sweep.test.ts src/platform-admin-affordance-standing.test.ts → 'Tests 12 passed (12)', VERDICT command-exit 0. No ablation: config, workflow and fixture only; no tested product behaviour changed.",
      "gates": "dispatch-gates --commands on 3e569944c1: 117 families. --ran: '✓ dispatch-gates --ran: 117 derived famil(ies) accounted for — 115 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3).' 114 were run on 3e569944c1, every exit 0, each exit code captured before any pipe. pnpm check:pm-dispatch-gates exited 0 on d3276e67 (2904 fast-tier cases, census 'twelve declarations' ✓); since then its inputs changed by one workflow line (the fixture path, line 92; the marker on line 28 is unchanged). NOT-MEASURED: node scripts/check-plugin-teardown-shape.mjs --self-test (exit 3: a positive control pinned to a commit this shallow clone lacks) and pnpm check:dual-build-cjs-loads (exit 3: needs a full pnpm build); CI runs both. Also run locally: pnpm check:type-check-debt exit 0 and node scripts/docs-audit/check-affected-docs.mjs exit 0. PR check-runs on head 3e569944c1: Lint & Repo Gates=success, TypeScript Type Check=success, Test Core=success, Build Core=success, Governed Surface Queue Guard=success, Lint UI=success, Type Check UI=success, Test UI=success, Build & E2E UI=success, Live E2E UI=success, Dogfood Regression Gate=success, Lint · PM dispatch-gates=success, Type Check · debt ledger=success, Check PR Size=success, Temporal Conformance (live PG + MySQL)=skipped, Check Changeset=skipped (skip-changeset), v18 → v19 source upgrade=failure (the declared expected red T2, #38924). 41 check-runs success in all.",
      "mcp_calls": "0 GitHub MCP calls. Other MCP: claude-code-remote get_session x1 (served tier) and send_message x1 (the seat line).",
      "api_writes": "4 REST writes in 2 fleet-write relay strokes: (1) pr_create = POST /repos/objectstack-ai/objectstack/pulls (draft), POST /issues/39150/assignees [os-justin], POST /issues/39150/labels [skip-changeset], read back identical (10146 bytes); (2) this comment, POST /issues/39009/comments via post-stamped.mjs. git push is not a REST write.",
      "classifier_refusals": [],
      "open_questions": [
        {
          "question": "Helper-built wiring: should the gate assert that --write WRITES through composeStacks(createCrmStack(…)), or that it names every site with its builder, as now?",
          "options": [
            "A: keep H1-H5 as 'written or named with the builder, honest exit, green once the named edits are applied'. That is what #38879 delivered for helper-built stacks: 0 of 15 written, each listed [helper] naming composeStacks(…).",
            "B: assert 'all written' and declare H1 waiting on a new card for following helper-built stacks (the HotCRM 0-of-144 case)."
          ],
          "recommendation": "A. It asserts what the tool promises today and catches a regression in its honesty. B needs a design decision on how far the writer follows helpers, which no card holds."
        },
        {
          "question": "Fixture layout: two platform-objects sweeps import every *.object.ts under packages/ (only the scaffolding templates are excluded, by name), and check-affected-docs forbids tracked .ts in a dot-directory under packages/. The fixture's object files are therefore src/objects/account.ts, contact.ts and note.ts, not *.object.ts. Keep that, or exclude packages/qa/upgrade-source/ in both sweeps?",
          "options": [
            "A: keep the rename. The migration never reads file names, but a future fixture author who adds *.object.ts trips the same two sweeps; the README says why.",
            "B: a platform-objects card adds the fixture directory to both sweeps' exclusion beside the templates, and the fixture goes back to the generated names."
          ],
          "recommendation": "A for now. B touches files outside this card's surface; if the fixture grows other generated names, file B then."
        },
        {
          "question": "D2 (os migrate protocol --to 19 --apply --yes) is a step the card did not list, but a 19 boot refuses an 18 database without it and names the command. Keep it in the walk?",
          "options": ["A: keep it as its own named step.", "B: drop it and let B1 red."],
          "recommendation": "A: it is part of the real user path, and its red would be a real regression."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: public door, `os start` on 19.0.0-next.3 tarballs of this checkout (CI run 46912699833, artifact upgrade-source-logs, logs/boot-server.log; also seen locally at ffda6dab9e). Every boot logs at ERROR: '[security] upgrade impact: 1 navigation contribution(s) name a group their app no longer has, so their items were moved to the app's top level. Nothing was changed. Fix: point the contribution at a group the app ships.' with items [{app: setup, group: group_overview, packageId: com.objectstack.mcp.connect-agent-ui}]: a first-party package's own nav contribution, on an app with no customization · dedupe words: connect-agent-ui group_overview, relocatedNavContributions, 'upgrade impact' navigation contribution setup",
        "carrier: seat · the PR body's §C table (4 rows, measured at ffda6dab9e) is stale: it should be the one-row table in this comment. The 'What changes' file table should also say: 26 assertions (D4 added: --stored --apply rewrites the row); object files src/objects/*.ts rather than *.object.ts; helper-wiring/ carries the fixture's package.json under another name; scripts/pm/dispatch-gates.self-test.mjs gains the twelfth no-check-families census row. Noted, not filed."
      ],
      "line_budget": "2876 changed lines (+2874 / -2) across 43 files on 3e569944c1, under the 3000 human-merge line. database.sql is 590 of them, run.mjs 735.",
      "deviations": [
        "The worktree was made with git worktree add on the platform-assigned branch, after detaching the shared checkout. dev-worktree.sh refuses an existing local branch, and the card-thread rule forbids an empty-branch probe. BASE pinned with dev-worktree.sh --pin-base (ffda6dab9e).",
        "File surface: besides the workflow, packages/qa/upgrade-source/ (fixture, DB, provenance, generator, helper wiring, runner) and skip-changeset, one register entry: scripts/pm/dispatch-gates.self-test.mjs, the census pin of no-check-families declarations (eleven to twelve, one named row). Lint · PM dispatch-gates required it for the new workflow.",
        "The generator generate-fixture-db.mjs is committed beside the DB as the provenance's exact command. The DB was regenerated twice with it (published 18.6.0 from npm each time) as the fixture layout changed; never hand-edited.",
        "The first gate loop outran the 10-minute foreground cap and was moved to the background by the harness (not by me). A parallel re-run with a broken xargs harness printed exit 126/127, which were my harness's own codes; it was discarded and re-run correctly.",
        "Commit trailers are the model-free pair AGENTS.md requires, not the harness reminder's model-named Co-Authored-By.",
        "The PR body was written once at pr_create (dev rule); its §C list and file table went stale after merges on main and two layout fixes. The corrections are in this comment."
      ],
      "files_changed": [
        ".github/workflows/upgrade-source-gate.yml",
        "scripts/pm/dispatch-gates.self-test.mjs",
        "packages/qa/upgrade-source/README.md",
        "packages/qa/upgrade-source/run.mjs",
        "packages/qa/upgrade-source/generate-fixture-db.mjs",
        "packages/qa/upgrade-source/fixture-db-18.6.0/{database.sql,manifest.json,provenance.json}",
        "packages/qa/upgrade-source/fixture-18.6.0/{.gitignore,access-matrix.json,objectstack.config.ts,objectstack.manifest.json,package.json,pnpm-workspace.yaml,tsconfig.json}",
        "packages/qa/upgrade-source/fixture-18.6.0/src/** (actions x3 + index, apps main + index, dashboards overview + index, datasets accounts_by_industry + index, flows contact_created + index, objects account/contact/note + index, picklists index, security auditor/member + index, skills index, views account/contact/note + index)",
        "packages/qa/upgrade-source/helper-wiring/{crm-stack.ts,objectstack.config.ts,package.json}"
      ]
    }

    Governed: .github/workflows/** makes #39150 Tier H, so it is a human merge.

  7. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnQLxmc8FwPpCabvUr
    os-dev-report

    Fix round for L2 record 7351475798. New head e46ff2971a0f320fe7234e4c20aa7964d51e2a0a. Rulings applied: helper wiring A, object file names A, D2 kept.

    Walk on the merge preview (run 46929906699): 29 PASS, 1 FAIL, T2 only, waiting on #38924 (read open in the run). Every required check is green.

    {
      "issue": 39009,
      "status": "done",
      "branch": "claude/issue-39009-upgrade-source-gate",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39150",
      "session": "session_01QSeKYnQLxmc8FwPpCabvUr",
      "premise_still_valid": true,
      "summary": "Fix round on the L2 FAIL (record 7351475798, head 3e569944c1), with M1, S1–S5, N1, N2 and N4 addressed. New head e46ff2971a (+3 commits). The new job's walk reads 29 PASS and one FAIL: T2, waiting on #38924, which reads open. Every required check is green. One non-required red, Validate Package Dependencies, failed on an infrastructure flake (a docker pull of ghcr.io/google/osv-scanner-action:v2.5.0 hit an EOF on a blob fetch). A dev never re-runs, so the re-run is the seat's. The PR body was not patched: the ready text is in this comment.",
      "deltas": {
        "M1": "paths: gains 'packages/spec/src/conversions/**' (the ADR-0087 table: registry, apply, walk, stored, entries/NN/*). The trigger comments now name each input by the step that reads it, and the false claim that the migrations glob covers the conversion entries is gone.",
        "S1": "paths: gains packages/metadata-protocol/src/stored-migration.ts and protocol-stored-*; packages/cli/src/commands/{validate,build,compile}.ts and packages/cli/src/utils/protocol-version-gap.ts; packages/cli/src/utils/schema-migrate.ts; scripts/publish-smoke-pack.mjs and .github/actions/setup-workspace/**. The no-check-families marker stays on line 28, so the census row holds.",
        "S2": "(1) New T11, a separate non-waiting assertion: both dry runs (--json and human) exit 0 and --json prints its report (CI: '--json exited 0 (JSON: applied 12, todos 92), the human run exited 0'). T2 also flags its red unexpected when either run breaks, and its FAIL detail is now measured (the counts plus the entries on the auditor set), not a constant string. T2 now needs ONE entry or line that names both the set and salary, not two words anywhere. (2) verdict(): a waitsOn red counts as waiting only when its card reads 'open' on the GitHub API in this run; closed or unreadable makes it UNEXPECTED (the workflow passes GITHUB_TOKEN to the walk step for that read). A waitsOn assertion that passes is a STALE entry and keeps the verdict red until the entry is dropped. The self-test pins every arm: 8 verdict cases, among them STALE-is-red, closed→UNEXPECTED, unknown→UNEXPECTED and flagged→UNEXPECTED on an open card. (3) Noted in the record as the card's design; unchanged.",
        "S3": "EXPECTED_APPLIED pins the sets by conversion id + path: template 12 (T10, on the dry run) and helper 15 (H6, on the helper's --write). Compared as multisets, so a conversion that fires once fewer is 'missing'. CI: '12 applied = the pinned 12', '15 applied = the pinned 15'. Battery 'applied-set' (4) covers it. The record's other S3 limit, that H3–H5 apply the template leg's written sources rather than the helper's own list, is unchanged; with ruling A, H1 plus H6 now pin what that list must hold.",
        "S4": "lockfileResolution() scans every name in overrides.json for a registry leak, as scaffold-e2e.yml does, and every declared @objectstack/* name must resolve from a tarball. CI: '66 package(s) resolved from packed tarballs, 0 from the registry, over all 114 names in overrides.json; all 9 declared @objectstack/* among them'. The self-test adds a case where an undeclared override name leaks.",
        "S5": "B3 compares every seeded value in manifest.json, the master-detail and lookup ids included; a reference read back as {id} compares by id. CI: '7 records read back, 32 seeded values equal'. B5's positive control: the owner reads salary on 4 of 4 (auditor 0 of 4). B7's: the owner reads notes on 3 of 3 (member 0 of 3). D3 now requires exit 1, clean:false, servedInvalid >= 1, and the crm18_contact view row 'pending' with servedInvalid.path 'list.bulkActions'. CI: '--stored exited 1; clean false, servedInvalid 1, pending 1; … the view row: servedInvalid at \"list.bulkActions\"'.",
        "N1": "Ready PR body text below, under its own heading. It adds Clause-② no and Metadata-protocol none at line start, the one-row §C table, the 30-assertion count, the new layout and paths, and the over-3000 size note. Not sent through issue_patch: os-dev.md forbids a dev PATCHing the PR body, and that file wins over a dispatch (see open_questions).",
        "N2": "P1, a new first assertion: database.sql and manifest.json hash to the sha256 in provenance.json (CI: PASS). Battery 'provenance-hash' (2) covers it. The generator now refuses unless all 9 @objectstack/* pins of the fixture install at 18.6.0, not only cli and spec. It was not re-run: the committed DB is unchanged, and the 9 pins read 18.6.0 in a registry install of the same package.json.",
        "N3": "Left for the seat to decide, as ruled.",
        "N4": "record() prints the detail's first line on every PASS. Each PASS detail now carries counts: T1 66/114, T10 12/12, T3 applied/written, B3 7/32, B5 4/4 and 0/4, B7 3/3 and 0/3, H6 15/15, T11 exit codes."
      },
      "tests": "node packages/qa/upgrade-source/run.mjs --self-test → '✓ upgrade-source run.mjs self-test: 43 cases in 13 batteries pass.' New batteries: applied-set 4, seeded-values 2, provenance-hash 2; verdict 8 and lockfile-resolution 4, up from 4 and 3; the floor goes from 10 to 13. Local walk (node --use-env-proxy, base tarballs): P1, T1, T10, T11, B3, B5, B7 and H6 PASS with the counts above; card #38924 read open. T8/D3/D4/B4 are red on base-ffda6dab9e tarballs only because their fixes postdate that base; the merge preview has them. CI on e46ff2971a (run 46929906699, job 143635304907): Self-test ✅, Build ✅, Pack ✅, Walk ❌, Upload ✅. The walk reads 29 PASS, then T2 FAIL '(declared to wait on #38924)', 'card #38924: open', 'Expected red, waiting on an open fix: T2 (#38924).' No ablation: CI and fixture code only.",
      "gates": "dispatch-gates --commands on e46ff2971a: 117 families (unchanged). --ran: '✓ dispatch-gates --ran: 117 derived famil(ies) accounted for — 115 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)'. 114 run on e46ff2971a, all exit 0, after rebuilding the cli closure and the showcase's dependencies, which check:dts-closure, check:i18n-coverage, check:lean-entry-closure and check:sourcemap-no-sources-content read. pnpm check:pm-dispatch-gates: exit 0 on d3276e67; since then the workflow changed only below its line-28 marker. NOT-MEASURED: check-plugin-teardown-shape --self-test (shallow clone) and check:dual-build-cjs-loads (needs a full build); CI runs both. PR check-runs on e46ff2971a: Lint & Repo Gates, TypeScript Type Check, Test Core, Build Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check PR Size, Lint · PM dispatch-gates and Type Check · debt ledger: all success (40 success in all). Temporal Conformance skipped. v18 → v19 source upgrade: failure, T2 only, as declared. Validate Package Dependencies: failure, the non-required osv-scanner docker pull flake.",
      "mcp_calls": "0 GitHub MCP calls. Other MCP this round: none before this comment; send_message x1 after it.",
      "api_writes": "This round: 1 REST write, this comment (POST /issues/39009/comments via post-stamped.mjs). An earlier relay request for this same comment (fw-20261202T171538Z-7b91bb, dispatched 17:15Z, answered 204) never produced a run in 62 minutes, while later requests ran. It was judged lost and this comment sent once more; if that request ever lands, it is a duplicate of this comment. No PR body PATCH, no re-run. Lifetime of the card: 5 (pr_create = 3 requests; report 7350928964; this comment).",
      "classifier_refusals": [],
      "open_questions": [
        {
          "question": "N1 asks the dev to try issue_patch on the PR body. os-dev.md says a dev writes the body only at pr_create and the seat writes it after that, and says the file wins when a dispatch conflicts with it. Which rule governs a fix round?",
          "options": [
            "A: the seat applies the ready text below (the file's rule; this round's route)",
            "B: a later round has the dev send issue_patch with this text"
          ],
          "recommendation": "A, because os-dev.md says the file wins on a conflict, and the text is complete and ready to paste."
        },
        {
          "question": "Validate Package Dependencies failed on e46ff2971a pulling ghcr.io/google/osv-scanner-action:v2.5.0 (EOF on a blob fetch; it passed on every earlier head of this PR). Re-run it?",
          "options": [
            "A: the seat re-runs the failed job once with scripts/pm/rerun-failed.mjs, after noting the flake on the PR",
            "B: leave it; it is not a required check"
          ],
          "recommendation": "A: the log shows it measured nothing, and a dev never re-runs."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: seat · the connect-agent-ui navigation ERROR from 7350928964 still appears in this round's boot log; unchanged, the seat routes it."
      ],
      "line_budget": "3111 changed lines (+3109 / -2) across 43 files on e46ff2971a: OVER the 3000 human-merge line (it was 2876 at 3e569944c1). The fix round added about 235 lines to run.mjs and the workflow. Not split: a PR over the line goes to human review whole, and this one is Tier H already.",
      "deviations": [
        "PR body not patched (see open_questions[0]); the full ready text is in this comment.",
        "The Validate Package Dependencies flake was left for the seat (a dev never re-runs).",
        "The generator's new pin check was not re-run end to end, so the DB stays unchanged; it was verified against a registry install of the same pins.",
        "A build of the cli closure and the showcase's dependencies (turbo cache, 70/73 tasks replayed) ran in the recreated worktree so the dist-reading gates could measure; nothing from it is committed."
      ],
      "files_changed": [
        ".github/workflows/upgrade-source-gate.yml",
        "packages/qa/upgrade-source/run.mjs",
        "packages/qa/upgrade-source/generate-fixture-db.mjs"
      ]
    }

    Ready PR body for #39150 (N1): the seat applies it

    Fixes #39009
    
    Clause-②: no
    Metadata-protocol: none
    
    ## 维护者速读
    
    - 用户无感:这是一道新的持续集成检查,每次有人改动升级工具、转换条目、存储行转换、校验与构建命令或项目模板时(以及每晚),都会拿一个按 18.6.0 真实用户形状搭好的项目和它的数据库,完整走一遍升级到 19 的流程,并逐项报告结果。
    - 属于 19.0.0 正式版跟踪卡里"重点解决 18 升 19 的升级"这一部分:之前五个升级缺陷都通过了各自的单元测试,只靠人工验收才发现,这道检查把那次人工验收变成每次都自动跑。
    - 这道检查不是必过项,出错只会让它自己变红,不挡任何合并;它现在只有一条红项,在等"权限集自带隐藏字段行时迁移工具未点名"这张修复卡,该卡关闭或修好后检查会提醒删掉这条等待,可整体撤回。
    - 本改动涉及工作流目录,且改动行数超过人工审阅线,需要你亲手合并;其余无。
    
    ## What changes
    
    A new, **non-required** workflow, `Upgrade Source Gate` (`.github/workflows/upgrade-source-gate.yml`), walks the v18 → v19 source upgrade a real 18.x user takes, against this checkout's packed tarballs, with no model key. Its `paths:` cover every input the walk runs through, each named by the step that reads it:
    
    - `os migrate meta` / `apply` / `protocol`, the source writer and the schema migration (`packages/cli/**/migrate*`, `packages/cli/src/utils/authored-source-*`, `packages/cli/src/utils/schema-migrate.ts`);
    - `os validate` / `os build` and the protocol-range check (`packages/cli/src/commands/{validate,build,compile}.ts`, `packages/cli/src/utils/protocol-version-gap.ts`);
    - the ADR-0087 conversion table and the chain that replays it (`packages/spec/src/conversions/**`, `packages/spec/src/**/migrations/**`);
    - the stored-row conversion (`packages/metadata-protocol/src/stored-migration.ts`, `packages/metadata-protocol/src/protocol-stored-*`);
    - the template (`packages/cli/src/commands/init.ts`, `packages/create-objectstack/**`);
    - how the walk installs this checkout (`scripts/publish-smoke-pack.mjs`, `.github/actions/setup-workspace/**`);
    - the gate's own files.
    
    It also runs nightly at 04:41 UTC and on `workflow_dispatch`. It is in no required-checks list.
    
    Everything else lives in `packages/qa/upgrade-source/`:
    
    | Path | What |
    |---|---|
    | `fixture-18.6.0/` | An 18.6.0 project shaped like a user's. Scaffolded with `npx create-objectstack@18.6.0 crm18 --skip-skills`, its metadata written with that install's `os generate` and then edited. It holds the blank template's `objectstack.config.ts` with the `exportsOf(…)` wiring unchanged; `crm18_account`, and `crm18_contact` with a master-detail and a lookup to it; list views with `list.bulkActions`; three actions; `crm18_auditor` (View All + Modify All on contacts, plus its own `crm18_contact.salary` row with `readable: false`, the #38924 shape); `crm18_member` (a field row hiding account notes); a validation rule, a record-triggered flow, a dataset, a dashboard; and a committed `access-matrix.json`. `os validate` and `os build` are green on 18.6.0. The object files are `src/objects/{account,contact,note}.ts`, not `*.object.ts`: two platform-objects sweeps import every `*.object.ts` under `packages/`, and `os migrate meta` never reads a file name. |
    | `fixture-db-18.6.0/` | The SQLite database the **published 18.6.0 CLI** wrote for that project, dumped to deterministic SQL text (the 18.0 upgrade-harness fixture's form). Beside it, `manifest.json` (people, records with their seeded values, the stored view, what 18.6.0 served) and `provenance.json` (the exact command, versions and sha256s; the run checks them). |
    | `generate-fixture-db.mjs` | The generator behind the database, as the provenance's exact command. It installs the fixture from the npm registry at 18.6.0, runs `os start` from that install, and populates over HTTP. One step is a Studio-style view save (GET, drop a column, PUT), which stores an overlay row still carrying `bulkActions` (the #38923 shape). |
    | `helper-wiring/` | The second wiring: the same sources behind `composeStacks([createCrmStack(…)])`, the HotCRM shape. It is an overlay laid over a copy of the fixture; its `package.json` is the fixture's under another name, so the type-check coverage walk reads it as a project of its own. |
    | `run.mjs` | The walk and its 30 assertions, plus `--self-test` (43 cases in 13 pinned batteries, with the verdict handshake). |
    
    `scripts/pm/dispatch-gates.self-test.mjs` gains one named row in its census of `no-check-families` declarations: this workflow's, the twelfth.
    
    **The walk.**
    - **P1:** `database.sql` and `manifest.json` hash to what `provenance.json` records.
    - **Template wiring (T1–T11).** Install from tarballs (T1 scans every name in `overrides.json`, as `scaffold-e2e.yml` does). Run the dry run: T11 requires both dry runs to exit 0 with a JSON report, and T2's own failure is the waiting one. T10 pins the dry run's `applied` set: 12 changes by conversion id and path. Then `--write`, a re-run, the `engines.protocol` range in source, `os validate`, and `os build` under a drift rule: every access-matrix drift line must be a View All Fields gain the migration made.
    - **Data (D1–D4).** `os migrate apply --yes`; `os migrate protocol --to 19 --apply --yes` (the boot names this switch for an 18 database). D3: `--stored` exits 1 with `clean: false` and the view row `servedInvalid` at `list.bulkActions`, pending rewrite. D4: `--stored --apply --yes` rewrites that row.
    - **Boot (B1–B8).** `os start` on the migrated database. The three people sign in with their 18 passwords. Every seeded record reads back with every seeded value. The stored view is served valid, with its stored columns. The auditor reads every contact but no salary, while the owner reads every salary. The auditor's salary edit is refused `403 PERMISSION_DENIED` (the ruled 19 field axis, #34365). The member reads no account notes, while the owner reads them all. The validation rule still answers `400 VALIDATION_FAILED`.
    - **Helper wiring (H1–H6).** H1: `--write` writes, or names with the call that built it, every mechanical change and the range. H2: it exits non-zero exactly when it left one by hand. H3–H5: once the named edits are applied, a re-run reports `applied: 0`, and validate and build pass. H6 pins the 15-change `applied` set.
    
    **How a red is read.** An assertion that waits on a card (`waitsOn`) counts as an expected red only when two things hold. The red must be the failure that card describes; a step that broke another way, such as a dry run exiting non-zero, flags its red unexpected. And the card must read `open` on the GitHub API in this run. Anything else prints as **UNEXPECTED**. A waiting assertion that passes is a **STALE** entry and keeps the run red until its `waitsOn` is dropped. Each red prints `::error::`, and the step summary is a table of all 30.
    
    ## Expected red on current `origin/main` (§C list)
    
    On the merge preview of `origin/main`, one assertion is red:
    
    | Test name | Waits on | Error signature |
    |---|---|---|
    | `[T2] the dry run names the permission entry whose own field row hides a field beside View All / Modify All (crm18_auditor, crm18_contact.salary)` | #38924 (open) | `both dry runs exited 0 (applied 12, …); no entry or line names crm18_auditor's own crm18_contact.salary row` |
    
    On the merge preview of `e46ff2971a`, the other 29 pass. #38879, #38922, #38923 and #38925 have landed (#39096, #39123, #39136, #39131). Their assertions pass, and none of them carries a `waitsOn`.
    
    ## Tests
    
    - `node packages/qa/upgrade-source/run.mjs --self-test`: `✓ upgrade-source run.mjs self-test: 43 cases in 13 batteries pass.` The workflow runs it first.
    - The whole walk, on this PR's `Upgrade Source Gate` run. The report on #39009 quotes it.
    
    ## Acceptance notes
    
    - **Helper-built wiring (ruled A).** On `composeStacks([createCrmStack(…)])`, `--write` writes 0 of 15 and exits 1. Every site is listed `[helper]`, naming `composeStacks(…)`: the honest refusal #38879 delivered. So H1–H6 assert "every change named with its builder, an honest exit, green once the named edits are applied, the set pinned", not "all written".
    - **Object file names (ruled A).** Explained in the fixture's README. A dot-directory is not an option: `check-affected-docs` pins that no tracked `.ts` under `packages/**` lives in one.
    - **D2 (ruled kept).** `os start` refuses an 18 database with no `adr-0159-form-type-switch` record, and names `os migrate protocol --to 19 --apply --yes`.
    - **The 18.6.0 auth flow seen while generating.** After the first sign-up, self-registration is invite-only. The administrator creates users through `/auth/admin/create-user`, and each must change their password before any read. Sign-ins are rate-limited, so both scripts wait out a 429.
    - **Fixed boot values.** `OS_AUTH_SECRET` and `OS_SECRET_KEY` are published, non-secret values (the key is derived at run time), so any runner can open what 18.6.0 sealed.
    - **Size.** The diff is 3,111 changed lines (`database.sql` is 590 of them, `run.mjs` 942), over the 3,000-line human-merge line. It is one PR on purpose, and Tier H already.
    
    ## Verification
    
    Files to read first, by risk:
    1. `packages/qa/upgrade-source/run.mjs`: `ASSERTIONS`, `EXPECTED_APPLIED`, `verdict()` and `walk()`.
    2. `.github/workflows/upgrade-source-gate.yml`: the `paths:` list, and the absence from any required list.
    3. `packages/qa/upgrade-source/fixture-db-18.6.0/provenance.json`, with `generate-fixture-db.mjs`.
    
    Two-minute check: `node packages/qa/upgrade-source/run.mjs --self-test` prints `✓ … 43 cases in 13 batteries pass.` For the walk, this PR's `Upgrade Source Gate` run summary shows one red, T2, waiting on #38924 (open).
    
    Governed surface: `.github/workflows/**` makes this Tier H, and the maintainer merges it. The workflow does not run named local check families and declares so in its header (`dispatch-gates: no-check-families`), as `scaffold-e2e.yml` does. No published package changes, so the PR is labelled `skip-changeset`.
    
    ---
    _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYnQLxmc8FwPpCabvUr)_
  8. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnQLxmc8FwPpCabvUr
    os-dev-report

    #38924 landed. T2 runs and passes. New head 98a45d6331e58adf48657ff0b7b71027d1c68f81. The upgrade-source job is success: 30 of 30 PASS, Verdict: GREEN. Nothing is red by design any more. PR checks: 42 success, 0 failure. Every required check is green, and the PR is clean (still a draft).

    The merge of origin/main was clean, with no conflicts; details in merge_resolution below.

    {
      "issue": 39009,
      "status": "done",
      "branch": "claude/issue-39009-upgrade-source-gate",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39150",
      "session": "session_01QSeKYnQLxmc8FwPpCabvUr",
      "premise_still_valid": true,
      "summary": "#38924 has landed (PR #39160 merged as 7f72b4945f; #38924 closed 21:20Z). origin/main is merged into the branch, T2's waitsOn is removed, and T2 now asserts #39160's own output: ownFieldRowNarrowing names crm18_auditor / crm18_contact.salary, read-and-edit on 18 → hidden on 19. New head 98a45d6331. The job is green: 30 of 30 PASS, 'Verdict: GREEN.', step conclusion success. No assertion is red by design any more. The PR stays a draft.",
      "merge_resolution": "Clean, with no conflicts. The branch head before this round was 1f1ba22934, the platform's update-branch merge of main (objectstack-fleet[bot], 19:11Z) on top of my e46ff2971a. I fast-forwarded to it, then ran `git merge --no-edit origin/main` (main at 7f72b4945f, #39160), giving 26b1c3ef. The merge touched no file of this PR (diff HEAD~1..HEAD over packages/qa/upgrade-source and the workflow: empty), and no os-regen-pending entry was left. Afterwards: pnpm install --frozen-lockfile, then a rebuild of the fixture's closure (71 tasks) and of the showcase's dependencies before any gate ran.",
      "changes": [
        "c7c57af0: T2's `waitsOn: 38924` removed; no assertion in the roster carries one now.",
        "98a45d63: T2 reads dryJson.ownFieldRowNarrowing and requires the entry {set: crm18_auditor, field: crm18_contact.salary} with protocol18 'read-and-edit' and protocol19 'hidden'. Its old test, set and field named anywhere on one line, is gone. The title is updated to match."
      ],
      "tests": "Self-test: '✓ upgrade-source run.mjs self-test: 43 cases in 13 batteries pass.' Local walk against tarballs packed from the merged tree (26b1c3ef + T2): exit 0, 30 of 30 PASS, 'Verdict: GREEN.' T2: 'ownFieldRowNarrowing names crm18_auditor's crm18_contact.salary: protocol18 read-and-edit, protocol19 hidden (1 entry)'. Negative control, the same walk against tarballs packed from ffda6dab9e (before #39160): T2 FAIL 'the --json report carries no ownFieldRowNarrowing list', so the assertion can red. CI on 98a45d6331 (run 46977026875, job 143807326588): Self-test ✅, Build ✅, Pack ✅, Walk ✅, Upload ✅. The walk reads 30 PASS and 'Verdict: GREEN.'",
      "gates": "dispatch-gates --commands against merge base 7f72b4945f: 117 families, the same list as before. --ran: '✓ dispatch-gates --ran: 117 derived famil(ies) accounted for — 115 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)'. All 114 run on 98a45d6331 exited 0. pnpm check:pm-dispatch-gates was re-run on the merged tree: exit 0, 2904 fast-tier cases, census 'twelve declarations' ✓. NOT-MEASURED, as before: check-plugin-teardown-shape --self-test (shallow clone) and check:dual-build-cjs-loads (needs a full build); CI runs both. PR check-runs on 98a45d6331: 42 success, 0 failure. Every required check is success (Lint & Repo Gates, TypeScript Type Check, Test Core, Build Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate), plus Check PR Size, Lint · PM dispatch-gates, Type Check · debt ledger, Validate Package Dependencies, and v18 → v19 source upgrade = success. Temporal Conformance is skipped. mergeable_state: clean.",
      "mcp_calls": "0 GitHub MCP calls. Other MCP: send_message x1 after this comment.",
      "api_writes": "This round: 1 REST write, this comment (POST /issues/39009/comments via post-stamped.mjs). The PR body is not patched (os-dev.md: the seat writes the body after pr_create); this round's ready text is below. The ready/draft flag is untouched.",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: seat · #39176 (the list's 'protocol 18' answer is 18.6.0's) was not built here, as directed. The fixture is 18.6.0, so T2's protocol18 'read-and-edit' reads 18.6.0's behaviour."
      ],
      "line_budget": "3112 changed lines (+3110 / -2) across 43 files against merge base 7f72b4945f: over the 3000 human-merge line, as reported last round. This round's own change is 9 lines in run.mjs.",
      "deviations": [
        "origin/main was merged after the PR opened, on the seat's order, to run T2 against #39160. AGENTS.md section 10 otherwise allows that only on a conflict, a main-caused red or a queue removal.",
        "The PR body was updated by ready text, not a PATCH, the same route as last round."
      ],
      "files_changed": [
        "packages/qa/upgrade-source/run.mjs (this round)"
      ]
    }

    Ready PR body for #39150: the seat applies it

    The same body as now, minus your signature trailer on its last line (keep yours), with four edits: the 速读 third line, T2's description in the walk list, a §C section that reads "None. T2 runs and passes since #39160", and the two-minute check.

    Fixes #39009
    
    Clause-②: no
    Metadata-protocol: none
    
    ## 维护者速读
    
    - 用户无感:这是一道新的持续集成检查,每次有人改动升级工具、转换条目、存储行转换、校验与构建命令或项目模板时(以及每晚),都会拿一个按 18.6.0 真实用户形状搭好的项目和它的数据库,完整走一遍升级到 19 的流程,并逐项报告结果。
    - 属于 19.0.0 正式版跟踪卡里"重点解决 18 升 19 的升级"这一部分:之前五个升级缺陷都通过了各自的单元测试,只靠人工验收才发现,这道检查把那次人工验收变成每次都自动跑。
    - 这道检查不是必过项,出错只会让它自己变红,不挡任何合并;它等待的最后一张修复卡(迁移工具点名权限集自带的隐藏字段行)已经合入,现在全部检查项都通过,没有预期中的红项,可整体撤回。
    - 本改动涉及工作流目录,且改动行数超过人工审阅线,需要你亲手合并;其余无。
    
    ## What changes
    
    A new, **non-required** workflow, `Upgrade Source Gate` (`.github/workflows/upgrade-source-gate.yml`), walks the v18 → v19 source upgrade a real 18.x user takes, against this checkout's packed tarballs, with no model key. Its `paths:` cover every input the walk runs through, each named by the step that reads it:
    
    - `os migrate meta` / `apply` / `protocol`, the source writer and the schema migration (`packages/cli/**/migrate*`, `packages/cli/src/utils/authored-source-*`, `packages/cli/src/utils/schema-migrate.ts`);
    - `os validate` / `os build` and the protocol-range check (`packages/cli/src/commands/{validate,build,compile}.ts`, `packages/cli/src/utils/protocol-version-gap.ts`);
    - the ADR-0087 conversion table and the chain that replays it (`packages/spec/src/conversions/**`, `packages/spec/src/**/migrations/**`);
    - the stored-row conversion (`packages/metadata-protocol/src/stored-migration.ts`, `packages/metadata-protocol/src/protocol-stored-*`);
    - the template (`packages/cli/src/commands/init.ts`, `packages/create-objectstack/**`);
    - how the walk installs this checkout (`scripts/publish-smoke-pack.mjs`, `.github/actions/setup-workspace/**`);
    - the gate's own files.
    
    It also runs nightly at 04:41 UTC and on `workflow_dispatch`. It is in no required-checks list.
    
    Everything else lives in `packages/qa/upgrade-source/`:
    
    | Path | What |
    |---|---|
    | `fixture-18.6.0/` | An 18.6.0 project shaped like a user's. Scaffolded with `npx create-objectstack@18.6.0 crm18 --skip-skills`, its metadata written with that install's `os generate` and then edited. It holds the blank template's `objectstack.config.ts` with the `exportsOf(…)` wiring unchanged; `crm18_account`, and `crm18_contact` with a master-detail and a lookup to it; list views with `list.bulkActions`; three actions; `crm18_auditor` (View All + Modify All on contacts, plus its own `crm18_contact.salary` row with `readable: false`, the #38924 shape); `crm18_member` (a field row hiding account notes); a validation rule, a record-triggered flow, a dataset, a dashboard; and a committed `access-matrix.json`. `os validate` and `os build` are green on 18.6.0. The object files are `src/objects/{account,contact,note}.ts`, not `*.object.ts`: two platform-objects sweeps import every `*.object.ts` under `packages/`, and `os migrate meta` never reads a file name. |
    | `fixture-db-18.6.0/` | The SQLite database the **published 18.6.0 CLI** wrote for that project, dumped to deterministic SQL text (the 18.0 upgrade-harness fixture's form). Beside it, `manifest.json` (people, records with their seeded values, the stored view, what 18.6.0 served) and `provenance.json` (the exact command, versions and sha256s; the run checks them). |
    | `generate-fixture-db.mjs` | The generator behind the database, as the provenance's exact command. It installs the fixture from the npm registry at 18.6.0, runs `os start` from that install, and populates over HTTP. One step is a Studio-style view save (GET, drop a column, PUT), which stores an overlay row still carrying `bulkActions` (the #38923 shape). |
    | `helper-wiring/` | The second wiring: the same sources behind `composeStacks([createCrmStack(…)])`, the HotCRM shape. It is an overlay laid over a copy of the fixture; its `package.json` is the fixture's under another name, so the type-check coverage walk reads it as a project of its own. |
    | `run.mjs` | The walk and its 30 assertions, plus `--self-test` (43 cases in 13 pinned batteries, with the verdict handshake). |
    
    `scripts/pm/dispatch-gates.self-test.mjs` gains one named row in its census of `no-check-families` declarations: this workflow's, the twelfth.
    
    **The walk.**
    - **P1:** `database.sql` and `manifest.json` hash to what `provenance.json` records.
    - **Template wiring (T1–T11).** Install from tarballs (T1 scans every name in `overrides.json`, as `scaffold-e2e.yml` does). Run the dry run: T11 requires both dry runs to exit 0 with a JSON report, and T2 requires its `ownFieldRowNarrowing` list to name `crm18_auditor`'s `crm18_contact.salary` row, read-and-edit on 18 → hidden on 19. T10 pins the dry run's `applied` set: 12 changes by conversion id and path. Then `--write`, a re-run, the `engines.protocol` range in source, `os validate`, and `os build` under a drift rule: every access-matrix drift line must be a View All Fields gain the migration made.
    - **Data (D1–D4).** `os migrate apply --yes`; `os migrate protocol --to 19 --apply --yes` (the boot names this switch for an 18 database). D3: `--stored` exits 1 with `clean: false` and the view row `servedInvalid` at `list.bulkActions`, pending rewrite. D4: `--stored --apply --yes` rewrites that row.
    - **Boot (B1–B8).** `os start` on the migrated database. The three people sign in with their 18 passwords. Every seeded record reads back with every seeded value. The stored view is served valid, with its stored columns. The auditor reads every contact but no salary, while the owner reads every salary. The auditor's salary edit is refused `403 PERMISSION_DENIED` (the ruled 19 field axis, #34365). The member reads no account notes, while the owner reads them all. The validation rule still answers `400 VALIDATION_FAILED`.
    - **Helper wiring (H1–H6).** H1: `--write` writes, or names with the call that built it, every mechanical change and the range. H2: it exits non-zero exactly when it left one by hand. H3–H5: once the named edits are applied, a re-run reports `applied: 0`, and validate and build pass. H6 pins the 15-change `applied` set.
    
    **How a red is read.** An assertion that waits on a card (`waitsOn`) counts as an expected red only when two things hold. The red must be the failure that card describes; a step that broke another way, such as a dry run exiting non-zero, flags its red unexpected. And the card must read `open` on the GitHub API in this run. Anything else prints as **UNEXPECTED**. A waiting assertion that passes is a **STALE** entry and keeps the run red until its `waitsOn` is dropped. Each red prints `::error::`, and the step summary is a table of all 30.
    
    ## Expected red on current `origin/main` (§C list)
    
    None. T2 runs and passes since #39160 (`7f72b4945f`): the dry run's `ownFieldRowNarrowing` names the auditor's own `crm18_contact.salary` row beside Modify All, `protocol18: read-and-edit`, `protocol19: hidden`. No assertion carries a `waitsOn`. On the merge preview of `98a45d6331`, all 30 pass and the job concludes `success`. A negative control against tarballs packed before #39160 reds T2: `the --json report carries no ownFieldRowNarrowing list`.
    
    ## Tests
    
    - `node packages/qa/upgrade-source/run.mjs --self-test`: `✓ upgrade-source run.mjs self-test: 43 cases in 13 batteries pass.` The workflow runs it first.
    - The whole walk, on this PR's `Upgrade Source Gate` run. The report on #39009 quotes it.
    
    ## Acceptance notes
    
    - **Helper-built wiring (ruled A).** On `composeStacks([createCrmStack(…)])`, `--write` writes 0 of 15 and exits 1. Every site is listed `[helper]`, naming `composeStacks(…)`: the honest refusal #38879 delivered. So H1–H6 assert "every change named with its builder, an honest exit, green once the named edits are applied, the set pinned", not "all written".
    - **Object file names (ruled A).** Explained in the fixture's README. A dot-directory is not an option: `check-affected-docs` pins that no tracked `.ts` under `packages/**` lives in one.
    - **D2 (ruled kept).** `os start` refuses an 18 database with no `adr-0159-form-type-switch` record, and names `os migrate protocol --to 19 --apply --yes`.
    - **The 18.6.0 auth flow seen while generating.** After the first sign-up, self-registration is invite-only. The administrator creates users through `/auth/admin/create-user`, and each must change their password before any read. Sign-ins are rate-limited, so both scripts wait out a 429.
    - **Fixed boot values.** `OS_AUTH_SECRET` and `OS_SECRET_KEY` are published, non-secret values (the key is derived at run time), so any runner can open what 18.6.0 sealed.
    - **Size.** The diff is 3,112 changed lines (`database.sql` is 590 of them, `run.mjs` 943), over the 3,000-line human-merge line. It is one PR on purpose, and Tier H already.
    
    ## Verification
    
    Files to read first, by risk:
    1. `packages/qa/upgrade-source/run.mjs`: `ASSERTIONS`, `EXPECTED_APPLIED`, `verdict()` and `walk()`.
    2. `.github/workflows/upgrade-source-gate.yml`: the `paths:` list, and the absence from any required list.
    3. `packages/qa/upgrade-source/fixture-db-18.6.0/provenance.json`, with `generate-fixture-db.mjs`.
    
    Two-minute check: `node packages/qa/upgrade-source/run.mjs --self-test` prints `✓ … 43 cases in 13 batteries pass.` For the walk, this PR's `Upgrade Source Gate` run summary shows all 30 assertions PASS and `Verdict: GREEN.`
    
    Governed surface: `.github/workflows/**` makes this Tier H, and the maintainer merges it. The workflow does not run named local check families and declares so in its header (`dispatch-gates: no-check-families`), as `scaffold-e2e.yml` does. No published package changes, so the PR is labelled `skip-changeset`.
    
    ---
    _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYnQLxmc8FwPpCabvUr)_
    
    
  9. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnQLxmc8FwPpCabvUr
    os-dev-report

    Fix round 3 (S6, N7, N8). New head 3abccf05748874b7a58231a717c0a721d6d409ca. The upgrade-source job is success: 30 of 30 PASS, Verdict: GREEN. PR checks: 42 success, 0 failure. The PR is still a draft.

    {
      "issue": 39009,
      "status": "done",
      "branch": "claude/issue-39009-upgrade-source-gate",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39150",
      "session": "session_01QSeKYnQLxmc8FwPpCabvUr",
      "premise_still_valid": true,
      "summary": "Fix round 3 on the delta L2 (record 7360724100), one commit: S6 closed, N7 closed, N8 pinned. New head 3abccf0574. The upgrade-source job is success: 30 of 30 PASS, 'Verdict: GREEN.' 42 checks success, 0 failure, 0 pending. The PR stays a draft. No merge of main this round.",
      "deltas": {
        "S6": "paths: gains 'packages/cli/src/utils/own-field-row-narrowing.ts' (T2: ownFieldRowSites and printOwnFieldRowNarrowing; the spec helper it imports, ownFieldRowsBesideModifyAll, is under packages/spec/src/conversions/**, already filtered). For B5/B6, the runtime field axis the boot's reads and writes go through: packages/plugins/plugin-security/src/{permission-evaluator,field-masker,security-plugin-authz-middleware}.ts (the last raises the 'Field write denied' 403 B6 asserts) and packages/core/src/security/effective-object-permissions.ts (viewAllFieldsReadVote / holdsViewAllFields). The workflow has one pull_request leg and no push leg; schedule and workflow_dispatch take no paths.",
        "N7": "The workflow header (lines 20–23) now reads: NOT a required check, and green, with no assertion waiting on an open card, plus how a red would be read. It is still four lines, so the no-check-families marker stays on line 28 and the census row holds; check:pm-dispatch-gates re-run: twelve ✓. The run.mjs header now says a waitsOn assertion would be declared that way, and that none is today. No other comment calls the red intentional; the remaining mentions describe the mechanism conditionally.",
        "N8": "Pinned. T2 now also requires a human-report line naming permission set 'crm18_auditor' and field row 'crm18_contact.salary' (the subject, not the outcome prose, per the no-wording-pin rule). Its FAIL detail says which half, JSON or human, is missing. CI: '…; the human report names the same row'."
      },
      "tests": "Self-test: '✓ upgrade-source run.mjs self-test: 43 cases in 13 batteries pass.' Local walk against the merged-tree tarballs: exit 0, 30 of 30 PASS, 'Verdict: GREEN.' CI on 3abccf0574 (run 46985725333, job 143838765559): 30 PASS, 'Verdict: GREEN.', and T2's detail is 'ownFieldRowNarrowing names crm18_auditor's crm18_contact.salary: protocol18 read-and-edit, protocol19 hidden (1 entry); the human report names the same row'.",
      "gates": "dispatch-gates --commands: 117 families (unchanged). --ran on 3abccf0574: '✓ dispatch-gates --ran: 117 derived famil(ies) accounted for — 115 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)'. All 114 run exited 0. check:pm-dispatch-gates was re-run on this tree, since the workflow changed: exit 0, census twelve. NOT-MEASURED as before: check-plugin-teardown-shape --self-test (shallow clone) and check:dual-build-cjs-loads (needs a full build). PR check-runs on 3abccf0574: 42 success, 0 failure, 0 pending. The required set, plus Validate Package Dependencies, Lint · PM dispatch-gates and v18 → v19 source upgrade, all success.",
      "mcp_calls": "0 GitHub MCP calls. Other MCP: send_message x1 after this comment.",
      "api_writes": "This round: 1 REST write, this comment (POST /issues/39009/comments via post-stamped.mjs). PR body not patched; the deltas against 7360321920's ready text are below.",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [],
      "line_budget": "3124 changed lines (+3122 / -2) across 43 files against merge base 7f72b4945f, still over the 3000 human-merge line. This round added 12.",
      "deviations": [
        "PR body: ready-text deltas only, the same route as the last two rounds."
      ],
      "files_changed": [
        ".github/workflows/upgrade-source-gate.yml",
        "packages/qa/upgrade-source/run.mjs"
      ]
    }

    PR body deltas against the ready text in 7360321920 (the seat applies them)

    Four replacements; the rest of that text stands.

    1. The os validate / os build bullet in the paths list. Replace it with these two bullets:
    - `os validate` / `os build` and the protocol-range check (`packages/cli/src/commands/{validate,build,compile}.ts`, `packages/cli/src/utils/protocol-version-gap.ts`), and the dry run's own-field-row list T2 reads (`packages/cli/src/utils/own-field-row-narrowing.ts`);
    - the runtime field axis B5 and B6 exercise (`packages/plugins/plugin-security/src/{permission-evaluator,field-masker,security-plugin-authz-middleware}.ts`, `packages/core/src/security/effective-object-permissions.ts`);
    
    1. In the Template wiring bullet, replace "and T2 requires its ownFieldRowNarrowing list to name crm18_auditor's crm18_contact.salary row, read-and-edit on 18 → hidden on 19." with:
    and T2 requires its `ownFieldRowNarrowing` list to name `crm18_auditor`'s `crm18_contact.salary` row, read-and-edit on 18 → hidden on 19, and the human report to name the same row.
    
    1. In the §C paragraph, replace "On the merge preview of 98a45d6331" with "On the merge preview of 3abccf0574".

    2. In the Size note, replace "3,112 changed lines (database.sql is 590 of them, run.mjs 943)" with "3,124 changed lines (database.sql is 590 of them, run.mjs 947)".

    With (1), "Its paths: cover every input the walk runs through" holds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:builddomain:devxenhancementpm:dispatchedpriority:p1

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions