Public: anyone can read this; the crew can change it.
When an admin lands a vision pull, only the fenced vision block of the direction is rewritten, and the owner's own words are kept word for word #6230
Check · Review · Land · Live done — Landed and live in production.
When an admin lands a vision pull, the repository's direction now gains or refreshes a fenced block, and the owner's words outside it stay untouched. The new tests, `vision-pull`, `merge-actors` and the event-audience coverage tests pass, and `tsc` and the design lint are clean. I did not run the whole suite; the forge's check does that on push.
shipped production is serving it deploy 18f765b
When an admin lands a vision pull, the repository's direction now gains or refreshes a fenced block, and the owner's words outside it stay untouched. The new tests, vision-pull, merge-actors and the event-audience coverage tests pass, and tsc and the design lint are clean. I did not run the whole suite; the forge's check does that on push.
What changed
- Vision pulls:
mergePullcallslandVision(src/crew/vision.ts) after the merge. It acts only when the pull's placement marks it as a vision pull (isVisionPullinsrc/core/placements.ts). A branch namedvision-…without that placement is ignored. - Admin merge: if the merger
canAdminthe repository, the block between<!-- forge:vision:start -->and<!-- forge:vision:end -->is regenerated from the landed VISION.md. It holds the purpose, the order-of-work names and the rules.
- It writes as the merger only, never as autonomyBy.
- With no block yet, one is appended after the owner's text.
- Everything outside the block is kept byte for byte.
- The whole direction stays at or under 2,000 characters. Rules are dropped from the end first; if the owner's text leaves no room, nothing is written.
- A repo.settings_updated event lists autonomyDirection when the direction changed.
- Orphan marker: a start marker without an end, a duplicated marker or a reversed pair leaves the direction unchanged and logs why.
- Non-admin merge: the direction is unchanged and no comment is posted. A
repo.vision_keptevent is written, classified as visible to readers. The pull page renders it in the conversation as the forge's own line ("the forge kept the repository's direction as it was: only an admin's merge rewrites it"). - Tests:
test/vision-land.test.tscovers an admin merge with the owner's text before and after the block, a writer merge, an orphan start marker, a reversed marker pair, avision-branch with no placement, the 2,000-character bound, and the forge's line on the pull page.
Not done
- There is no event or page line for an orphan marker; it is only logged, as the issue asked.
- The block is regenerated on every admin vision merge, not only when VISION.md changed.
- There is no settings-page control for the block.
To try it
- Put a thought through triage so it opens a vision pull.
- Merge that pull as a repository admin.
- The direction in settings now ends with the fenced block.
- Merge another vision pull as a writer who isn't an admin, and the pull page shows the forge's line.
Does what the issue asks: only the fenced block is rewritten, the owner words stay byte for byte, a placement (not a branch name) marks a vision pull, orphan or reversed markers leave the direction alone, and a non-admin merge writes a reader-visible repo.vision_kept event that the pull page shows through the existing tlEvent component. Tests would fail without each behaviour. Two things I would do next: (1) the 2000-character DIRECTION_LIMIT is a literal in crew/vision.ts; export it from the settings validator so the two cannot drift. (2) The forge kept-the-direction line has no terminal equivalent; confirm the tty pull view lists repo.vision_kept events, and note in the README how the block works. Also isVisionPull scans placement with LIKE on every merge; fine now, index it if placements grow.
When an admin lands a vision pull, the repository's direction now gains or refreshes a fenced block, and the owner's words outside it stay untouched. The new tests,
vision-pull,merge-actorsand the event-audience coverage tests pass, andtscand the design lint are clean. I did not run the whole suite; the forge's check does that on push.What changed
mergePullcallslandVision(src/crew/vision.ts) after the merge. It acts only when the pull's placement marks it as a vision pull (isVisionPullinsrc/core/placements.ts). A branch namedvision-…without that placement is ignored.canAdminthe repository, the block between<!-- forge:vision:start -->and<!-- forge:vision:end -->is regenerated from the landed VISION.md. It holds the purpose, the order-of-work names and the rules.- It writes as the merger only, never as
autonomyBy. - With no block yet, one is appended after the owner's text. - Everything outside the block is kept byte for byte. - The whole direction stays at or under 2,000 characters. Rules are dropped from the end first; if the owner's text leaves no room, nothing is written. - Arepo.settings_updatedevent listsautonomyDirectionwhen the direction changed.repo.vision_keptevent is written, classified as visible to readers. The pull page renders it in the conversation as the forge's own line ("the forge kept the repository's direction as it was: only an admin's merge rewrites it").test/vision-land.test.tscovers an admin merge with the owner's text before and after the block, a writer merge, an orphan start marker, a reversed marker pair, avision-branch with no placement, the 2,000-character bound, and the forge's line on the pull page.Not done
To try it
Closes #5834