Skip to content

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
lex00 merged 1 commit into
mainfrom
fix/2786-steward-answers
Sep 26, 2026
Merged

lex00 merged 1 commit into
mainfrom
fix/2786-steward-answers

Conversation

@lex00

@lex00 lex00 commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

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>.md in 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 in op/steward.ts stays 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-*.md files 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

  • New workspace/answers-ledger.ts reads a kind's answers on the ledger, lays them over the working tree as a RecordSource, 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.
  • askPoint writes to the ledger when a steward asks: steward given (askPointInRun), or the process is a steward's turn (CHANT_STEWARD). That covers chant workspace points ask shelled 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 and askedBy. A new store: "tree" | "ledger" option overrides the default.
  • A question already held on the ledger stays there when it is asked again. points answer writes 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.
  • The points read (and MCP workspace-points) lists ledger questions as part of the answer kind. Without --at it reads them through a new overlay hook on readRecordsFor. With --at it reads a working-branch commit, which the ledger is not part of.
  • QuestionView gains ledger: chant/lifecycle:<path>, which git show reads, or null for a record in the tree. path is still where the record would sit in the kind's directory. The field is added to points.schema.json and points-write.schema.json, additive within contract v1.
  • The local steward's resume and workspace status waiting list read question states through workspacePoints, 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":

  • A steward turn asks a point and git status --porcelain --untracked-files=all stays empty. The record is at chant/lifecycle:_answers/answer/<id>.md, and points --open --json lists it with ledger, validated against points.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.
  • askPoint under CHANT_STEWARD (the shelled-out form) goes on the ledger and names the steward.
  • Outside a steward's turn, the record is still written into the kind's directory.
  • The existing tests that read the steward's record from the tree now read it from the ledger. The full local steward cycle (wait, waiting-on-point, answer, resume) passes unchanged on the ledger.

For arugula-salad/studio#47

queue.mjs's resolveTier can keep asking with chant workspace points ask from 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.
  • eslint on the changed files is clean. Docs prose lint has no regressions, and the diataxis and citation checks are clean.

Docs: guide/decision-points, cli/workspace-points, the read-contract reference, and the fountain Steward page, plus its generated twin.

…answer record on chant/lifecycle, out of the checkout (#2786)
@lex00
lex00 merged commit 56042e7 into main Sep 26, 2026
16 of 18 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.

A decision point asked in a steward's turn writes its answer record into the checkout's working tree

1 participant