Skip to content

Studio map: the Map text review asks "still true?" of text a PR left unchanged #687

Done
2 of 2 issues completed

Description

@danielrispler

Part of #474 (Map & README Roadmap), resolving #619. Decisions: #619 decision (Q1 to Q3); Q4 (trust laws in) and the outside note are below and in the grilling folder, local-evidence/2026-11-26-issue-619-unchanged-map-text/reports/decisions.md. Figures: estimate.txt there, from est.py (system-map touched over the last 30 merged PRs at 930ca6d).

Problem Statement

A PR can change what a part's code does and leave the part's map text false, and nothing says so. The Map text review (spec #634) checks only map text the PR added or changed. Most PRs change no map text: of the last 30 merged PRs, 23 changed files a part owns and 17 of those left system-map.json alone, so the review checked nothing on them. A sentence such as "Sandboxed runs on your click" stays on the map after a PR makes runs start by themselves, and Daniel reads it on the map, on the part's sheet and in every catch-up and brief built on it. system-map check checks structure, not meaning, and the staleness bands measure Daniel's attention, not the code.

Solution

The Map text review also asks "still true?" of a narrowed set of unchanged text on each part whose owned files the PR changed: the part's purpose and caption, the held items whose paths the PR changed (and those with no paths), the reasons of the links at the part, and the laws on trust on the part or on those links. These "still-true items" are reviewed at the PR's head in the same run as its changed items, by the same agent, with the same verdicts.

Only flags show. A still-true item the review supports shows nothing anywhere, so a PR with no drift looks as it does today. A flagged one becomes a Still true? row in the brief's Ratify step, with the review's why and cites. A flag means "this text is false at this PR's head", whether this PR or an earlier one made it false.

User Stories

  1. As Daniel, I want the review to check the sentences of a part whose code my PR changed, so that a sentence the PR made false is caught before I merge.
  2. As Daniel, I want this on PRs that change no map text, so that the common PR is covered, not only the rare one that edits the map.
  3. As Daniel, I want the check narrowed to the held items whose files changed, so that a PR touching one file of a part is not charged for every held item of it.
  4. As Daniel, I want a held item with no paths checked whenever its part's files changed, so that a part-wide sentence is not skipped for having no paths.
  5. As Daniel, I want the reasons of the links at a touched part checked, so that a changed dependency's stated reason is caught too.
  6. As Daniel, I want the laws on trust of a touched part and of its links checked, so that a law nothing tests is held to the code.
  7. As Daniel, I want laws backed by a check left out, so that the review does not spend tokens on what a test already guards.
  8. As Daniel, I want a supported still-true item to show nothing, so that Ratify stays a short list of things worth my look.
  9. As Daniel, I want a flagged still-true item as a "Still true?" row in Ratify, so that I see it where I already decide on the PR's map.
  10. As Daniel, I want the row to say why and cite the lines, as a flagged changed item does, so that I can judge it without re-reading the part.
  11. As Daniel, I want Overturn on the row to copy a prompt that asks an agent to correct that sentence, so that I can fix drift in one paste.
  12. As Daniel, I want Accept on the row, so that I can record that I looked and keep the sentence.
  13. As Daniel, I want an accepted still-true row not offered again on that PR while the code it was judged on is unchanged, so that I don't decide twice.
  14. As Daniel, I want a flag for drift an earlier PR caused, so that I learn of a false sentence while I'm working on its part.
  15. As Daniel, I want a push that changes the part's files again to re-check its still-true items, so that a verdict never outlives the code it judged.
  16. As Daniel, I want a push that leaves those files alone to reuse the verdicts, so that I don't pay twice for the same judgment.
  17. As Daniel, I want an item the PR both changed and that is on a touched part reviewed once, as a changed item, so that nothing is asked twice.
  18. As Daniel, I want the still-true items to ride in the same run as the changed items, so that a PR that edits the map pays the fixed cost of a run once.
  19. As Daniel, I want a PR whose only items are still-true items to start its own review when its brief is stored, as my PRs do today, so that no click is needed.
  20. As Daniel, I want a stranger's PR reviewed only on "Review map text", offered as today only when it changed map text, its still-true items joining that run, so that no run starts on a stranger's PR without my click.
  21. As Daniel, I want "Reviewing map text…" shown only on a PR with a changed item, so that a quiet still-true review on a no-drift PR adds no line to it.
  22. As Daniel, I want a still-true review that fails to say so with Run again, so that a check that never ran is not mistaken for no drift.
  23. As Daniel, I want each head's review to stay one run, so that the cost and duration of a map-review line in background-runs.jsonl are that head's review, read with no new record.
  24. As Daniel, I want a still-true item whose id the review does not take skipped, so that the safety rule on ids covers still-true items too.
  25. As Daniel, I want the prompt to hold only ids for still-true items too, never their text, so that the review's trust rules don't change.
  26. As Daniel, I want the agent told which items are still-true checks, so that it judges them against the code at the head, not against the PR's diff alone.

Implementation Decisions

  • Modules. map_review (server) does the work. system-map gains a public function that says which of a part's held items a list of changed files reaches, by the map's own path patterns. ratify takes the new item kind. The page's Ratify rows (map-brief, ratify, map-ratify) and the wire types (ui/types.ts, kept in step by the wire test under the law wire-types-agree) change with the view. The behaviour docs for the Map text review and Ratify, and system-map.json's held item for background runs, follow.
  • Touched parts. A part is touched when the PR changed a file it owns, by the map at the PR's head, the same placement the PR brief and Guard with a law use. Files the map ignores or no part owns touch nothing.
  • The still-true items of a touched part: part:<id>/purpose and part:<id>/caption; held:<part>/<n> for each held item whose paths hold a file the PR changed, or that has no paths; link:<id>/reason for each link with the part at either end; law:<id>/text for each law with "backing": "trust" on the part or on one of those links (not on a flow). The part's name is left out: a name is not a claim. An item with empty text is left out. An item the PR changed is a changed item, never also a still-true item. A still-true item whose id the review does not take (takes) is skipped and not counted in "left out": the head's map check already names such an id, and a still-true item must never bring the Ratify step by itself.
  • Kind on the item. A review item carries a kind, changed or still-true. The prompt lists the two kinds under their own headings; for still-true items the instructions say the text was not edited by the PR and is judged against the code at the head. The answer's shape and the four verdicts are unchanged.
  • The verdict key of a still-true item is its id, a hash of its text, and a hash of the head's blob ids of the touched part's files the PR changed, in path order (for a link, of both ends' changed files; for a law on a link, of the link's). A file the PR deleted enters as its path and "deleted". A push that changes those files again misses the key and the item is reviewed again; a push that changes only other files reuses it. Changed items keep today's key (id and text hash).
  • One run per head. A head's changed and still-true items go to one run, the unjudged ones only, as today. The run's limit stays 10 minutes. No cap on items: the largest of the last 30 PRs had 59, under the chery reviewer's 173 in 4.1 minutes.
  • When it runs. Unchanged rules but for the item set: when a brief is stored at a head with any unjudged item and the PR is by Daniel's own login. A stranger's PR is reviewed only on "Review map text", which is offered, as today, only when the head has a changed item; its still-true items join that run. A PR that gets no brief gets no review: one that fogs nothing at Daniel's tiers and whose Map diff is empty.
  • What the page reads. pr_map_review's view gains the still-true verdicts that are flags, each with its id, verdict, why and cites, and with its display name and its text as the head's map has them, read by the server (the page holds only the default branch's map, whose held items may be in another order). Supported still-true verdicts are not sent. The review's line at Ratify's head counts changed items as today. When the only items are still-true ones, a run in progress and a finished review with no flag show nothing and bring no Ratify step; a failure shows its line with Run again, as today.
  • Still true? rows. Each flagged still-true item is a row in the Ratify step, titled by its kind and the map's name for it (the part's name and "purpose", the held item's name, the link's ends, the law's id), with the flag's popover as for a flagged changed item: the verdict, the why, the cites and the copy icon. A flag adds a Ratify step to a brief that had none.
  • Accept and Overturn. The row is a ratify item of kind still-true, its id the review item's id joined to its verdict key, so a push that re-judges it is a new item, offered again only when flagged anew. Accept records that Daniel looked and keeps the text. Overturn records it and copies a prompt, as Overturn does: the PR and its branch while open, the item's id, its text at the head and the flag's why and cites, asking the agent to correct the map text to what the code does, or the code when the text states the intent.
  • Stored record. The PR's review file keeps still-true verdicts beside the changed ones, with their kind and key; a file without the new fields reads as today (the reader ignores what it does not know, and a missing kind is changed).

Testing Decisions

  • One seam: map_review's public surface, driven as server/tests/map_review.rs drives it today, through the runner's real launcher with a fake harness and a fake gh, on a local origin's refs/pull/<n>/head. Tests assert the items a head yields, what the prompt asks, what is kept and what view returns, never private functions.
  • Cases: a PR that changes a part's file and no map text yields that part's purpose, caption, the held item on that file, a held item with no paths, its link reasons and its trust law, and not its name, its other held items or its check-backed law; an item the PR changed shows once, as changed; a second head that changes the same file again reviews its still-true items again, and one that changes another part's file reuses them; a supported still-true item is not in the view; a flagged one is; a stranger's PR starts nothing until requested; a record file from before this spec reads with its verdicts.
  • The Ratify step's rows: a snap fixture beside mapBriefReviewFlag, with a flagged still-true row and its popover, and one with a brief that gains a Ratify step only from such a flag.
  • The brief that loses its Ratify step while open: on a PR whose only items are still-true ones, the brief is open on a failed review's Ratify step and Run again is pressed. A running still-true-only review brings no Ratify step, so the step goes, and the brief stays open on its new last step. A test in ui/tests/map-brief.test.mjs drives this through the review's state, not the player alone, beside the player's own case (ui/tests/map-brief.test.mjs:347 at 5549372: the clamp of 5ddd6f7, Studio map: the Map diff and the Map text review (Step 4 of #474) #634's review, round 2, A). Its mirror is tested too: a still-true-only review that ends with a flag while the brief is open adds the step and redraws the dots. This is the test Workflow: /to-tickets slices by risk, and Risky UI names a mechanism, not a condition #695's Risky UI asks of a new condition fed to an existing mechanism, and what keeps the page ticket on medium.
  • The real cost is read after merge from background-runs.jsonl on Daniel's first PRs; no test measures it.

Out of Scope

  • A second review at the PR's base to tell new drift from old (Q3).
  • Showing supported still-true items, or a "Map text checked, no flags" line on a PR with no flag (Q2).
  • A brief for a PR that fogs nothing and changes no map text, so it gets no still-true review.
  • Checking a touched part's name, its flows, or laws backed by a check.
  • Checking parts the PR did not touch, or the whole map on a timer.
  • Changing the staleness bands or part catch-ups.

Further Notes

  • Cost is estimated, not measured. background-runs.jsonl gives each run's kind, cost and duration (no PR, no item count); one run per head makes a map-review line one head's review. A run pays a fixed cost (Claude Code's prompt and tools, reading system-map.json) before any item, so expect tens of thousands of tokens on a PR whose only items are still-true ones. Read it from background-runs.jsonl after the first PRs, and revisit the narrowing if it is too high.
  • From the last 30 merged PRs: a median of 8 part items and 1 link reason per touched set, at most 59 (Studio map: the Map diff and the Map text review (#634) #657); the narrowed set is smaller still.

Made without Daniel

Passed in his veto summary on 2026-11-26:

  • A Still true? row has Accept and Overturn like any Ratify row; Overturn copies a correction prompt.
  • A failed still-true review shows its line and Run again; a running one and a finished one with no flag show nothing.
  • A stranger's PR keeps today's rule: "Review map text" is offered only when it changed map text.
  • Laws on trust on the part and its links are checked, not on flows; part names are not checked.
  • A held item with no paths is checked whenever its part's files changed.
  • A still-true verdict is keyed on its text and the touched files' blobs at the head.
  • A PR that gets no brief gets no review.
  • No cap on items per run.

Critic: one round by Gemini; 10 findings fixed, none rejected (grilling folder, reports/critic.md).

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added
    ready-for-agent
    on Nov 26, 2026
  2. danielrispler commented on Nov 26, 2026

    @danielrispler
    OwnerAuthor

    Route draft: #697 strong·high → strong·high — unchanged
    Route draft: #698 medium·medium → medium·medium — unchanged

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions