Repository navigation
fix(workspace): a decision point asked in a steward's turn keeps its answer record on chant/lifecycle, out of the checkout (#2786) - #2792
Merged
Conversation
…answer record on chant/lifecycle, out of the checkout (#2786)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2786. Part of #2715 and #2731.
The decision
Of the two options in the issue, this takes the ledger. A question asked in a steward's turn is written on
chant/lifecycle, under_answers/<kind name>/<id>.mdin the ledger of the member that owns the answer kind. The file is the same Markdown record the kind's directory would hold, written with git plumbing like every other ledger write. The steward rule inop/steward.tsstays as it is, and now lists answer records among the steward's ledger writes.The working tree option would have kept the kit's untracked
answers/slice-tier-*.mdfiles and needed the rule amended. With the ledger, the question also outlives the Op's leased worktree, so the kit no longer has to ask in the checkout to keep it.What changes
workspace/answers-ledger.tsreads a kind's answers on the ledger, lays them over the working tree as aRecordSource, and writes one with a compare-and-set on its blob. The branch is fetched first when it fast-forwards, and pushed afterwards on a best-effort basis, as the lease history is.askPointwrites to the ledger when a steward asks:stewardgiven (askPointInRun), or the process is a steward's turn (CHANT_STEWARD). That coverschant workspace points askshelled out from an Op's step, which is how the kit asks. Before this change, such a shelled-out ask did not record the steward either. It now names the steward in the source block andaskedBy. A newstore: "tree" | "ledger"option overrides the default.points answerwrites people's answer back there too, so answering through hud inside a box leaves the checkout alone as well. If the same id exists in both places, the ledger copy wins.pointsread (and MCPworkspace-points) lists ledger questions as part of the answer kind. Without--atit reads them through a newoverlayhook onreadRecordsFor. With--atit reads a working-branch commit, which the ledger is not part of.QuestionViewgainsledger:chant/lifecycle:<path>, whichgit showreads, or null for a record in the tree.pathis still where the record would sit in the kind's directory. The field is added topoints.schema.jsonandpoints-write.schema.json, additive within contract v1.workspace statuswaiting list read question states throughworkspacePoints, so they pick up ledger questions with no change of their own.The issue's check
op/steward-points.test.ts, new describe "a steward's question stays out of the checkout":git status --porcelain --untracked-files=allstays empty. The record is atchant/lifecycle:_answers/answer/<id>.md, andpoints --open --jsonlists it withledger, validated againstpoints.schema.json. Asking again reuses it. A person's answer goes back on the ledger with the checkout still clean. The next steward turn reads the answer.askPointunderCHANT_STEWARD(the shelled-out form) goes on the ledger and names the steward.waiting-on-point, answer, resume) passes unchanged on the ledger.For arugula-salad/studio#47
queue.mjs'sresolveTiercan keep asking withchant workspace points askfrom the Pick step. That step runs in a steward's turn, so the question now lands on the ledger. It can ask from any directory in the repository, including the leased worktree, since worktrees share the branch.Checks
vitest: points, decide, read-contract, reason-codes, status-contract,op/steward-points,op/steward,op/work-lease-run,cli/mcp, the records suites, the boundary roster and systemone: 488 passed. The one failure,work-lease-run"a lease lost mid-step", was a timing flake at load average 15, and it passes on its own.npx tsx scripts/typecheck.ts: 31 known failures, no regressions.Docs: guide/decision-points, cli/workspace-points, the read-contract reference, and the fountain Steward page, plus its generated twin.