You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
workspace: migrations and chant workspace upgrade (phase 5) #2550
Status: part 1 merged in #2610 (8fe17eb). chant workspace upgrade <scope> works for the . scope and vendor scopes. It fetches, rebuilds the merge base offline, migrates in a separate worktree, merges per file, runs build, lint and chant workspace check, then gates on the patch digest. That PR also added migrations (.chant/migrations/*.json in the template), chant workspace check and the proposeWorkspaceUpgrade activity. Still open: member scopes, which wait on #2534 (PR #2593). Scopes made by init --template are refused, because chant can't rebuild their base offline.
Migrations are data with an optional marked code body; a gap in the chain is refused
met
lineage-migrations.ts (closed list of declarative steps or a marked module; a gap in the migration chain error), lineage-migrations.test.ts, reference/template-migrations.mdx
A customised file with any conflicting hunk becomes one manual step
met
lineage-merge.ts three-way merge per file; lineage-upgrade.test.ts, workspace-upgrade.e2e.test.ts
Build, lint and workspace check run in the worktree before the gate
met
lineage-upgrade.ts runs them in the .chant/upgrade/ worktree, then gates on the patch digest (WORKSPACE_UPGRADE_GATE_OP)
Governance changes are gated by the rules at HEAD
met
lineage-upgrade.tsGovernanceChange, described in workspace-upgrade.mdx "Governance changes" (Op files, chant.config.*, chant.workspace.json, CI workflows)
Open manual steps fail check
met
chant workspace check fails on open manual steps (#2610)
the chant repo has no lineage lock and was not made from a template. Member scopes, which would cover its members, are not supported yet, although #2593 is merged
Level 0 is unaffected, or the change is on #2525's exception list
not met as written
#2610 changed level-0 code outside the exception list: lifecycle/git.ts now runs git ls-tree --full-tree for ledger reads and writes, so a project in a repository subdirectory gets different (corrected) ledger behaviour, and cli/handlers/operator.ts and op/gate-name.ts gained a workspace-upgrade gate name. The text of chant approve for other Ops is unchanged. test/level0-goldens/level0-ledger.test.ts has no subdirectory case, so nothing covers the --full-tree change
Remaining: member scopes (unblocked since #2593), scopes made by init --template (refused today because the base cannot be rebuilt offline), the chant-repo criterion, and a decision on the --full-tree change, either adding it to the exception list or adding a golden.
Closes with #3085. Criteria against the 2026-09-30 audit:
Member scopes: met. chant workspace upgrade <member> runs from the workspace root, finds the member in chant.workspace.json by name or directory, and upgrades it from its own lock. The gate and proposal branch use the member's name. A patch outside the scope and its lock is refused. A member with no lock is refused with the reason. Scopes made by init --template stay refused, now with the reason (no versioned source, and no offline merge base). Decision: ws-072.
Works on the chant repo: the chant repo has no lineage lock and cannot have one honestly. Nothing in it was instantiated from a template (init --from or init --template) or vendored (no vendor.json, no .chant/workspace.lock.json). reference-workspace/ and the lexicons' initTemplates are template sources that live in it, not copies made from one. A lock invented for it would record a source that never existed. So the upgrade has nothing to act on there, which counts toward the epic's "chant repo runs at every shipped level" criterion as: lineage applies to the chant repo's members only when one is made from a template, and none is. The chant repo's own chant.workspace.json is unchanged. Member scopes now work for any future member that is made from a template.
Level 0: the audit's concern was feat(workspace): chant workspace upgrade, template migrations and the propose-only activity (#2550) #2610's --full-tree ledger change and the gate-name addition. The --full-tree change is on the level-0 exceptions page and level0-ledger.test.ts holds the subdirectory case, so the criterion is met. Upgrade on a plain project with a lock (no chant.workspace.json, project in a repository subdirectory) is covered by workspace-upgrade.e2e.test.ts and works, and the level-0 goldens pass unchanged.
The reference workspace gets a member-scope case in test/reference-workspace.test.ts; its README says what the design client's lock will do.
Activity
feat(workspace): chant workspace upgrade, template migrations and the…
lex00 commentedon Sep 24, 2026
Status: part 1 merged in #2610 (8fe17eb).
chant workspace upgrade <scope>works for the.scope and vendor scopes. It fetches, rebuilds the merge base offline, migrates in a separate worktree, merges per file, runs build, lint andchant workspace check, then gates on the patch digest. That PR also added migrations (.chant/migrations/*.jsonin the template),chant workspace checkand theproposeWorkspaceUpgradeactivity. Still open: member scopes, which wait on #2534 (PR #2593). Scopes made byinit --templateare refused, because chant can't rebuild their base offline.lex00 commentedon Sep 30, 2026
Audit 2026-09-30 against main 1c1a04a
Part 1 is on main: #2610 (8fe17eb).
lineage-migrations.ts(closed list of declarative steps or a marked module; agap in the migration chainerror),lineage-migrations.test.ts,reference/template-migrations.mdxlineage-merge.tsthree-way merge per file;lineage-upgrade.test.ts,workspace-upgrade.e2e.test.tsworkspace checkrun in the worktree before the gatelineage-upgrade.tsruns them in the.chant/upgrade/worktree, then gates on the patch digest (WORKSPACE_UPGRADE_GATE_OP)lineage-upgrade.tsGovernanceChange, described inworkspace-upgrade.mdx"Governance changes" (Op files,chant.config.*,chant.workspace.json, CI workflows)checkchant workspace checkfails on open manual steps (#2610)lifecycle/git.tsnow runsgit ls-tree --full-treefor ledger reads and writes, so a project in a repository subdirectory gets different (corrected) ledger behaviour, andcli/handlers/operator.tsandop/gate-name.tsgained a workspace-upgrade gate name. The text ofchant approvefor other Ops is unchanged.test/level0-goldens/level0-ledger.test.tshas no subdirectory case, so nothing covers the--full-treechangeRemaining: member scopes (unblocked since #2593), scopes made by
init --template(refused today because the base cannot be rebuilt offline), the chant-repo criterion, and a decision on the--full-treechange, either adding it to the exception list or adding a golden.feat(workspace): upgrade a member made from a template from its own l…
lex00 commentedon Oct 1, 2026
Closes with #3085. Criteria against the 2026-09-30 audit:
chant workspace upgrade <member>runs from the workspace root, finds the member inchant.workspace.jsonby name or directory, and upgrades it from its own lock. The gate and proposal branch use the member's name. A patch outside the scope and its lock is refused. A member with no lock is refused with the reason. Scopes made byinit --templatestay refused, now with the reason (no versioned source, and no offline merge base). Decision: ws-072.init --fromorinit --template) or vendored (novendor.json, no.chant/workspace.lock.json).reference-workspace/and the lexicons'initTemplatesare template sources that live in it, not copies made from one. A lock invented for it would record a source that never existed. So the upgrade has nothing to act on there, which counts toward the epic's "chant repo runs at every shipped level" criterion as: lineage applies to the chant repo's members only when one is made from a template, and none is. The chant repo's ownchant.workspace.jsonis unchanged. Member scopes now work for any future member that is made from a template.--full-treeledger change and the gate-name addition. The--full-treechange is on the level-0 exceptions page andlevel0-ledger.test.tsholds the subdirectory case, so the criterion is met. Upgrade on a plain project with a lock (nochant.workspace.json, project in a repository subdirectory) is covered byworkspace-upgrade.e2e.test.tsand works, and the level-0 goldens pass unchanged.test/reference-workspace.test.ts; its README says what the design client's lock will do.