ADR-0032: The write-intent MCP tool surface — two tools onto one ProposalService, and writeTools flips with the first registration
- Status: proposed
- Date: 2026-09-12
- Deciders: Theurian maintainers
- Requirements: FR-I3, SEC-11, SEC-12, SEC-17, INV-7, INV-8, T-3, T-12
- Situates against ADR-0013 (the tools this ADR opens are the ones it named), ADR-0026 (capability honesty — a flag may not be flipped ahead of the feature), ADR-0027 and ADR-0028 (the accept path and the local location these tools inherit), ADR-0031 (SEC-12, this surface's precondition) and ADR-0034 (T-15, the other precondition)
This ADR records a decision and ships no code. No tool registers, no schema
is written, no flag moves, no test lands; the diff is confined to docs/. What
each implementation slice owes is named in Compliance.
Every repository fact below was measured on 2026-09-12 against be977ea7,
which is reachable from origin/main. Where a fact is a population, the key is
stated beside the number so a reader can attack the key and not only the count.
Amended by GHSA-v2qg-23fc-7fqp (2026-10-01). Implementing decision 1 as written gave
knowledge.proposeChangea way to lower an item's sensitivity, the effect decision 3 meant to keep off this surface. It also gave it, andtheurian propose, a way to readmit a retired item, the effect decision 3 pulledrestoreItemto keep off it. The fix moves this record in the places listed below. The block sits here, above Context, because those places span Decision, Consequences and What this does not close; the paragraphs themselves stand as they were accepted.What implementing it revealed. A content update is not neutral about an item's labels.
KnowledgeItem.with_revision(domain/knowledge.py) gives the item the status, owner, trust level, sensitivity, namespace and kind of the revision anupsertRevisionlands, so a revision that leaves a label out does not leave the item's label alone. The loader reads an absentsensitivityasinternaland an absenttrustLevelasunverified, and the drafter wrote an absentnamespaceas the item id's own prefix. Under decision 1's rows:
- an update that omitted
sensitivityturned aconfidentialiteminternal, and the migration a reviewer approved said nothing about it. Over the wire this needs the item in the caller's view, so a serving ceiling raised toconfidential;- an update that named
sensitivity: publiclowered aninternalitem, in the default configuration;review.generateKnowledgeCandidatenamedinternalon every update;theurian proposedrafted the same way asknowledge.proposeChange; andtheurian propose acceptlanded all of it;- every revision the drafter wrote said
status: approved, so a merged update put adeprecated,supersededorrejecteditem back in the served set,rejectedincluded: throughtheurian proposefor any retired item, and over the wire for one acreateItemmade and nothing revised, whose first revision is the call the wire lookup'sNonelets through.What moves:
- Decision 1, the
namespace?andtrustLevel?/sensitivity?rows. "Absent defaults to the item id's own" and "absent means 'not stated'" now hold only for an item the drafter's lookup does not find — on the CLI, one no landed migration creates; over the wire, also one the caller may not see (the decision 6 item below) — where there is no label to keep and #249's reasoning stands. For an item it finds, an omittedsensitivity,trustLevelornamespaceis the item's current value, and the drafter writes it into the migration, so the reviewer reads the label the item will hold. That is every update, and also the first revision of an item acreateItemmade and noupsertRevisionhas revised: such an item already holds labels, and its first revision would replace them with the loader's defaults exactly as an update would. That first revision still takes noexpectedRevision, because_check_expected_revisionkeys on the revision and not on the item, so theexpectedRevision?row stands as written. Of the three labels, only the namespace rewrite was visible in the diff before; the other two changed silently. A label the caller names still wins, with the one exception in the next item.- Decision 3's reason for pulling
changeSensitivity. "V1 does not carry it" was true ofknowledge.generateMigrationDraftand false of the surface:knowledge.proposeChangereached the same effect throughupsertRevision'smetadata, the operation decision 3's table classifies only as Moves content. The reason stands — a declassification widens who may read an item by an amount the reviewer cannot see — and it now holds on every proposal path.ProposalService.draft— whichtheurian propose,knowledge.proposeChangeandreview.generateKnowledgeCandidatecall;generateMigrationDraftdrafts throughdraft_from_documentand carries neitherchangeSensitivitynorupsertRevision— refuses a draft that names a sensitivity below the current one of an item its lookup returns, with a remedy naming the one declassification path: a hand-authoredchangeSensitivitymigration under.theurian/migrations/. The CLI's lookup returns any item the landed set holds; the MCP tools' returns one the caller may see (the decision 6 item below). Over the wire an item outside the caller's view is answered as an id nothing created is, so a lower sensitivity named for it is not refused at draft, and theacceptfloor below is what refuses it.review.generateKnowledgeCandidate'sinternalis the candidate type's default, not a statement, and its request says so (ProposalRequest.sensitivity_is_default, which only that path sets): for an item the lookup finds, the drafter drops it, so the candidate inherits the item's sensitivity rather than meeting the refusal — on an update, where the request names none anyway, and on the first revision of a create-only item, where it namesinternal(ADR-0033's matching amendment). A sensitivity named throughknowledge.proposeChangeortheurian proposeis compared.theurian propose acceptrefuses any proposal after whose replay with the landed set an existing item holds a lower sensitivity than the landed set alone gives it, whichever operation moved the label. That covers a proposal drafted before this fix with the key omitted, one whosesensitivitywas edited by hand, one whose migration sorts after a later reclassification, and one carrying achangeSensitivityof its own. The comparison needs the landed set to replay on its own. When it replays only together with the proposal — as when the proposal creates an item that a landedchangeSensitivitysorting after it reclassifies —accepthas no labels in place to compare against, so it refuses with that reason and moves nothing. The refusal carries the replay engine's own words, and its remedy is to read what they name in.theurian/migrations/and make the set replay on its own —theurian migrate applyruns the same replay;theurian migrate validatestill reports such a set valid, because its verdict does not rest on a replay, and itspermissiveMovesUnavailablesays the set does not replay (test_permissive_move_report.py::test_validate_on_a_set_that_does_not_replay_stays_valid_and_says_the_report_is_unavailable) — then accept again. A lowering's remedy names one step per cause:theurian migrate applywhen the served state lags the landed migrations, which is how a draft made over the wire comes to carry a stale label; otherwise a new draft naming the item's current sensitivity or omitting it; and, to lower the label, the hand-authoredchangeSensitivity. It also says that once that migration lands, the update is drafted again withtheurian proposerather than this proposal accepted again, because the proposal's migration id predates the migration and replays before it. Review found the lowering remedies without that clause, which the readmission remedy already carried; it is nowitem_labels.DRAFT_AGAIN_CLAUSE, inACCEPT_LOWERING_REMEDYand in_floor_refusal's remedy for a proposal that readmits every item it lowers (test_floor_refusal_remedy.py::test_every_remedy_that_sends_the_reader_to_a_migration_says_to_draft_again_not_accept_again). Since the re-check's fix wave below, the clause also says to edit that migration's id into the new draft'sdependsOn: at first only if that migration declareddependsOn, and since the fix wave's id-order finding whatever it declares, because onlydependsOnplaces the new draft after it.- Decision 3's reason for pulling
restoreItem. "restoreItemis pulled, because it readmits from any status" —rejectedincluded, with no transition check — and pulling it kept readmission off the surface. That was true ofknowledge.generateMigrationDraftand false of the surface:knowledge.proposeChangereached readmission throughupsertRevision'smetadata.status, which the drafter always wrote asapproved, for a create-only retired item, andtheurian proposereached it for any retired item. The reason stands, and it now holds on every proposal path.ProposalService.draftrefuses to draft for an item its lookup returns retired (_refuse_a_retired_item), in one constant message that names no status, with a remedy naming the one readmission path: a hand-authoredrestoreItemmigration under.theurian/migrations/. Only the CLI's lookup returns a retired item, so the refusal reachestheurian proposeandtheurian okf import. An import never namesexpectedRevision, so the cheap revision check refuses a retired item with a revision first; on that refusal path one replay then finds it retired, and the retired refusal is whatdraftraises, as fortheurian proposewith a missing or stale--expected-revision(the decision 6 item below). Measured on 2026-10-02 by a spy onProposalService.draftunderokf import; the import's refusal record names onlyProposalError, so its output is the same either way. A create-only retired item meets the check without that first refusal. Over the wire the refusal is unreachable by construction: decision 6's lookup answersNonefor a retired item, so the tools answer it as an id nothing created, andacceptis where a draft for it is refused.theurian propose acceptrefuses any proposal after whose replay with the landed set an item the landed set alone leaves non-surfaceable —deprecated,supersededorrejected— is surfaceable —approved,draftorproposed— whichever operation moved the status. Both sides are judged bymay_surface(status, include_unapproved=True), the read gates' own predicate under its widest flag, inapplication/item_labels.py :: readmitted_items, so the floor and the gates cannot disagree about what is served. That covers an update withapproveddrafted before this check, one restated by hand todraftorproposed, a draft whose migration replays after a landed deprecation that sorts before it, the wire's draft for a create-only retired item, and a proposal carrying arestoreItemof its own. Its remedy names the hand-authoredrestoreItem. Movingdraftorproposedtoapprovedthrough a proposal stays allowed, and not as a special case: both are surfaceable on that same predicate, so nothing is readmitted, and the merge of the proposal is the approval.- What
acceptlands, in two halves (H3).accepthas no operation write set: it moves whatever operations a proposal's migration carries. Because both floors compare the state a replay leaves rather than the operations a document names, a proposal carrying achangeSensitivitythat lowers an item, or arestoreItemthat readmits one, is refused. That is a consequence of comparing post-state, not a widening of whatacceptchecks: neither floor reads which operations a proposal carries, so one that moves no gate label input in the permissive direction passes both. Which operations a proposal may carry at all — the write set — stays with #841's A1 slice.- Consequences, Negative, the third item, says an agent that reaches for
changeSensitivity"has no tool to be redirected to". Until this fix the effect had one: the toolgenerateMigrationDraft's ownupsertRevisionrefusal redirects to. It has none now, and the sentence is true as written.- What this does not close, item 4, says widening the surface to
changeSensitivityneeds its own recorded justification. The effect was reachable without that widening and without that justification. From this fix on no write-intent tool lowers a sensitivity, which is the premise the item rests on; the justification is still unwritten.- Decision 6 covers the new refusal, through a renamed lookup.
CurrentRevisionLookupis nowCurrentItemLookup(application/item_labels.py): one read answers both the current revision and the labels a draft inherits, so the two cannot come from different states. The nameCurrentRevisionLookupreturns for something narrower: an optional, revision-only lookup that the CLI and the OKF import inject so a missing or staleexpectedRevisionis decided beforeCurrentItemLookupreplays the landed set. When that check refuses,draftmakes one replay, on the refusal path only, to tell a retired item apart: its remedy, "Pass --expected-revision", is a step the retired refusal then blocks, so a retired item gets the retired refusal instead. A draft the check passes makes no replay beyond its own.test_candidate_default_flag_and_revision_precedence.py::test_an_update_without_an_expected_revision_is_refused_and_replays_only_for_retirementand::test_an_update_with_a_stale_expected_revision_is_refused_and_replays_only_for_retirementassert thatcurrent_item_inis called once, for the item, on each refusal, and::test_an_update_with_the_current_expected_revision_reaches_the_replayonce on a draft that passes;test_okf_import_composition_root.py::test_a_concept_for_an_item_with_a_revision_is_refused_and_replays_only_to_check_retirementasserts the same single call underokf import; andtest_retired_item_remedies.py::test_a_retired_item_drafted_without_expected_revision_gets_the_retired_refusalasserts exit 2, the retired message, a remedy namingrestoreItemand not "Pass --expected-revision", and nothing written.draftthen checks the revision again againstCurrentItemLookup's answer, so the revision it accepts and the labels it inherits still come from one read; the MCP root injects none. The MCP closure decision 6's Landed entry names asregister._draft_only_proposals.current_revisionis nowregister._draft_only_proposals.current_item, and it answers an item with no revision too, with no revision id, so a create-only item in the caller's view keeps its labels over the wire as well. The lowering refusal runs only for an item that lookup returned, so a withheld id is answered as an absent one is — refused for anexpectedRevisionit names, drafted when it names none — and the refusal's text is a constant that names no sensitivity level. The constant does not make the refusal silent about the level: refused or drafted is one bit, below the item's class or not, about an item in the caller's view — the population this decision's bind deliberately leaves out. For an item with a revision the bit adds nothing, sinceknowledge.getpublishes itssensitivity. For a create-only item it does:knowledge.getanswers such an item as not present, in the same text it gives for an id nothing stored, whileknowledge.proposeChangerefuses a lowering for it and drafts the same call for an absent id.- Decision 6's table, its first row. The refusal quoted there as "
<itemId> does not exist yet, so its first revision cannot replace <rev>" now reads "<itemId> has no current revision, so --expected-revision <rev> has nothing to replace.", with the remedy "Drop --expected-revision to draft its first revision, or correct --item-id." It is one constant for an id nothing created, an id outside the caller's view and a create-only item, so what it publishes is no current revision, not non-existence: a create-only item exists, and dropping the flag drafts its first revision. Unlike the lowering refusal above, it does not tell an in-view create-only item from an absent id.test_create_only_item_labels.py::test_an_mcp_expected_revision_on_an_in_view_create_only_item_matches_an_absent_idsends oneexpectedRevisionfor aninternalcreate-only item under the default ceiling and for an id nothing created, and asserts that the item's refusal is that text and remedy and that the two whole responses are equal. That the item is in view there is held by::test_an_mcp_draft_omitting_labels_for_a_create_only_item_drafts_its_create_item_labels, which drafts on the same fixture and stages itssecuritynamespace, not the id'sarchitecture. For an id outside the caller's view,::test_the_same_call_on_a_corpus_without_the_item_gets_the_same_bytesand::test_a_create_only_item_above_the_ceiling_answers_like_an_id_that_never_existedunder What holds it send anexpectedRevision, assert that the text carries "has no current revision", and compare the raw responses of two corpora.The closure. The read gates take two label inputs from an item: its status, through
may_surface, and its sensitivity, throughmay_disclose. Revision presence is read beside them and is not a label input, by design: the read pathsCanonicalVisibility._may_surface,register.knowledge_getandmcp/search.py :: _scan, and the index builder and the OKF export, each skip an item whosecurrent_revision_idisNone, inline. Only a first revision moves that read, and what it then serves is the content its own proposal carries, which the merge of that proposal approves. Two reads look like further inputs and are not:cli/index_commands.py :: _indexable_itemsrepeats the builder's rule inline to count what a build was offered, and of an item's labels reads only status and sensitivity; andvalidity.contains(asOf), in_scanand in the ranked path'sat_moment, is a filter the caller chooses, which drops rows the two gates admitted and never adds one. This advisory is one class, a proposal that moves a label input in the permissive direction — status from non-surfaceable to surfaceable, or sensitivity to a lower class. Three controls hold it. The draft refusals keep such a proposal from being written for an item the drafter's lookup returns. The twoacceptfloors refuse one against the migrations landed when it is accepted, and they close the class by the gates' own input set rather than by a list of operations: each compares the state a replay leaves for every item the landed set holds, so an operation, a document key or an order among the landed migrations that nobody listed meets the same comparison. The permissive-move report names what the floors cannot see, a withdrawal merged after the accept that the accepted update then undoes, andacceptrefuses a proposal that would add a row to that report or re-attribute one it already holds (below). Readmission has one path, a hand-authoredrestoreItemmigration under.theurian/migrations/, as declassification has one, a hand-authoredchangeSensitivity. Trust level, namespace, owner and kind are not gate label inputs, so they are outside the class: anupsertRevisionstill sets them, neither floor compares them, and they are residuals of this fix, recorded here. What holds each floor is below.tests/unit/test_gate_item_inputs.pyholds the premise that the gates read only these two label inputs, as far as its body reaches: it asserts that the publicmay_*callablesdomain/enums.pydefines, a cache-wrapped one included, are exactlymay_surfaceandmay_disclose, that the first parameter of each is annotatedKnowledgeStatusandSensitivityrespectively, and thatlowered_sensitivitiesreadssensitivityandreadmitted_itemsreadsstatus, and no otherItemLabelsfield, as attributes in their own source. It reads names, annotations and attribute access, and no gate parameter after the first, so a gate that decides inline, outsidedomain/enums.pyor under a name not startingmay_, or one that reads an item field throughgetattror a helper, is outside it — the inline revision-presence read above among them, which is why that read is named here rather than left to the test.tests/unit/test_gate_call_sites.pypins every call site ofmay_surfaceandmay_disclose.What the floors cannot see, and the third control. The floors compare once, at
accept, and implementing them revealed a case that comparison cannot reach. An approved item is updated throughtheurian propose --expected-revision, and the update is accepted and applied. A hand-authoreddeprecateItem, or achangeSensitivitytoconfidential, whose id sorts before the update's migration — authored first, merged after the accept — then lands. A full replay runs the withdrawal first and the accepted upsert'sstatus: approvedandsensitivity: internalsecond, so the withdrawal is nullified and nothing refuses the set.test_permissive_move_report.py::test_an_update_accepted_after_a_withdrawal_that_sorts_first_is_reported_undoing_itbuilds both faces and asserts thatmigrate validateandmigrate applyexit 0 and that the item endsapprovedandinternal; on 2026-10-02 an in-process probe outside the suite foundknowledge.getserving the updated body, for both faces, to a caller under the default ceiling. It is graded CRITICAL, on a corrected grading anchor: a merge approves only what its diff shows, and a merge that cannot show the conflict is not an approval of the outcome. Neither the withdrawal's diff nor the update's shows the other.Decided: a report, not a refusal. Refusing such a set would stop histories that already apply, so
migrate validateandmigrate applyprintpermissiveMovesand neither exit code moves. A replayedupsertRevisionis reported for a field only when both of two clauses hold: (1) the upsert itself loosened the field, compared with the state just before it; and (2) its migration left the item looser than it found it, comparing the migration's end with its start. "Looser" is the floors' own test — for status,may_surface(…, include_unapproved=True)going from false to true; for sensitivity, a lower class byDISCLOSURE_ORDER— decided atapplication/permissive_moves.py :: _loosens, whichtest_gate_call_sites.pyregisters inSTATUS_GATE_READER_SITES: it decides what the report returns, and the upsert lands whatever it decides. Amended 2026-10-08: since GHSA-wwq9-p8wq-5m68_loosensalso decidesaccept's end-state refusal (application/permissive_moves.py :: loosened_after), so it decides whether a proposal lands, not only what the report returns, andtest_gate_call_sites.pyregisters it inSTATUS_GATE_WRITER_SITES. An item absent at its migration's start is never compared, and only upserts are reported, never the sanctioneddeprecateItem,restoreItemandchangeSensitivity. A row carriesmigrationId,itemId,field,beforeandafter(the field at that migration's start and end),undoes(the migration that, before it, last changed whether the item may surface, or its class) andkind—undoeswhen that change tightened the field,lowersotherwise, by the definition below.migrate validatereports the whole set every time, from a throwaway replay used only for the report, and itsvalidverdict and exit code do not depend on that replay; when the replay fails,permissiveMovesisnullandpermissiveMovesUnavailablecarries the engine's own words.migrate applyreports what that run applied.propose acceptdoes not print it, though it reads it to refuse (below), and no file undermcp/orschemas/mcp/contains the key: it is the operator's own replay, not a served path. The migration format documents it, each sentence with the test or measurement that holds it, the tests intests/integration/test_permissive_move_report.py,tests/integration/test_accept_refuses_a_reported_upsert.py,tests/integration/test_accept_never_introduces_a_report_row.py,tests/unit/test_permissive_move_writer_property.py,tests/unit/test_floor_refusal_remedy.pyandtests/unit/test_introduced_moves.py. They collect 45 tests from 33 functions, 15 from 14, 13 from 13, 52 from 2, 14 from 5 and 13 from 8, bypytest --collect-only -qon 2026-10-03 after the fix wave's id-order finding below, a function being a top-leveldef test_. This sentence said 11 from 10, 12 from 12 and 7 from 3 for the second, the third and the fifth after the re-check's fix wave, the same day; 9 from 8 and 7 from 7 for the second and the third after the second widening, the same day; 4 from 4 and 11 from 7 for the third and the sixth after the first widening, on 2026-10-02; 41 from 32 and 6 for the first two before the granularity fix below, and 28 for the first before those, each of which no longer matched; the first widening added the third and the sixth file. Amended 2026-10-06: a sanctioned write is now reported, askind: "reorders"(GHSA-wwq9-p8wq-5m68). The sentence above kept the sanctioned operations out as reviewed intent, which holds only in id order: a migration declaringdependsOnreplays after every one declaring none, so a smaller-id lowering orrestoreItemundid a larger id's raise or deprecation with no row. The rule for areordersrow is stated under that name in the migration format. The report judges each migration against the attribution there;accept's end-state refusal judges the proposal's own field where the replay ends. By attributionacceptwould pass a larger-id landed loosening, which takes the attribution; by end state the report would name every lowering that follows a raise in id order, which the sentence above leaves unreported. Decided 2026-10-06:migrate validateandmigrate applyreport areordersrow and refuse nothing, because the report never moves an exit code (Decided: a report, not a refusal, above) and a refusal would stop histories that already apply; an ordering fix is to follow in its own ADR. Amended 2026-10-08: no such ADR exists; #897 records the option and its costs, and the GHSA-wwq9-p8wq-5m68 amendment before Context why it was not taken.
kindis decided by the change's effect, not its operation. The report first decided it by operation type: adeprecateItemorchangeSensitivitywas a withdrawal and every upsert was not. Review found that this misfiled two races. An accepted update that undid an in-placeupsertRevisionwithdrawal — the current revision re-declaredrejected,supersededordeprecated, or at a higher class, the shape ADR-0024 decision 5 writes — readlowers, which hid the reviewed withdrawal the report exists to surface. And a lowering after achangeSensitivitythat declassified the item readundoes, naming a tightening that never happened. A change is now a withdrawal when it tightened the field — status from a valuemay_surface(…, include_unapproved=True)admits to one it does not, sensitivity raised byDISCLOSURE_ORDER— which is_loosensread the other way round. A write that does not change the field does not replace the recorded one; what counts as a change is the next paragraph. AcreateItemis never a withdrawal, and neither is any write in the migration that created the item: that is the item's first labelling, at the granularity at which the report never compares a new item. Held bytest_permissive_move_report.py::test_an_in_place_withdrawal_by_upsert_is_what_an_accepted_update_is_reported_undoing(an accepted update, then an in-place upsert sorting before it that statesrejected,supersededordeprecated, orconfidentialoverinternal; each rowkind: undoes, naming the in-place migration),::test_a_declassification_is_not_a_withdrawal_so_a_further_lowering_is_reported_as_lowers(confidential, achangeSensitivitytointernal, then an upsert topublic:kind: lowers),::test_a_restated_status_does_not_replace_the_withdrawal_that_set_it(a deprecation, an upsert restatingdeprecated, then one statingapproved: the row names the deprecation's migration,kind: undoes),::test_a_create_item_is_never_a_withdrawal_so_a_later_lowering_is_reported_as_lowers(acreateItemstatingconfidential, then an upsert tointernal:kind: lowers), and::test_a_hand_authored_upsert_lowering_an_earlier_upserts_sensitivity_is_reported_as_lowers, whose item is created and statedconfidentialby an upsert in one migration and later lowered:kind: lowers.The effect is judged at the floors' granularity, not the value's. The previous closure measured effect at value granularity, which is the wrong instrument for status. It decided "unchanged" by the label's value and "withdrawal" by the floors' predicate. A status write between two retired values —
deprecated,superseded,rejected— changes the value and not the predicate, so it was recorded as the field's writer, not as a withdrawal, and displaced the real withdrawal before it: the accepted update that then readmitted the item readkind: lowers. Review met four faces: adeprecateItemthen an in-place upsert torejected; adeprecateItemthen one tosuperseded; an in-placerejectedthen adeprecateItem; and one migration that deprecates and then supersedes. The third readundoesunder the operation-typed rule, naming thedeprecateItem, so the effect rule regressed it; the other three readlowersunder both. Measured on 2026-10-02 by feeding the four write sequences toLabelWritersas it stood at each rule. A write now replaces the field's recorded writer only when it changes the field's predicate value — for status, whethermay_surface(…, include_unapproved=True)admits the item; for sensitivity, its class — and it is a withdrawal only when that change tightened the field. Sensitivity never showed the defect:DISCLOSURE_ORDERis a total order, so every change of a sensitivity value is a change of class, and value and predicate granularity coincide there. That is stated here rather than left assumed, and the second property test below holds it. Held bytest_permissive_move_report.py::test_a_retired_to_retired_write_does_not_displace_the_withdrawal_an_update_is_reported_undoing(an accepted update, then each face sorting before it; each row names the first write's migration,kind: undoes, frommigrate validateand frommigrate apply) and bytest_permissive_move_writer_property.py, which feedsLabelWritersa first write and then a second for every ordered pair of values. Of the 36 status pairs, the second replaces the first as the writer exactly when it changes whatmay_surfaceanswers, and is a withdrawal exactly when it tightened it (::test_a_status_write_replaces_the_recorded_writer_only_by_changing_surfaceability); of the 16 sensitivity pairs, exactly when the value changes, and a withdrawal exactly when it is raised (::test_a_sensitivity_write_replaces_the_recorded_writer_only_by_changing_the_class). Its first write always leaves a writer recorded, so it does not reach a field with none, one an earlierapplylast set. There the rule does not hold: a write that changes the value is recorded even when the predicate does not move, as no withdrawal, so a readmission after a write between two retired statuses readskind: lowersnaming that write. Measured on 2026-10-02 by feedingLabelWritersthe two upserts with no earlier write; no test drives it.The recorded design limit: one migration is one reviewed diff. A migration that withdraws and re-asserts an item, or lowers and then restores it, nets out and is not reported (
test_permissive_move_report.py::test_a_migration_that_withdraws_and_reasserts_an_item_in_one_diff_is_not_reported,::test_an_upsert_lowering_that_a_later_operation_restores_is_not_reported). Its reviewer saw both operations in one diff, which is what the grading anchor asks of an approval.Rejected predicates, each with the false positive it was measured to produce.
- Compare each operation with the state just before it. It reported 26 rows on this repository's own corpus, each a new item labelled in the migration that creates it: a
createItemwith the defaultedinternal, then an upsert statingpublic, which is whattheurian propose --sensitivity publicwrites for a new item. A report that fires on the maintainers' own history is noise nobody reads;::test_a_new_item_labelled_in_the_migration_that_creates_it_reports_no_moveholds that shape at zero.- Compare the upsert's result with its migration's start alone. It reported a migration doing
restoreItemand then an upsert, which is the migrationREADMIT_REMEDYleads its reader to (::test_a_restore_and_content_update_in_one_migration_reports_no_move), and one doingchangeSensitivity: publicand then an upsert raising the item tointernal(::test_an_upsert_raising_the_label_is_not_reported_after_the_migration_made_it_public). Clause (1) is what removes both.- Keep the start-only compare and record its false row (O1). Rejected: Theurian's own remedy would then produce a permanent false
undoesrow.An accept never introduces or re-attributes a report row. This was first stated, and ruled, for the proposal's own row only, as "nothing accepted is reported at accept time"; the two widenings are recorded below. The same false row was still reachable another way. The floors compare where the landed set ends with where it ends with the proposal, so they pass a proposal whose migration replays before a landed one that re-sets what its upsert loosened. The readmission refusal's remedy produced one: it sent its reader to hand-author a
restoreItemand stopped there, so the next step was to accept the same proposal again. Its migration id was minted at the draft and sorts before the restore, so its upsert takes the item fromdeprecatedtoapprovedbefore the restore re-sets it, and both replays end alike; accepted, it would be reportedkind: undoesfor as long as the migration exists. Ruled in two parts.acceptnow reads the report of the replay with the proposal, which the floors already run, and refuses, with exit 1 and nothing moved, a proposal whose own migration a row names; it runs after the two floors, so their refusals keep their text and order (application/proposal_service.py :: _refuse_a_reported_upsert). Its error names the proposal's migration, the item, the field, both values, and the landed migrations that replay after it and write that field of that item, read from their operations:upsertRevisionandcreateItemwrite both labels,deprecateItemandrestoreItemstatus, andchangeSensitivitysensitivity. It first named every landed migration replaying after the proposal's, which sent the reader to review migrations with nothing to do with the refusal. Its remedy was then a fresh draft withtheurian propose, said to get a later migration id, and deleting the stale proposal directory. Since the re-check's fix wave below it is routed by every kind the proposal carries and namesdependsOn: [<every landed migration the error names>], whatever those migrations declare: a later id is not what places the new draft after them. AndACCEPT_READMISSION_REMEDYnow says that once the restore lands, the update is drafted again rather than accepted again, as the lowering remedies do (above), withdependsOn: [<its id>]edited into the new draft since the fix wave. The class is closed in three steps: a permissive move is refused at accept, reported after, and an accept never introduces or re-attributes a report row.test_accept_refuses_a_reported_upsert.py::test_accepting_a_proposal_that_replays_before_a_landed_restore_is_refused_and_moves_nothingdrafts over MCP for a create-onlydeprecateditem, has the first accept refused, lands arestoreItemand asserts that the second accept exits 1, with an error naming the proposal's migration id, the item,status, both values (deprecatedandapproved) and the landed restore's migration id, and saying it "replays before", a remedy namingtheurian proposeand reading "replays after<restore>", and nothing moved under the proposals, migrations or knowledge directories.::test_no_row_names_the_migration_of_a_proposal_accepted_across_a_landed_restoreasserts that after that accept and amigrate apply,migrate validatecarries no row for the proposal's migration;::test_a_fresh_draft_after_the_restore_is_accepted_and_reports_nothingfollowed the remedy as it then read: a freshtheurian proposedraft, declaring nodependsOnand asserted to sort after a restore that declares none, is accepted and the report is empty. Since the fix wave's id-order finding below the remedy namesdependsOn, and that test holds only a restore that declares none and sorts before the fresh draft;::test_the_first_accept_of_a_proposal_for_a_retired_item_prints_the_draft_again_remedyasserts that the first refusal's remedy namesrestoreItemandtheurian propose, which the new refusal's remedy would fail had it run first;::test_the_readmission_remedy_says_to_draft_again_after_the_restore_landsreads the constant;::test_the_refusal_names_only_the_landed_migrations_that_wrote_the_reported_fieldlands one more migration after the restore, acreateItemof another item or achangeSensitivityof the same one, and asserts that the migration ids in the error are exactly the proposal's and the restore's;::test_accepting_a_proposal_while_another_migrations_row_exists_leaves_only_that_rowholds that a row the report already holds, naming another migration, does not refuse — with a race row for one item already in the report, a first revision drafted for a second item is accepted with exit 0, and aftermigrate applythe report holds that row and no other; and::test_an_accepted_update_leaves_no_report_row_before_any_withdrawal_landsis the control.Rejected: re-minting the migration id at
acceptso that it sorts after the landed set. The id is the proposal's provenance (ADR-0013), recorded in its evidence and named by its file, and rewriting it atacceptis not a patch-shaped change.Widened after the anchored release-cut pass, by the maintainer's ruling of 2026-10-02. The refusal above keyed on the proposal's own migration, and the anchored pass found a proposal that adds a row naming a landed one. A
knowledge.generateMigrationDraftcall stages adeprecateItemfor an approved item, minting its migration id; a content update drafted after it withtheurian proposeis accepted and applied; then the deprecation is accepted. Its migration replays before the update's, whosestatus: approvedre-sets what it withdrew. That is the set the race above leaves, whichtest_permissive_move_report.py::test_an_update_accepted_after_a_withdrawal_that_sorts_first_is_reported_undoing_itholds endingapprovedwithmigrate validateandmigrate applyat exit 0; its other face, a raise undone by an update restating the lower class, is reached the same way by a proposal carrying achangeSensitivityraise. Neither floor refused such an accept, since the item ends the same with the proposal and without it, and the own-row refusal did not, since the row names the update: on 2026-10-02 the withdrawal, raise and re-draft tests below, run against the source before the widening, each failed onassert code == 1with exit 0, and the same-item control passed. The withdrawal was accepted and undone, and only the report printed after it named the landed update as undoing it.The ruling widened the invariant: an accept never introduces a report row.
acceptrefuses, with exit 1 and nothing moved, when the report of the replay with the proposal holds a row whose(migrationId, itemId, field)the report of the landed set alone does not (application/permissive_moves.py :: introduced_moves, called from_refuse_a_reported_upsert). A row under a held key is the same row, whateverbefore,afterorkindthe replay with the proposal reads for it. The baseline is the landed-alone report, not an empty one, because a row already in the history, naming the same migration inundoes, must never block an accept. Theundoescondition is the second widening's, below. That row is not this accept's, and a project holding one, the original defect's victims included, must still accept a proposal that leaves it as it is. Amended 2026-10-05: this holds for the report check's baseline; the end-state refusal (_refuse_a_landed_overwrite, after this check) can still refuse a proposal that leaves a held row as it is (test_accept_never_introduces_a_report_row.py::test_a_stale_withdrawal_minted_before_a_landed_reapproval_is_refused). With an empty baselineacceptrefuses both controls below: measured on 2026-10-02 by running them against the source with the baseline replaced by an empty tuple. The baseline is the report of the landed-alone replay both floors already compare against, which_refuse_an_effective_loweringnow returns, so the widening adds no replay; and the check stays where the own-row check was, after both floors. The proposal's own row keeps the error and remedy above. A landed migration's row is refused with "Accepting this proposal would make the landed migration<id>move<item><field>from<before>to<after>, undoing what this proposal sets: this proposal's migration replays before it." Its remedy was then "Nothing has moved. Draft this change again withtheurian proposeso it gets a later migration id and replays after<id>. Then delete<proposal dir>/."; the re-check's fix wave below routes it by every operation kind the proposal carries and namesdependsOn: [<id>]in every route, since no id order is what places the new migration after the landed one. Re-minting the id stays rejected, for the reason above.
test_accept_never_introduces_a_report_row.py::test_a_withdrawal_minted_before_a_landed_update_is_refused_and_moves_nothingbuilds that face on anapproved,internalitem and asserts exit 1, an error naming the update's migration id, the item andstatusand reading "from deprecated to approved", a remedy naming the update's migration id and nottheurian propose, with no "accept" followed by "again" within one sentence, nothing moved under the proposals, migrations or knowledge directories, and, aftermigrate apply, the itemapprovedand an empty report.::test_a_sensitivity_raise_minted_before_a_landed_update_is_refused_and_moves_nothinghand-edits a stagedchangeOwnerinto achangeSensitivitytoconfidential, lands an update naminginternal, and asserts the same ofsensitivity, the error reading "from confidential to internal", with the iteminternalaftermigrate apply.::test_the_withdrawal_drafted_again_after_the_update_is_accepted_and_takes_effectfollowed the remedy as it then read: a deprecation drafted withknowledge.generateMigrationDraftafter the update, declaring nodependsOnand asserted to sort after it, is accepted with exit 0, and aftermigrate applythe item isdeprecatedand the report empty. Since the fix wave's id-order finding below the remedy namesdependsOn, and that test holds only an update that declares none and sorts before the fresh draft. The baseline's two controls:::test_a_proposal_on_the_item_of_an_existing_row_that_leaves_the_row_alone_is_acceptedreports a race row for the item, accepts achangeOwnerof that same item with exit 0, and asserts aftermigrate applythe report it had before; andtest_accept_refuses_a_reported_upsert.py::test_accepting_a_proposal_while_another_migrations_row_exists_leaves_only_that_row, above, is the other-item case.tests/unit/test_introduced_moves.pyfeedsintroduced_movesheld and union rows and asserts: an own row and a landed row the held rows lack are introduced; a row under a held key is not, identical or with otherbeforeandafteror anotherkind; a row differing from a held one in migration, item or field is; an empty union introduces nothing; and the result keeps the union's order. The own-row refusal's text through the widening istest_accept_refuses_a_reported_upsert.py::test_accepting_a_proposal_that_replays_before_a_landed_restore_is_refused_and_moves_nothing, above.Widened again on 2026-10-03, as inside the maintainer's earlier ruling. The three-field key let an accept re-attribute a row the landed set already reports: the same
(migrationId, itemId, field), naming another migration as what it undoes. Both faces start from anapproved,internalitem, a staged proposal P, an update U drafted after P withtheurian proposeand accepted, and a migration D that sorts before P and lands after U's accept:
- sensitivity: D raises the item to
confidential, P torestricted, and U namesinternal; U's row,confidentialtointernalundoing D, becomesrestrictedtointernalundoing P, so P's raise is overwritten;- status: D deprecates the item, and P is a
restoreItemthen adeprecateItem; U'sdeprecatedtoapprovedrow moves from undoing D to undoing P, itsbeforeandafterunchanged.On 2026-10-03, with the three-field key patched back in-process,
acceptexited 0 for both, and aftermigrate applythe item wasinternalandapprovedrespectively and U's row named P. The key is now(migrationId, itemId, field, undoes), so both are refused with exit 1, nothing moved, and the landed-row error above, with the remedy the re-check's fix wave below routes. It takesundoesand notbeforebecauseundoesis predicate-granular (above): it names the last write that changed whether the item may surface, or its class.beforeis the field's value at the migration's start: the status face leaves it unchanged, and a write between two retired statuses moves it without changing what either gate answers. The control is a deprecation of an item already deprecated: it changes no predicate, so U's row keeps naming D and the accept exits 0. Superseded 2026-10-05: the end-state refusal now refuses the control, exit 1, as the stale-withdrawal test below asserts.
test_accept_never_introduces_a_report_row.py::test_a_raise_minted_before_an_update_that_already_undoes_a_landed_raise_is_refusedasserts that before the accept the report is exactly U'ssensitivityrow,confidentialtointernal, undoing D; then exit 1, an error naming U's migration id, the item andsensitivityand reading "from restricted to internal", a remedy naming U's migration id and nottheurian propose, with no "accept" followed by "again" within one sentence, nothing moved under the proposals, migrations or knowledge directories, and aftermigrate applythe report it started with.::test_a_withdrawal_that_restores_first_is_refused_when_it_would_take_over_an_update_rowasserts the same of the status face, reading the starting report as U'sstatusrow undoing D and the error forstatusreading "from deprecated to approved".::test_a_stale_withdrawal_minted_before_a_landed_reapproval_is_refused, which under its earlier name asserted the control's exit 0, now asserts exit 1, nothing moved, adependsOn: [<U>]remedy and, aftermigrate apply, the report it started with. Superseded 2026-10-05: the control's acceptance read P's replay position, after D, not theapproveditem P withdrew, which U leftapproved.tests/unit/test_introduced_moves.py::test_a_row_under_a_held_key_whose_undoes_differs_is_introducedholds as introduced astatusand asensitivityrow naming the incoming migration where the held row names another, and a row with no writer recorded where the held row has one; the first widening's test asserted the last was not introduced. Run against the three-field key as above, both face tests failed onassert code == 1with exit 0, the three unit cases failed, and the control passed. The same day, the remedy assertion these tests share with the first widening's was tightened from any remedy containingtheurian proposeor "again"; the descriptions above were corrected in place, and no test reads them against the assertions.2026-10-03, the re-check's fix wave. The adversarial re-check of the two widenings found the reported-upsert remedies unfollowable in two ways, each graded HIGH, and the landed-row error's direction unpinned, graded MEDIUM:
- (a) The remedy sent every refused proposal to
theurian propose, which drafts content only. A refuseddeprecateItemcould not be drafted again there, and neither tool drafts achangeSensitivityorrestoreItem:knowledge.generateMigrationDraftrefuses both (decision 3).- (b) Both remedies said a fresh draft's later id replays after the landed migration. It does not when that migration declares
dependsOn: each round of the replay sort takes every migration that is ready, by id (domain/migration.py :: MigrationSet._topological_order), so a migration declaring nodependsOnreplays before one declaring any, whatever the ids. A fresh draft declares none, so it was refused again, and the remedy sent its reader round the same loop. That a later id was enough otherwise was itself false; the id-order finding below records why.- (d) The tests read the error's
beforeandafterby membership, so an error stating them swapped would have passed.(c) Both remedies were then built by
application/proposal_service.py :: _redraft_remedy, routed by the refused proposal's operation kinds, the most restrictive first: achangeSensitivityorrestoreItemto a migration authored by hand and applied withtheurian migrate applyonce a human has reviewed it; another kindknowledge.generateMigrationDraftcarries to that tool; anything else totheurian propose, which the own row always took; the own row's remedy has since named the landed migrations its error names. Routing by the hardest kind sent a mixed proposal to a route that drafts only part of it — a proposal restoring then deprecating an item was told to author only therestoreItem, which readmits the item, and anupsertRevisionwith adeprecateItemwas sent togenerateMigrationDraft, which refuses content — so the same day both rows were routed by every kind the proposal carries instead:theurian proposewhen every kind iscreateItemorupsertRevision,generateMigrationDraftwhen every kind is one it drafts, and otherwise one migration authored by hand naming all of them.test_redraft_remedy.py::test_every_pair_of_kinds_is_routed_to_a_tool_that_can_draft_all_of_itcalls_redraft_remedyfor every unordered pair of the kinds in_REFUSED_TO_CONTENT_PATH,V1_OPERATION_KINDSand_REFUSED_TO_CLI, and asserts each oftheurian propose,knowledge.generateMigrationDraftandtheurian propose acceptnamed exactly on its own route, the last with this proposal's migration file, andmigrate applynever; throughaccept,test_accept_never_introduces_a_report_row.py::test_a_withdrawal_that_restores_first_is_refused_when_it_would_take_over_an_update_rowasserts the restore-first face's remedy naming this proposal's migration file andtheurian propose accept, and no "Author the ". When a migration the new one must replay after declareddependsOn, the remedy then named those ids as the new one'sdependsOn: declared by the authored migration, in thegenerateMigrationDraftdocument, or, astheurian proposehas no option for it, edited into the drafted migration file; otherwise it did not mentiondependsOn. Since the id-order finding below it names every landed migration the error names, in the same three forms, whatever they declare; the GHSA-fjqq-grr7-53cc amendment below supersedes which ids, and the authored form. "Nothing has moved.", the step deleting the stale proposal directory, and the absence of "accept … again" are unchanged. The floor remedies' fresh draft after a hand-authored migration had the same loop, soitem_labels.DRAFT_AGAIN_CLAUSEandACCEPT_READMISSION_REMEDYthen added: "If that migration declaresdependsOn, editdependsOn: [<its id>]into the new draft's migration file." Since the id-order finding below they end "…, and onlydependsOnplaces the new draft after it, so editdependsOn: [<its id>]into the new draft's migration file."test_accept_never_introduces_a_report_row.py::test_a_withdrawals_remedy_routes_to_the_migration_draft_tool_not_the_content_pathrefuses a stageddeprecateItembehind a landed update declaring nodependsOnand asserts a remedy namingknowledge.generateMigrationDraftanddependsOn: [<update>], and none oftheurian propose,proposeChangeor "later migration id"; until the id-order finding it asserted nodependsOn.::test_a_sensitivity_raises_remedy_routes_to_a_hand_authored_migrationasserts, for a stagedchangeSensitivityraise, a remedy holding "this proposal's migration file" and notmigrate apply, and naming neither`theurian propose`norgenerateMigrationDraft.::test_the_remedy_names_dependson_when_the_landed_update_declares_it, with the update declaringdependsOn, asserts a remedy namingdependsOnfollowed by the update's migration id, andknowledge.generateMigrationDraft.::test_a_fresh_withdrawal_without_dependson_is_refused_again_behind_a_dependent_updateis the loop: a fresh deprecation whose id sorts after the update's is refused with exit 1 and an error naming the update.::test_a_fresh_withdrawal_that_depends_on_the_dependent_update_is_accepted_and_takes_effectfollows the remedy: drafted withdependsOnnaming the update, the deprecation is accepted with exit 0, and aftermigrate applythe item isdeprecatedand the report empty. For the own row,test_accept_refuses_a_reported_upsert.py::test_the_own_row_remedy_keeps_the_content_path_for_an_upsert_and_never_says_accept_againasserts, behind a landed restore declaring nodependsOn, a remedy naming`theurian propose`anddependsOn: [<restore>]and not "later migration id", with no "accept" followed by "again" within one sentence (until the id-order finding it asserted nodependsOn), and::test_the_own_row_remedy_names_dependson_when_the_landed_restore_declares_it, behind one declaring it, exit 1, an error naming the restore, and a remedy namingdependsOnfollowed by the restore's migration id. No test then read the authored route'sdependsOnclause, therestoreItemauthored route's text, thetheurian proposeroute for a landed migration's row, or the floor remedies'dependsOnclause. Measured on 2026-10-03, before the id-order finding, by a scratch run outside the suite, which printed the texts of that time: a stagedchangeSensitivityraise behind an update declaringdependsOnprinted "… replays after<update>, declaringdependsOn: [<update>], and apply it withtheurian migrate applyonce a human has reviewed it."; and after a readmission refusal printing the new clause, and arestoreItemdeclaringdependsOn, atheurian proposedraft without it was refused with the own-row remedy namingdependsOn: [<restore>], while one with it edited in was accepted with exit 0 and the report was empty aftermigrate apply. A content raise drafted withtheurian proposebefore a landed update met the revision-conflict refusal first, so that run did not reach thetheurian proposeroute of a landed migration's row. Since the routing by every kind, three of the four are read by unit tests that build the remedy directly rather than throughaccept:test_redraft_remedy.py::test_dependson_names_every_landed_migration_whether_or_not_it_declares_oneasserts each route's owndependsOnform, the authored one among them;::test_each_cli_kind_alone_is_edited_into_its_own_file_and_accepted_againasserts "/, so it replays after" the landed id "only through itsdependsOn, then" forrestoreItemandchangeSensitivityalone; andtest_floor_refusal_remedy.py::test_every_remedy_that_says_to_draft_again_says_to_edit_dependson_inasserts the floor remedies'dependsOnsentence. No test reaches thetheurian proposeroute through a landed migration's row. This sentence also said, until later on 2026-10-03, that no test reached the own row of a proposal carrying more than content;test_accept_refuses_a_reported_upsert.py::test_the_own_row_remedy_keeps_every_kind_of_a_proposal_carrying_a_non_content_onedoes: it appends achangeOwnerto the staged document of a proposal refused for its own row, and asserts exit 1, an error naming the proposal's and the restore's migration ids, and a remedy holding "this proposal's migration file in<proposal dir>/" and not`theurian propose`. Measured on 2026-10-03 at the id-order fix by wrapping_redraft_remedyin-process over the 20 test files, 880 tests, thatgit grep -l -E '"propose",[[:space:]]*"accept"|propose_accept|\.accept\(|"accept",' -- packages/theurian-core/testslists beside its support module: of 24 calls, the own-row site took thetheurian proposeroute 11 times and the authored route once, that test's; the landed-row site tookgenerateMigrationDraft8 times, the authored route 4 times, andtheurian proposenever.(d) The landed-row tests' shared assertion now requires an error reading "from
<before>to<after>" in that order, for the status, sensitivity, re-attribution and restore-first faces above, and a remedy that does not nametheurian propose, since every proposal those tests refuse is a migration. The descriptions above were corrected in place to the tests' bodies, as were the sentences presenting a remedy as current; the remedy quoted for the first widening stays as it printed then. The bold sentence on the baseline was qualified in place with theundoescondition the second widening added.The re-check also met a re-attribution face the second widening did not name: a landed migration can become what the update overwrites because of the proposal. D deprecates the item and sorts first, P is a staged
restoreItem, and X, a landeddeprecateItemof the already-deprecated item, sorts between P and U. Landed alone, X changes no predicate, so U's row undoes D; with P, X withdraws the restored item, and U's row undoes X. Measured on 2026-10-03 by a scratch run outside the suite: the landed-alone report named D, the report with P copied into the landed set named X, andacceptexited 1 naming U. No test builds it. The docstrings ofintroduced_movesand_refuse_a_reported_upsertnow name it.Later on 2026-10-03, the id-order finding. The re-check of the fix wave graded HIGH that the redraft remedies still rested on id order: they said a fresh draft "gets a later migration id and replays after
<id>", and nameddependsOnonly when the landed migration declared one. Each round of the replay sort takes every migration whosedependsOnhave replayed, in id order, so a landed migration whose id sorts after the drafting clock replays after every fresh draft that declares nodependsOn, however late it is drafted. A hand-chosen id, a staged id edited beforeacceptand a collaborator's clock running ahead each produce one. Measured on 2026-10-03 by a scratch run outside the suite: behind a landedrestoreItematSORTS_AFTER_A_DRAFT, an id past the clock, the remedy followed as it then read — a freshtheurian proposedraft, the stale directory deleted — was refused three times running, exits[1, 1, 1].A sharper condition, naming
dependsOnalso when the landed id sorts after the clock, was rejected for a rule with none. The fix wave's condition was already one enumeration of where id order fails, and the re-check found a case outside it; the drafting clock is read after the refusal, by whoever drafts and perhaps on another machine, so no conditionacceptevaluates covers it.dependsOn: [X]places a migration in a round after X's whatever the ids. So every route of_redraft_remedynow says the new migration replays after<id>"only through itsdependsOn" and namesdependsOn: [<every landed migration the error names>](the ids, and the authored form, superseded by the GHSA-fjqq-grr7-53cc amendment below) in its own form — edited into the drafted file fortheurian propose, in the document forknowledge.generateMigrationDraft, declared by the authored migration — and no remedy says a later id is enough. The draft-again constants lost their condition the same way (above).test_redraft_remedy.py::test_dependson_names_every_landed_migration_whether_or_not_it_declares_onebuilds the remedy for every kind alone and for the two mixed proposals above, behind a root migration, a dependent one and both, and asserts the route'sdependsOnform listing every id passed, no "later migration id" and no "accept … again";::test_every_landed_migration_is_listed_in_the_clause_in_the_order_givenasserts three ids listed in the order passed, which is not id order. Throughaccept, with the landed migration atSORTS_AFTER_A_DRAFT,test_accept_refuses_a_reported_upsert.py::test_a_redraft_after_a_restore_whose_id_sorts_after_every_draft_lands_with_dependson(the own row) andtest_accept_never_introduces_a_report_row.py::test_a_withdrawal_redrafted_behind_a_future_id_update_lands_with_dependson(a landed row) assert a remedy namingdependsOn: [<landed id>], a fresh draft whose id sorts before it, that draft accepted with exit 0 oncedependsOnis in it, and an empty report aftermigrate apply, the itemapprovedat the fresh revision in the first anddeprecatedin the second. The root controls above —::test_a_withdrawals_remedy_routes_to_the_migration_draft_tool_not_the_content_pathandtest_accept_refuses_a_reported_upsert.py::test_the_own_row_remedy_keeps_the_content_path_for_an_upsert_and_never_says_accept_again— flipped from asserting nodependsOnto asserting it.test_floor_refusal_remedy.py::test_every_remedy_that_says_to_draft_again_says_to_edit_dependson_inasserts "editdependsOn: [<its id>]into the new draft's migration file." and no "declares" in each of its five remedies, and::test_the_draft_again_constants_carry_the_dependson_clausethe same of both constants' endings. The same re-check graded MEDIUM that nothing pinned which landed migrations the own-row remedy names:test_accept_refuses_a_reported_upsert.py::test_accepting_a_proposal_that_replays_before_a_landed_restore_is_refused_and_moves_nothingnow asserts "replays after<restore>", and::test_a_redraft_after_two_dependent_restores_names_both_and_lands, a second restore declaringdependsOnon the first, asserts both ids in the error, "replays after<first>, <second>" anddependsOn: [<first>, <second>]in the remedy, and, with both edited into a fresh draft, exit 0 and an empty report aftermigrate apply. Run on 2026-10-03 with the package source and schemas of the tree before the fix and these tests as they now are, 57 of the 61 collected cases outside the "replays after<restore>" test failed; the four that passed are the first unit test's authored routes behind a lone migration declaringdependsOn, which the old remedy already named. All 62 pass against the fix.Two premises in the review record measured false, and recorded as such. (a) That
migrate validatenever replays: it used not to, and now it replays once, into a throwaway database, for the report only; its verdict still does not rest on a replay. (b) That the product has a CI surface runningmigrate validate: it has none. No workflow or template ships underpackages/theurian-core/src/orplugins/—git ls-files packages/theurian-core/src plugins | grep -i -E 'workflow|template|\.github'printed nothing on 2026-10-02 — so nothing runs it unless a project's own CI does. The operator guidance is therefore two lines: runtheurian migrate validatebefore merging anychangeSensitivityordeprecateItem, and read the reporttheurian migrate applyprints after it. The race is a residual detected atmigrate validateandmigrate apply, not prevented. Oncekindwas decided by effect, the first line was widened to any migration that withdraws or raises a label, naming first the in-placeupsertRevisionthat re-declares a revisionrejected,supersededordeprecated, or at a higher class, because it is how a revision is withdrawn in place (ADR-0024 decision 5) and superseding or retiring is the step T-15 names for removing a secret; thendeprecateItemand a raisingchangeSensitivity. The two named before were never the only withdrawals.Known cost. A history that already holds such an upsert, the original defect's victims included, is reported on every
migrate validateand on everymigrate applythat replays it. The report is true and cannot be silenced; a way to acknowledge a row is post-publication work. The replay raisedmigrate validatefrom 7.71 s to 8.39 s at 1,000 single-item migrations, median of three runs at load average 5–10, recorded atcli/commands.py :: _permissive_move_fields. On 2026-10-02 this repository's 49 migrations reported no row frommigrate validate—::test_the_dogfood_corpus_reports_no_permissive_movere-checks that on every run — andexamples/sample-project/reported none fromvalidateorapply.The advisory's item B3, an audit of lowerings already landed (not decision 7's slice B3), is substantially discharged by the report:
migrate validate --jsonlists every upsert in a history that meets both clauses, and filtering its rows bykindseparates nullified withdrawals (undoes) from lowerings no withdrawal preceded (lowers). That holds becausekindis decided by the effect of the field's last change (above), so an in-place withdrawal byupsertRevisionfiles asundoesand a lowering after a declassification aslowers; decided by operation type, it filed both the other way. And because that effect is judged at the floors' granularity, a write between two retired statuses no longer stands in for the withdrawal before it, which at value granularity filed the four faces above aslowers. It does not list what the design limit nets out inside one migration, nor a lowering made bychangeSensitivity, the sanctioned path.What holds it, read from each test's body. In
tests/integration/test_update_label_inheritance.pya drafting surface updates a project whose one item carries chosen labels, and the test reads the staged migration, the item row afterpropose acceptandmigrate apply, or both:::test_an_update_omitting_sensitivity_leaves_the_items_sensitivity_unchanged(aconfidentialitem over MCP under a raised ceiling and over the CLI, apublicone over MCP under the default ceiling and over the CLI),::test_an_update_omitting_trust_level_and_namespace_leaves_the_items_own(MCP and CLI),::test_a_candidate_update_of_a_confidential_item_leaves_it_confidential, and::test_a_first_revision_over_mcp_gains_no_label_the_caller_did_not_namefor an item id nothing created. The draft-time refusal is::test_an_mcp_update_naming_a_lower_sensitivity_is_refused_without_naming_a_label— four lowerings, each answered with text that nameschangeSensitivityand no level word, and nothing written under either proposals directory — with::test_an_mcp_update_naming_an_equal_or_higher_sensitivity_drafts_itas its control, and::test_theurian_propose_naming_a_lower_sensitivity_refuses_and_writes_nothingon the CLI. Decision 6's bind is::test_naming_a_lower_sensitivity_on_a_withheld_item_answers_like_an_absent_id: eight cases — two above the default ceiling; four retired within their ceiling,deprecatedtwice,supersededandrejected; two above a raised ceiling — each sent with anexpectedRevisionand compared with a call about an id nothing stored, on the normalised response, the SELECT statements read throughopen_read_connection, and an unchanged proposals tree. It runs in one corpus, the same-corpus form decision 6's Landed entry describes, with the limit that entry states: it cannot see a channel carried by collection-wide state.::test_the_same_call_on_a_corpus_without_the_item_gets_the_same_bytesis the two-corpora form of the same eight cases: each builds one project holding the withheld item and one built the same way without it, sends both the same call, and compares the raw responses with no normalisation, each project's proposals tree unchanged.
tests/integration/test_create_only_item_labels.pyholds the create-only case, on an item whose one migration is acreateItemnaming itssensitivity,trustLevelandnamespace.::test_a_cli_draft_for_a_create_only_item_drafts_the_labels_its_create_item_holdsand::test_an_mcp_draft_omitting_labels_for_a_create_only_item_drafts_its_create_item_labelsread the staged labels, and::test_a_create_only_item_keeps_its_labels_after_its_first_revision_landsthe item row afterpropose acceptandmigrate apply.::test_a_cli_draft_naming_a_lower_sensitivity_for_a_create_only_item_is_refusedand::test_an_mcp_draft_naming_a_lower_sensitivity_for_a_create_only_item_is_refusedhold the refusal with nothing written under either proposals directory, the MCP one sent with noexpectedRevisionand answered with text that nameschangeSensitivityand no level word.::test_a_create_only_item_above_the_ceiling_answers_like_an_id_that_never_existedis the two-corpora comparison for aconfidentialcreate-only item under the default ceiling, raw responses equal and both proposals trees unchanged, and::test_a_first_revision_draft_for_a_withheld_create_only_item_matches_an_absent_idsends the call withoutexpectedRevisionto both corpora and asserts that both draft and neither answer nameschangeSensitivity.
tests/integration/test_accept_sensitivity_floor.pyholds accept. It refuses a staged update with itssensitivityline removed, one with it edited to a lower value (confidentialtointernal, andrestrictedtoconfidential), and a draft whose migration sorts after a reclassification, each asserting exit 1, a remedy namingchangeSensitivity, and that nothing under the proposals, migrations or knowledge directories moved; its landing tests — a kept or raised label, and a draft that sorts before the reclassification — are the controls. Its twochangeSensitivitytests are under Owed below. Each stages its proposal throughtheurian propose, and what carries the refusals over to a proposal drafted elsewhere is that the floor compares replayed labels and reads nothing about which surface drafted it. A lowering drafted over the wire for a create-only item outside the caller's view, a case only the floor refuses, istest_create_only_item_labels.py::test_accept_refuses_the_lowering_an_mcp_draft_for_a_withheld_create_only_item_stages: aconfidentialcreate-only item under the default ceiling, aknowledge.proposeChangecall with noexpectedRevisionthat namespublicor omits the sensitivity and is answered without error, a staged label that ispublicwhere the call named it and is notconfidentialin either case, andpropose acceptexiting 1 with an error that says "lower the sensitivity" and names the item, nothing under the proposals, migrations or knowledge directories moved, and the row stillconfidentialwith no revision.tests/integration/test_accept_floor_refusal_text.pyholds what the refusals say.::test_accept_does_not_blame_the_landed_set_for_a_proposal_that_makes_it_replaybuilds the landed set that replays only with the proposal and asserts the refusal says it "does not replay on its own", not "with or without this proposal", with nothing moved.::test_accept_of_a_draft_made_against_a_lagging_served_state_points_at_migrate_applydrafts over MCP while a committed reclassification is unapplied, so the draft carries the staleinternal, and asserts thatacceptrefuses it with a remedy namingtheurian migrate apply, with nothing moved.::test_the_lowering_remedy_names_theurian_propose_as_the_route_to_draft_againreads the redraft step: a CLI draft naminginternal, a reclassification toconfidentialsorting before it, and a refusal whose error says "lower the sensitivity" and whose remedy namestheurian propose.::test_a_landed_set_that_fails_alone_is_not_sent_to_migrate_validatereads the remedy of the replay refusal: a patched replay fails the landed set alone, and the test asserts that the error carries the replay's own words, that the remedy names.theurian/migrations/and notmigrate validateand says thattheurian migrate applyruns the same replay, and that nothing moved. The draft side's two replay refusals aretest_draft_status_refusal.py::test_a_draft_over_a_landed_set_that_does_not_replay_carries_the_engines_words, on a landed settheurian migrate validatereports valid with exit 0 and the engine refuses as a revision conflict, and::test_a_replay_that_holds_no_such_item_refuses_and_names_migrate_apply_not_validate, whose replay reader is patched to hold nothing; each asserts the remedy does not namemigrate validate, the first that it saystheurian migrate applyruns the same replay, and the second that it namestheurian migrate apply.::test_migrate_apply_refuses_the_set_that_migrate_validate_passes_in_the_same_wordsholds that sentence on the draft side, on the first one's landed set:theurian migrate validatereports it valid with exit 0, the draft is refused with the engine'sRevision conflict on <item>: migration expected <revision>, andtheurian migrate applyexits non-zero carrying the same words.
tests/integration/test_accept_status_floor.pyholds the status floor ataccept. The first five refusals below go through one helper that asserts exit 1, a remedy namingrestoreItem, and no file moved under the proposals, migrations or knowledge directories; the two after them assert a non-zero exit.::test_accept_refuses_a_proposal_that_would_readmit_a_retired_itemplants, for adeprecated, asupersededand arejecteditem, an update drafted in a second project that holds the itemapproved, and asserts aftermigrate applythat the row keeps its status and its revision.::test_accept_refuses_a_readmission_to_a_surfaceable_status_that_is_not_approvedrestates that update's status todraftand toproposed.::test_accept_refuses_the_mcp_draft_for_a_deprecated_create_only_itemrunspropose accepton aknowledge.proposeChangedraft the tool returned without error, and the row is stilldeprecatedaftermigrate apply.::test_accept_refuses_a_draft_that_replays_after_a_deprecationdrafts while the item isapproved, then lands a deprecation that sorts before the draft.::test_accept_refuses_a_proposal_whose_own_restore_item_readmits_the_itemrestates the update todeprecatedand appends arestoreItem.::test_the_refusal_names_the_item_and_both_statuses_and_the_way_to_readmitreads the error and the remedy, and::test_a_proposal_that_lowers_a_sensitivity_and_readmits_an_item_is_refused_for_bothrefuses both defects in one proposal with exit 1 and nothing moved, and asserts that the error names both causes and the item twice and that the remedy nameschangeSensitivitybeforerestoreItem. The controls land:::test_accept_lands_a_draft_that_replays_before_a_deprecation(the deprecation sorts after the draft, and the row endsdeprecatedat the new revision), the carve-out's::test_accept_lands_an_update_of_a_surfaceable_unapproved_item_as_approved(draftandproposed) and::test_accept_lands_the_first_revision_of_a_create_only_draft_item_as_approved,::test_accept_lands_a_proposal_that_keeps_a_retired_item_retired,::test_accept_lands_a_hand_written_proposal_that_deprecates_an_approved_itemand::test_the_donor_proposal_is_acceptable_where_the_item_is_not_retired.tests/unit/test_readmission_carve_out.py::test_a_rejected_item_is_retired_for_the_floor_while_draft_and_proposed_are_notasserts thatmay_surfacewithholdsrejectedunderinclude_unapproved=True, and thatreadmitted_itemsreportsrejectedtoapprovedand reports neitherdraftnorproposedtoapproved.
tests/integration/test_draft_status_refusal.pyholds the draft side.::test_propose_refuses_to_draft_for_a_retired_item_and_writes_nothingrunstheurian proposefor adeprecated, asupersededand arejecteditem with a revision and for adeprecatedcreate-only one, and asserts a non-zero exit, a remedy namingrestoreItem, and the proposals tree and.gitignoreunchanged.::test_the_draft_refusal_is_one_constant_that_names_no_statusasserts that the three statuses' answers are equal and that the error names no status word.::test_okf_import_refuses_a_concept_whose_item_is_retired_locally_and_writes_nothingimports a concept for adeprecatedcreate-only item and asserts it is refused with nothing written, while its control::test_okf_import_still_drafts_a_concept_for_a_create_only_draft_itemadmits the same bundle for the item undeprecated;::test_okf_import_over_a_retired_item_with_a_revision_is_refused_as_retiredimports one for adeprecateditem with a revision and asserts onedraftrefusal with nothing written under either proposals directory. The import's record names only the exception class, so a spy onProposalService.draftreads the refusal raised, and the test asserts the messages are exactly[RETIRED_ITEM_MESSAGE]: a missing-revision refusal, which the record would show as the samedraftrefusal, fails it.::test_propose_still_drafts_for_a_surfaceable_itemand::test_propose_still_drafts_the_first_revision_of_a_create_only_draft_itemare the CLI's controls. Decision 6's bind for a retired item istest_update_label_inheritance.py::test_a_draft_for_a_withheld_item_matches_an_absent_id_across_two_corpora: adeprecatedcreate-only item, aconfidentialcreate-only one under the default ceiling and arejecteditem with a revision, each sent once withexpectedRevisionand once without to a corpus holding it and to one built without it. It compares the two answers, the two staged proposals trees and the SELECT statements each call ran throughopen_read_connection, all scrubbed of minted ids and instants, and asserts that the call withoutexpectedRevisiondrafts.review.generateKnowledgeCandidate's is ADR-0033's matching amendment.test_write_intent_wire.py::test_a_read_control_operation_is_refused_to_the_cli_over_the_wireholdsknowledge.generateMigrationDraftrefusing arestoreItem.Owed before the release that ships this fix, and met: a test of a proposal that carries a
changeSensitivityoperation of its own.acceptcompares the labels a replay leaves rather than the keys a document wrote, which is why it refuses one.test_accept_sensitivity_floor.py::test_accept_refuses_a_proposal_whose_own_change_sensitivity_lowers_the_itemappends achangeSensitivitytointernalto a draft whoseupsertRevisionkeepsconfidential, and asserts the same refusal, remedy and unmoved directories as the refusals above. Its control,::test_accept_lands_a_proposal_whose_own_change_sensitivity_raises_the_item, appends one raising aninternalitem toconfidentialand asserts that afteracceptandmigrate applythe row holds the new revision atconfidential.Not moved by this fix: a migration written directly under
.theurian/migrations/still gets the loader's defaults for an omitted label. The migration format says why, and what that means for a hand-written update. When the default lowers the item, the permissive-move report names it aslowers(::test_an_upsert_omitting_sensitivity_lowers_what_the_create_item_set).Amended by GHSA-wwq9-p8wq-5m68 (2026-10-08). The GHSA-v2qg amendment above rested on an unstated premise: that the label a later proposal sets is the label the replay ends on, unless a migration with a later id changes it. On that premise it left the sanctioned operations out of
permissiveMoves, and nothing atacceptcompared the label the proposal set with the one the replay ends on.What implementing it revealed.
MigrationSet._topological_order(domain/migration.py) replays a migration that declaresdependsOnafter every one that declares none, whatever the ids. So a landedchangeSensitivityorrestoreItemwith a smaller id, declaringdependsOn, undid the raise or deprecation of a proposal accepted after it, andknowledge.getserved what the proposal withheld. The face, measured oncore-v0.5.1, and its grade are T-29 in the threat model.Decided: refuse at
acceptby end state, report the inversion, keep the order. The refusals are T-28's control 5 and its residual 10, and thereordersrow is stated under that name in the migration format; none is restated here. What changed for callers, the honest historiesacceptnow refuses included, is in the 0.5.2 CHANGELOG's two Changed entries, both marked BREAKING._loosensnow decides whether a proposal lands as well, as the dated note in Decided: a report, not a refusal above records.The two checks are not to be unified. The 2026-10-06 note above records what each would miss under the other's rule. The report has to define an inversion against an order, so attribution is its definition;
accepthas to answer whether the label a reviewer approved is the label served, and only the end state answers that. The advisory's face is held by both, sotest_replay_order_serves_an_overwritten_label.py::test_an_accepted_label_is_not_overwritten_by_a_migration_that_declares_dependson, which builds it, does not catch a change that removes either one; T-29's What holds it records, measured on 8d7e2f09, which tests do.Considered and not taken: (C), change the order. A priority Kahn sort, taking the smallest-id ready migration one at a time instead of whole rounds, replays in id order wherever
dependsOnallows, and would remove the inversion rather than refuse and report it. Its costs:
- Served labels can move on upgrade with no migration changing, in any history that interleaves
dependsOnand root migrations on a shared field.MIGRATION_ENGINE_VERSIONmust bump. ADR-0007 puts the engine version in the state hash "so that an engine change invalidates cached state instead of silently reinterpreting it".- ADR-0039 decision 6 does not admit it as written. A bump that changes what an earlier-version document does is permitted "only with a recorded argument that no reader of the canonical state observes the difference", and a new order changes served labels, so that argument cannot be made. What is left is an
apiVersionbump for documents written under the new order, or an amendment of decision 6.- The serve path does not check which build wrote a state database (#853), so one the old order built is served until
migrate applyruns.- ADR-0005 decision 3, "
dependsOnis topologically sorted", moves with it.It would also leave two things open: a landed migration with a larger id still replays after a fresh draft, because id order is then the contract; and the post-accept race, T-29 residual 1, is unchanged. Migrations declaring
dependsOn, counted on main at 8d7e2f09 on 2026-10-08 bygrep -l '^dependsOn:'over eachmigrations/directory: 0 of the dogfood corpus's 49; 1 ofexamples/sample-project's 2, which sorts after its dependency and writes a different item; 0 of 38 and 0 of 6 in the two eval fixture sets. #897 tracks (C), gated on #853; adopting it changes what upgraded projects serve, so it is the maintainer's call.The tightening inversion is the recorded cost of keeping the order. A
dependsOnmigration that tightens a label can replay after a larger-idchangeSensitivitylowering orrestoreItem, andreorderscovers the loosening direction only. T-29 residual 4 records the histories measured, merged as files and throughacceptwith a hand-editeddependsOn, and what each ends at, reports and discloses. It is the clearest argument for (C), whose order follows ids in both directions whereverdependsOnallows.Amended by GHSA-fjqq-grr7-53cc (2026-10-08). At all three of
_redraft_remedy's call sites the remedy now names independsOnevery landed migration that writes a refused field and replays after the proposal's: the own row's rule (above), extended to the landed row, which named only that row's migration, and to_refuse_a_landed_overwrite, which named only the one that took the field below the proposal's. On adependsOnchain a redraft depending only on the named one could replay before a later writer of the field: on the hand-authored route nothing re-checked it, so it landed loose andknowledge.getserved the item at the default ceiling, and throughtheurian propose acceptit was refused again. The migration format states the rule. Naming only the last such writer would place the redraft in the same round of the replay sort (above) as naming them all; it was rejected so that the three sites share one rule. The remedy can list more ids:dependsOn: [D1, D2]where it read[D1]for a landed lowering and raise-back (test_accept_refuses_a_replay_order_overwrite.py::test_a_smaller_id_loosening_that_a_landed_migration_raises_back_is_refused_for_its_row).::test_the_hand_authored_remedy_followed_literally_keeps_the_item_withheldfollows the hand-authored remedy behind one to three landed writers, and::test_the_accept_routed_remedy_converges_on_the_first_redraft_of_a_deep_chainfollows it for atheurian proposeupdate and aknowledge.generateMigrationDraftdeprecation behind three, the first redraft accepted; both assert the item withheld fromknowledge.get. The errors and the routing are unchanged. Whether the hand-authored route should send its redraft throughtheurian propose acceptinstead is a separate decision, open here. (The errors, the routing and this decision are superseded below, 2026-10-09.)Decided on 2026-10-09: the hand-authored route goes back through
theurian propose accept. On the old route nodependsOntarget was safe. Naming too few writers left a later writer of the field replaying after the redraft, as with a second refused item, whose writers the report check did not name. Naming every later writer includes one that tightens the field, and the redraft then lowered it.dependsOncannot place a redraft after a lowering yet before a tightening that depends on it; only the re-check closes both. The remedy now says to edit the nameddependsOninto this proposal's own migration file and runtheurian propose acceptagain, and the report check names, in its remedy and in the own row's error, the landed writers of every field it refuses, not of the reported row's alone, which supersedes the own row's "that field of that item" above. The descriptions above of tests this changed were corrected in place to their bodies. Measured on 2026-10-09 by scratch runs outside the suite; "served" meansknowledge.getreturns the item at the default ceiling, "withheld" that it refuses:
Shape 0.5.2's remedy followed literally ( migrate apply)Every later landed writer named, followed literally (an intermediate state of this fix, never released) Through theurian propose accept(0.5.3)Two items refused, the second's later writer unnamed the second item ends internal, served;permissiveMoves[]with the staged id, onereordersrow with a fresh idthe same: the report check still named one item's writers the remedy names both items' writers; the re-accept exits 0; both end confidential, withheldA later landed migration tightens the field beyond the proposal staged id: withheld; fresh id: ends internal, served,[]staged id: ends internal, served, onereordersrow; fresh id: served,[]the re-accept is refused by the lowering floor ("would lower the sensitivity of …"); the item stays confidential, withheldThe redraft restates a co-carried item's older label after a landed raise of it the co-carried item ends internal, served;[]with a fresh id, onereordersrow with the staged idthe same the re-accept is refused by the lowering floor; the co-carried item stays confidential, withheld, and the other at its landed label, as nothing movedThe redraft restores a co-carried item after a landed deprecateItemof itthe co-carried item ends approved, served;[]with a fresh idnot measured the re-accept is refused by the readmission floor ("would readmit …"); the co-carried item stays deprecated, withheld, and the other at its landed label, as nothing movedOn 0.5.1 the first row, and the second's fresh id, are served as well, with
[]; the co-carried rows do not arise, as 0.5.1 accepts that proposal at its firstaccept(GHSA-wwq9-p8wq-5m68).Behind a landed lowering, the hand-authored remedy followed through
accepton 0.5.3, which keeps the proposal's staged id:
Writers of the field behind the lowering dependsOnthe remedy namesRe-accept Item knowledge.getat the default ceilingnone the lowering exit 0 confidentialwithheld one the lowering and that writer exit 0 confidentialwithheld two the lowering and both writers exit 0 confidentialwithheld 0.5.2's remedy followed literally served the item for one writer with the staged id and for two writers with either id. Rejected: keeping
migrate applyand refining the target to skip tighteners, since the tightener and co-carried shapes would still land unchecked; and no longer naming tighteners, a convergence improvement on the accept route (#898), not this fix.Amended 2026-10-14 (#915). The floor refusals in the tightener and co-carried rows above printed the content path's remedy, "draft the update again with
theurian propose", which cannot draft such a proposal. Since #929 the lowering and readmission floors, and both revision-conflict branches ofaccept's union refusal, route their remedy by what the proposal carries (proposal_service.py :: _is_content_only). A proposal ofcreateItemandupsertRevisionalone keeps its remedy; any other is told to remove every operation whoseitemIdis a refused item from its own migration file, delete any body file the remedy lists, and accept again, or to delete the proposal directory if those are all its operations, if_one_name, the helper the refusal messages use, would redact or cut an id or body path the cure would name, or if a body path is outside_PRINTABLE_BODY_PATHor resolves outside that directory. A raced revision's remedy keeps, on both routes, the alternative of giving the proposal's own migration theexpectedRevisionthe message reports, which does not work for a proposal that replays before the change that won the race (#931). (Superseded by the #931 amendment below, 2026-10-14, for a proposal with oneupsertRevisionof the raced item.)DRAFT_AGAIN_CLAUSEandACCEPT_READMISSION_REMEDYno longer print`dependsOn: [<its id>]`, a code span shaped as adependsOnlist that holds no migration id; they end "edit that migration's id into thedependsOnof the new draft's migration file." The quotations of the older clause above are its wording on their dates, and whattest_floor_refusal_remedy.py::test_every_remedy_that_says_to_draft_again_says_to_edit_dependson_inasserted then; it now asserts the new ending.test_floor_remedy_routing.pyholds the routing, and that body-path condition in unit tests only, by the user's decision (#939);test_accept_floor_remedy_followed_literally.pyfollows the printed removal to its end state for floor refusals and both conflict branches, andtest_floor_remedy_reaccept.pyfor the lowering floor's refusal of a re-accept; the migration format states what its floor tests assert.Amended 2026-10-14 (#931). For a proposal with one
upsertRevisionof the raced item, the race remedy now prints the revision (proposal_service.py :: ProposalService._edit_cure): "give the proposal's own migrationexpectedRevision: <rev>", and on the content route "draft the change again with --expected-revisionand delete /.", <rev>being the item's current revision in the landed set alone. Where the landed migration that wrote<rev>replays after the proposal's inMigrationSet.ordered(rejected: the error'sactual, which misses a proposal between two writers, and always printing it, which moves one already after), the edit adds "anddependsOn: [<id>], so it replays after the migration that wrote it". Rejected: dropping the edit in that order, which leaves the non-content route only the removal cure, and that drops the item's content update. With more than oneupsertRevisionof the item, or no revision for it in the landed set, the remedy names no revision and keeps "the expectedRevision the message reports": the store can then hold the proposal's own earlier revision, which no landed migration wrote (#950). The removal cure now ends "To keep a removed content update for an item that is not withdrawn, draft it again afterwards withtheurian propose; if it refuses, its refusal names the --expected-revision it needs." where a removedupsertRevisionnames a body of an item the landed set alone does not holddeprecated,supersededorrejected, and not with the directory-only cure (#937). Unless it is the directory alone, the cure lists every refused id and every body only those operations use, the bodies bounded byMAX_UPSERT_OPERATIONS, refused before_body_movesreads one; a cap was rejected because past it the directory-only cure discards the kept operations (#940). A body counts as one a kept operation uses by file identity (st_dev,st_ino), as_body_moveskeys it, so a hard link or a case variant of a kept body is not listed; an identity that cannot be read beside a kept body leaves "delete/." alone (#944). Over one upsertRevisionof the raced item, the landed draft's id larger or smaller, and the landed set applied or not,test_race_remedy_followed_literally.py::test_giving_the_refused_migration_the_printed_revision_and_writer_lands_its_revisionfollows the edit on the content route and a non-content one (another item'schangeSensitivityadded):dependsOnis printed when, and only when, the writer of<rev>replays after the proposal (a third case puts the proposal between two landed writers), it holds that migration's id alone, and the proposal's revision is current aftermigrate apply;::test_the_revision_the_remedy_names_is_the_one_the_landed_draft_wroteasserts each revision printed is the landed draft's; and::test_redrafting_with_the_printed_revision_after_deleting_the_proposal_lands_the_redraft(content route) and::test_the_printed_removal_cure_then_its_redraft_line_ends_at_the_new_revision(non-content route) follow the other alternative to the redraft's revision.::test_a_two_upsert_proposal_over_a_landed_revision_gets_the_message_reports_wordingholds the #950 wording on the content route.test_floor_remedy_routing.pyholds the redraft line's condition and the lists, and the identity rule in unit tests only by the user's decision (#939).
Context
ADR-0013 settled the direction — AI proposes, Git reviews, humans approve — and
named three write-intent tools: knowledge.proposeChange,
knowledge.generateMigrationDraft and review.generateKnowledgeCandidate. Three
milestones later the direction holds and none of the tools exists.
What does exist is the whole machine behind them. theurian propose drafts a
proposal today through ProposalService.draft(ProposalRequest)
(application/proposal_service.py), and everything ADR-0013 point 2 describes —
the schema-valid migration, the per-revision body path, the evidence file — is
that service's output. application/proposal_service.py's secret-scan docstring
already names the arrival this ADR designs, in its own words: the policy is read
inside the service rather than injected because "Milestone 7's write-intent MCP
tools are a second root arriving. A security control that a caller can omit by
omission is not a control."
So the design question is not what a write-intent tool does. It is: which tools, taking what over the wire, and at what moment does the server stop saying it has none.
The last question is the one with a measurable cost. writeTools: false is
not a note in a document; it is a per-build assertion published on a security
surface and pinned in several places. The population, with its key:
$ git grep -n "writeTools" be977ea7 | wc -l
18
$ git grep -l "writeTools" be977ea7 | wc -l
10
Exclusions, measured rather than asserted — git grep -n "writeTools"
be977ea7 -- <path> for each: .claude/ drops 0, .theurian/ drops 0,
docs/work-logs/ drops 0. The unfiltered key is therefore the same
population as a filtered one at this frame, which is why no pathspec is applied.
The ten files are not all prose. Five of them carry the flag in a build
artifact rather than in a sentence, and two of those five fail a build when
the flag's value moves. The difference matters to slice B4, so it is measured
rather than asserted. Flipping "writeTools": False to True in
mcp/tools.py, in a throwaway clone:
# control
$ python -m pytest .../test_mcp_tools.py .../test_wire_contract.py .../test_schemas.py -q
361 passed, 1 xfailed in 58.28s
# mutant: "writeTools": False -> True
$ python -m pytest .../test_mcp_tools.py .../test_wire_contract.py .../test_schemas.py -q
FAILED .../test_mcp_tools.py::test_capabilities_report_what_is_and_is_not_built
1 failed, 360 passed, 1 xfailed in 58.28s
# control
$ python -m pytest tests/e2e/test_daemon_single_instance.py -q -k capabilities
1 passed, 11 deselected in 3.72s
# mutant
$ python -m pytest tests/e2e/test_daemon_single_instance.py -q -k capabilities
FAILED tests/e2e/test_daemon_single_instance.py::test_capabilities_report_no_write_tools
1 failed, 11 deselected in 2.59s
| File | What it holds | Moves on a value flip? |
|---|---|---|
packages/theurian-core/src/theurian/mcp/tools.py |
the value itself | — it is the value |
packages/theurian-core/tests/integration/test_mcp_tools.py |
assert ...["writeTools"] is False, plus the pinned capability-key set |
Yes, on the value assertion. The key-set pin does not move |
tests/e2e/test_daemon_single_instance.py |
assert capabilities["capabilities"]["writeTools"] is False over a real client |
Yes |
packages/theurian-core/tests/integration/test_wire_contract.py |
the conformance negative, {"writeTools": "false"} — a string where a boolean belongs |
No. It is a type negative |
schemas/mcp/system-capabilities-response.schema.json |
the property and its description | No. A schema constrains the type, not the value |
A second, narrower key reaches the capabilities note, which does not contain the flag's name:
$ git grep -n "No write-intent tool exists" be977ea7 | wc -l
3
— one in mcp/tools.py's capability block and two in the test that pins its
wording, including the inversion the assertion message spells out.
The served corpus is outside both keys, and that is measured rather than
assumed. .theurian/ drops 0 for the flag key; the corpus's
ai-writes-produce-proposals twins carry ADR-0013's design statement about
write-intent tools, which registering one does not falsify. Nothing here creates
a re-seed obligation.
Decision
1. knowledge.proposeChange is the content path, and it maps 1:1 onto ProposalService.draft
The tool takes a proposed change and returns what was written. It adds no behaviour of its own: the service mints the identifiers, chooses the paths, validates the migration against the published schema and refuses an unguarded update. A second implementation of any of that is the defect this decision exists to prevent — ADR-0027 records what it costs when two procedures disagree about the same set.
The wire input carries projectId (every project-scoped tool requires an
explicit one; the server's own instructions say there is no default project)
plus the fields ProposalRequest declares:
| Wire field | Maps to | Note |
|---|---|---|
itemId, title, kind, owner, author, description |
the same-named ProposalRequest fields |
each refused empty at construction |
body |
ProposalRequest.body |
inline text — decision 2 |
contentType |
ProposalRequest.content_type |
a closed enum: text/markdown, application/json, application/yaml, the three MediaType constants cli/propose_commands.py's _CONTENT_TYPES maps its five accepted suffixes onto |
evidence (agentId, taskId, model, reasoning) |
Evidence |
decision 4 |
sourceAnchors[] |
both Evidence.anchors and ProposalRequest.source_anchors |
one wire field fills two domain fields, which is what propose_commands.py's _request already does from one --source-uri. They stay separate fields in the domain because they have separate readers and separate requirements: the anchors in evidence.json are read by the humans reviewing the pull request and by no code path, while metadata.sourceAnchors is what migrate apply enforces for INV-8. The wire does not reproduce the split, because a caller has one answer to "where did this come from" |
labels[], scopePaths[], namespace? |
the same-named fields | namespace absent defaults to the item id's own |
trustLevel?, sensitivity? |
the same-named fields | absent means "not stated", never a stamped default: ProposalRequest records that writing unverified/internal into every draft "would assert a judgement the caller did not make (#249)" |
expectedRevision? |
ProposalRequest.expected_revision |
the optimistic-concurrency gate (ADR-0006): required for an update, refused on a first revision — _check_expected_revision refuses both directions with a remedy |
local? |
draft(local=...) |
ADR-0028 routing; it is a parameter of the act, not a field of the reviewed text |
The output mirrors the CLI's _drafted_payload (cli/propose_commands.py):
proposalId, proposalDirectory, migrationId, migrationFile,
revisionId, expectedRevision, bodyFile, evidenceFile, contentFile,
contentSha256, bodyDestination and the next-steps list. One payload shape
for two front ends is the point: a human reading a CLI result and an agent
reading a tool result are looking at the same proposal, and a second shape would
be a second thing to keep true.
contentType is explicit on the wire because the CLI's derivation has no
input here. _read_body reads the media type off the body file's suffix and
refuses a suffix it does not know. There is no file on this path (decision 2),
so the caller states the type instead of a filename implying it.
2. The body is inline text, and a file path is refused by construction
knowledge.proposeChange takes the body as a string. It does not take a
path, a URI, or any other reference the daemon would have to dereference.
This is a security decision and not an ergonomic one. The daemon runs as the
operator, and a tool that accepted a path would be a read primitive over the
caller's filesystem reachable by any MCP client that can talk to it — the
caller's private keys, the caller's ~/.claude.json, anything the operator can
read — laundered into a proposal directory and, by ADR-0013 point 7, into a
pull request. That exact shape has been reproduced on this project once already:
ADR-0013's Milestone 7 amendment records a class of accept-path defect "one of
which read an out-of-project secret (~/.claude.json, ~/.kube/config) into a
git-tracked file, an exfiltration channel", caught in review and never shipped.
Refusing the shape is cheaper than containing it. A containment check has to be right about symlinks, case folding, Unicode normalisation and TOCTOU on every platform; an absent parameter has nothing to be right about.
3. knowledge.generateMigrationDraft is the operations path, and v1 carries ten of the fourteen operation kinds
knowledge.proposeChange covers exactly one shape of change: a body and the
revision that carries it. The other twelve things a migration can say — a
deprecation, an alias, an owner change, a relation, a specification registration
— have no tool at all, and the generator cannot express them: _migration_document
emits precisely createItem and upsertRevision
(application/proposal_service.py), two of the fourteen members of
OperationKind (domain/migration.py, counted from the enum body).
So the second tool takes a migration document and lands it as a proposal.
Its v1 operation set is the closed OperationKind set minus createItem,
upsertRevision, changeSensitivity and restoreItem — ten of the
fourteen. The first two are refused with a remedy naming
knowledge.proposeChange; the other two are refused for their own reasons,
below.
The set is chosen on an axis, not on a count, and the axis is what a wrong proposal moves. Classifying all fourteen:
| Axis | Operations | In v1? |
|---|---|---|
| Moves content — a body, a revision pointer, the digest pin | createItem, upsertRevision |
No. The content path owns them (below) |
Moves an enforced read control — may_disclose, the deployment's sensitivity ceiling (#119, ADR-0025) |
changeSensitivity |
No. Pulled; see below |
Narrows an enforced surfacing control — may_surface, the status gate, in the withholding direction |
deprecateItem |
Yes. It can only take an item out of the surfaceable set |
Widens that same control — may_surface, in the readmitting direction |
restoreItem |
No. Pulled; see below |
| Moves addressing — a second key that resolves to an item (T-21) | addAlias, removeAlias |
Yes, with the refusal's timing named below |
| Moves governance metadata — ownership, relations, specification lifecycle, evidence links | addRelation, removeRelation, changeOwner, registerSpecification, supersedeSpecification, addEvidence, removeEvidence |
Yes |
changeSensitivity is pulled because it is the one operation whose reviewer
cannot see the thing it moves. Sensitivity stopped being a write-time refusal
and became an enforced read control when #119 landed (may_disclose,
domain/enums.py; ADR-0025) — a declassification proposal therefore widens who
may read an item, and how much it widens depends on the deployment's
sensitivity ceiling, which is not in the migration and is deliberately not
published on system.capabilities (mcp/tools.py records that a flag may be
published there while a ceiling may not). A human reading the pull request sees
confidential → internal and cannot see what that admits. That is a decision
that deserves its own recorded justification, and this ADR does not write one;
it takes the operation out of v1 instead, additively recoverable later.
docs/roadmap.md's Phase B risks row is the second half of the reason: "review
text is untrusted content, and turning it into a candidate is precisely the path
by which an injected instruction becomes a knowledge candidate." An injected
instruction that reaches a declassification is the worst member of that family,
and v1 does not carry it.
deprecateItem and restoreItem both move the status gate, and only one of
them stays. The distinction is which direction it moves it in.
deprecateItem stays. It sets DEPRECATED
(application/migration_engine.py:485), a status outside SURFACEABLE_STATUSES
under both values of includeUnapproved (domain/enums.py), so the worst a
wrong proposal does is withhold an item that should have stayed visible — a
reviewer meets that as a missing answer, not as a disclosure. A reviewer reading
the migration also sees the whole of what it does: the statuses are in the
document, the set of surfaceable ones is in the domain, and nothing about the
deployment changes the answer.
restoreItem is pulled, because it readmits from any status, and the wire
shape lets it say nothing about why. Three measurements, each with the key
that settles it.
One — there is no transition check. restoreItem sets APPROVED from
whatever status the item currently holds:
# application/migration_engine.py:497-498
case RestoreItem():
self._set_status(writer, project_id, operation.item_id, KnowledgeStatus.APPROVED)
_set_status (application/migration_engine.py:676-686) looks the item up,
raises on an unknown id, and writes item.with_status(status). It takes the
target status as an argument and never reads the current one. The walk that
would find a transition rule elsewhere returns nothing:
$ git grep -c "DEPRECATED" -- packages/theurian-core/src
packages/theurian-core/src/theurian/application/migration_alias_guards.py:2
packages/theurian-core/src/theurian/application/migration_engine.py:1
packages/theurian-core/src/theurian/domain/enums.py:1
Four lines in three files, read one by one: the alias guard's own status
projection (:75) and its deprecated-is-exempt test (:137), the
deprecateItem write above (:485), and the enum member (domain/enums.py:29).
Not one of them asks what a restore is restoring from. The key's limit: it
finds only the spelling DEPRECATED, so a transition table written in some other
vocabulary would be invisible to it — which is why the engine's own
case RestoreItem() arm is quoted above rather than inferred from the absence.
Two — REJECTED is inside that reach, and it is the one status no flag
surfaces. domain/enums.py:206-219 says so in its own words: REJECTED "is
deliberately absent and there is no flag that adds it. A rejected revision is
one the team decided must not be followed, and it is also where a secret that
caused the rejection still lives." A restoreItem over a rejected item is
therefore the one operation in the set that can republish content the read gate
is built never to serve, and it does it in the widening direction.
Three — the wire shape is weaker than that of the operation this ADR had
already pulled, so admitting one while pulling the other had the contrast the
wrong way round. opRestoreItem
(schemas/migrations/migration.schema.json:253-262) requires exactly op and
itemId; its reason is an optional property, so a schema-valid restore can
carry no rationale at all. opChangeSensitivity (:305-318) requires op,
itemId, sensitivity and reason, and the schema's own description of
that field states the principle: "Reclassification changes who may read the
content, so the rationale is part of the record." The two operations move who
may read an item by different routes, and the one with the weaker record is the
one an earlier draft of this ADR admitted.
The readmission path is owed, not closed. Widening is additive — the third
of the three reasons for the content split, below, says why — and a later slice
that admits restoreItem has to bring three things with it:
- A transition-aware refusal — restore admitted only over a
DEPRECATEDitem. That is already the operation's documented meaning:docs/protocol/migrations.md:86givesrestoreItemas "Undo a deprecation", which the engine does not enforce. That mismatch is pre-existing, is not created here, and is recorded on #272 — the status-transition-graph ADR candidate that owns the enforcement — in its 2026-09-12 comment. - A wire-required
reason, in the shapeopChangeSensitivityalready uses, so the human reading the pull request is told why an item is coming back. - A named seat. Apply-time enforcement of the status transition graph is
docs/roadmap.md's Phase D item ① and its ADR candidate #1 ("Enforcing the status transition graph — define the legal transitions and check them in the migration engine"). A tool-side refusal is narrower than that and does not substitute for it; whichever lands first, the other is still owed.
addAlias carries the T-21 shape, and what is owed about it is when the
refusal arrives, not whether. An alias key equal to a live item id let a read
gate that resolves the alias evaluate the wrong item's authority — closed in
0.1.0.dev6 by refuse_alias_item_id_collision
(application/migration_alias_guards.py), a whole-set static guard that runs at
migrate validate, at migrate apply and inside MigrationEngine.apply, and
that propose accept also runs as stage 3 of its union rehearsal
(_refuse_unless_the_union_applies, ADR-0027 decision 2).
draft does not run it: it validates the document against the schema and
nothing else. So an agent's colliding addAlias is written, reviewed by a human
and then refused at accept — the shape ADR-0013's INV-8 note names, where a
document "is schema-valid and then exits 4" after a person has already spent the
review. Slice B4 owes whether the operations path runs the whole-set guards at
generation as well. It is named here so it is a decision rather than a
discovery — and it is a disclosure question as well as a cost one, which an
earlier draft of this ADR got wrong by calling it "a cost question … and not a
safety one".
The guard's refusal is an existence-and-status oracle, measured in the
refusal's own construction. AliasItemCollisionError
(domain/errors.py:197-240) renders both the colliding item id and its status —
the first two of the message's four lines, verbatim:
# domain/errors.py:236-237
f"{migration_id}: addAlias {alias} -> {alias_target} collides with knowledge item "
f"{alias} (status {item_status}). An alias key and an item id must be distinct: a "
and item_status is computed over the unfiltered landed set.
_alias_item_collisions (application/migration_alias_guards.py:124-144) reads
_final_item_statuses(migration_set) — a fold over every operation in
MigrationSet.ordered(...) with no status filter and no sensitivity filter — and
yields the status straight into the error. So running the guard at generation
would answer, for an alias key the caller chose, does an item with this id
exist, and what status is it in — including rejected, the status
domain/enums.py:206-219 records as reachable through no flag. The guard's own
docstring already names the dangerous case ("a rejected item is the dangerous
case"); what is new here is that the refusal publishes it.
That does not settle which way slice B4 should go: refusing late is the cost ADR-0013's INV-8 note prices, and refusing early is the oracle above. What it settles is that the decision is bound by decision 6's rule and cannot be made on cost alone.
Three reasons for the content split, in order of weight:
- The operations path must not become a second body pipeline. A
upsertRevisionaccepted here would needcontentFile, the digest pin, the per-revision body path and the replacement guard — every mechanism ADR-0013's amendment and ADR-0027 record as hard-won — reimplemented against a hand-authored document. Two pipelines that must agree about the same set is the defect shape, not the feature. - The split is legible to a caller. Content goes to
proposeChange; everything else exceptchangeSensitivityandrestoreItemgoes togenerateMigrationDraftis a rule an agent can follow without reading this ADR. - Widening is additive. Admitting
upsertRevision,changeSensitivityorrestoreItemlater adds a capability; no client breaks. Narrowing later would break clients, which is why the v1 set is the conservative one.
Validation reuses the existing entry point, reached the way the service
already reaches it. validate_migration_document
(infrastructure/filesystem/migration_loader.py) takes a parsed mapping rather
than a path, and its docstring already names this use: "a generator can refuse
to write a migration it has just built wrong rather than leaving one on disk for
a reviewer to discover. ADR-0013 point 3 is the reason it belongs at generation."
It also already carries the bounds an untrusted document needs
(MAX_DOCUMENT_NESTING, MAX_DOCUMENT_NODES, MAX_DOCUMENT_RENDERED_CHARS,
recorded there for #291 and #245).
The route to it is the injected MigrationDocumentValidator, never a direct
infrastructure import. ProposalService already takes validate:
MigrationDocumentValidator in its constructor, and the constant's own docstring
says why: "Supplied by the composition root, because locating and reading
schemas/ is an adapter's job (ADR-0003)." The CLI fills it with
lambda document: validate_migration_document(document, schemas)
(cli/propose_commands.py); the MCP composition root fills the same parameter.
A draft-from-document entry that imported the loader would put an adapter import
in the application layer and give this path a second validator the accept-time
rehearsal is not holding — _refuse_unless_the_union_applies runs "the same
MigrationDocumentValidator draft calls" precisely so a proposal this build
generated cannot fail its own acceptance.
Two guarantees the CLI has are the CLI's, and the wire path does not inherit
them. Both live in cli/propose_commands.py, above the service:
| CLI guarantee | Where it lives | What owes the wire equivalent |
|---|---|---|
The body is capped at MAX_SOURCE_FILE_BYTES (8 MiB) |
_read_body, applied to the body file's stat().st_size — there is no file on this path (decision 2), so nothing applies it |
ADR-0031's published input schema (slice B2) carries an explicit maxLength on body, and slice B4 drives it — in a unit that is still open, since maxLength counts code points and this cap is in bytes, so the wire bound must either be the sound over-approximation plus a byte check at landing or an explicitly recorded different unit (#691) |
--label authored-in-theurian beside --authored-here is deduplicated |
_merge_labels, which exists because revisionMetadata.labels is uniqueItems in the migration schema and a duplicate would fail the generator's own validation |
The published input schema sets uniqueItems on labels[], so the refusal is a schema refusal with a key path rather than a validation failure over a document the caller cannot see |
Amended 2026-10-20 (#691). The first row's open unit took the first answer: the sound over-approximation plus a byte check at landing. The
maxLengthisMAX_REQUEST_BODY_BYTEScode points, and since PR #1001ProposalService.draftrefuses a body whose UTF-8 is overMAX_SOURCE_FILE_BYTESand writes nothing, so the cap now applies on this path, in the service. The other answer, a cap recorded in code points, would still draft bodies thataccept's byte-capped read refuses.
Neither is a defect in the CLI; both are the consequence of the service taking already-read text. What would be a defect is assuming they travel.
What lands is a proposal directory, through a draft-from-document service
entry owed to slice B4. No such entry exists today: ProposalService.draft
takes a ProposalRequest and builds the document itself. Writing that entry —
so that this path lands through the same guards, the same identifier minting and
the same secret-scan-at-accept posture — is implementation work this ADR names
and does not do.
4. Evidence requiredness is preserved over the wire, and it is already enforced twice
agentId, taskId, model and reasoning are required on every write-intent
call, and the enforcement an MCP tool gets is the enforcement that already
exists rather than a third copy:
Evidence.__post_init__callsrequire_evidence(domain/proposal.py), which refuses an emptymodeland an emptyreasoning.AgentIdandTaskId(domain/identifiers.py) refuse an empty or over-length value at construction, so an absent agent identity cannot be spelled as"".ProposalRequest.__post_init__callsrequire_evidenceagain, andrequire_evidence's own docstring says why the second call is not redundant: it makes "rejected at generation" a property of the generation path rather than of one constructor, "so that a caller holding anEvidencebuilt by any other route still cannot package a proposal out of it."
A tool that constructs an Evidence therefore inherits ADR-0013 point 5 without
asking for it, which is the property this decision records rather than adds.
What is enforced is presence, not truth, and the heading should not be read
otherwise. All four values are caller-asserted strings. The daemon does not
authenticate agents — tool-context.schema.json says so in its own words about
the same fields: "Provenance only. Theurian does not authenticate agents; this
labels which run produced a proposal." What the two require_evidence calls buy
is that a proposal cannot be packaged with the provenance missing; an agent
that lies about its identity is outside this control and outside this ADR.
agentId and taskId have two wire addresses, and the precedence is decided
here rather than left to collide. tool-context.schema.json types optional
top-level agentId and taskId on every project-scoped call, and the evidence
object above carries the same two names. For the write-intent tools:
The
evidenceobject is authoritative.agentIdandtaskIdinside it are required, and they are what reachesEvidence. The top-level tool-context fields remain optional ambient provenance and are never read into a proposal. When both are present and disagree, the call is refused rather than resolved by precedence — the two spellings would otherwise record one identity inevidence.jsonand a different one in whatever observes the request.
The refusal is expressed in the published input schema where the relation is
expressible, and in the handler where it is not: a cross-field equality between
a $ref'd context property and a nested one is the kind of constraint a schema
can state only awkwardly, and ADR-0031 decision 6's direction is that the schema
may be tighter on a value domain — not that every relation must live in it.
Slice B2 settles which half carries it; slice B4 drives the refusal either way.
INV-8 stands on the same footing. ProposalRequest.__post_init__ refuses a
request with no source anchor and no authored-in-theurian label, with the
reason recorded in place: without it, a revision "is schema-valid and then exits
4 with 'has no source anchor'" after a human has already reviewed and merged it.
5. writeTools: true lands in the same commit that registers the first write-intent tool
Not a slice earlier, and not a slice later.
The argument is that writeTools: false is a claim, not a label. It is
published on system.capabilities — the surface docs/protocol/mcp-tools.md
calls "the runtime boundary for clients" — and it is asserted across the ten
files the Context key returns. docs/index.md states what a reader takes from
it: "No MCP write tool can directly create approved knowledge. Every tool a
client can call today is read-only, and system.capabilities reports
writeTools: false." Registering a write-intent tool while that value says
false ships a false answer to a security question, which this project's own
severity rubric grades as a published claim that misleads a security decision.
ADR-0026 already settled the direction and this is the mirror case. That ADR
records the flags as "evidence of capability honesty: a flag cannot be flipped
ahead of the feature it advertises", and names reviewFindings: true as "the
case in the other direction — a flag that moved with the feature it
advertises". This decision is that same pairing for writeTools: the flag moves
with the feature, in one commit, in both directions.
ADR-0030 chose the opposite trade deliberately, and recorded what it cost.
There, the fetch path shipped in slice 1 while reviewIngestion stayed false
until slice 3, and the ADR records the bounded residual in its own words: "for
those two slices the machine-readable security statement reads false while a
fetch path ships, which is a wrong answer to a security question even when no
feature is lost by it." What bounded it there was that no tool was callable, so
a client acting on the false lost no capability it could have had. That
bound does not exist here, because the thing being shipped is the callable
tool — so the residual ADR-0030 could price is one this surface cannot.
review.generateKnowledgeCandidate (ADR-0033) then arrives additively at slice
B5 with no flag change, because writeTools answers whether any write-intent
tool exists and not how many.
6. A refusal about an item the caller may not see is indistinguishable from a refusal about one that does not exist
This surface's refusals answer questions about items. Some of those items the
caller may not read — a rejected item, an item above the deployment's
sensitivity ceiling (#119, ADR-0025) — and a refusal that distinguishes
withheld from absent is a disclosure channel, which is the family
ADR-0033 decision 5 designs the same
shape for on its sibling surface. The bind is over the surface, not over one
tool, because both tools take item ids and both have refusals that are
computed over unfiltered sets — proposeChange through _check_expected_revision
(below) and generateMigrationDraft through the alias guard's
AliasItemCollisionError (decision 3, if the guard runs at generation):
For an item outside the caller's view, every write-intent tool on this surface refuses indistinguishably from an item that does not exist. Such a refusal carries no current-revision id and no status.
The status half is not a generalisation for its own sake: it is the one value
the alias guard's refusal publishes and _check_expected_revision's does not,
and a bind written only against the revision id would have left it out.
The authority is the existing gate pair, not a second comparison. "Outside
the caller's view" means what may_surface and may_disclose (domain/enums.py)
say it means, and the caller-scoped lookup this decision owes consults them
rather than reimplementing the test. The reason is recorded in
may_surface's own docstring — the index builder used to inline the two
comparisons "which is one copy of a security rule too many" — and it is enforced
by the equality pins named in Compliance, which fail on an addition as well as
a removal.
The mechanism this binds is already in the tree, and it is named rather than
inferred. expectedRevision (decision 1) puts _check_expected_revision
(application/proposal_service.py) on the wire, and its three refusals publish
more than a rejection:
| Refusal | What it publishes |
|---|---|
<itemId> does not exist yet, so its first revision cannot replace <rev> |
non-existence |
<itemId> already exists at revision <rev>; an update must state which revision it replaces (:960) |
existence and the current revision id |
<itemId> is at revision <rev>, but --expected-revision names <rev> |
existence and the current revision id |
The current revision comes from the injected CurrentRevisionLookup, and the
CLI fills it with current_revision_in(migrations, item_id)
(cli/propose_commands.py), which folds every UpsertRevision in the
unfiltered loaded migration set — no status filter, no sensitivity filter
(domain/migration.py). On the CLI that is correct: the caller is the operator,
holding the repository the set was read from. On the wire it is an oracle over
items the read surface withholds.
The seat of the fix is the injection point, not a string change.
CurrentRevisionLookup's own docstring already anticipates it — "Milestone 7's
MCP tools supply their own view of the same state" — so the wire path supplies a
lookup scoped to what the caller may see, and the refusal shape follows from the
lookup rather than from remembering to redact a message.
For an in-view item the revision id stays in the refusal, deliberately. It
is the whole remedy of an optimistic-concurrency failure (ADR-0006): a caller
told only "that is stale" has to go and find the right value, and the message
that names it is the difference between one call and three. The bind is scoped
to out-of-view items, and that scoping is the decision, not an oversight. The
same reading applies to the alias guard's status: an author refused over an item
they may read needs to know it is rejected in order to fix the document.
7. Preconditions, in order
- ADR-0031's input validation (slice B2) lands before any write-intent tool
registers.
docs/roadmap.md's Phase B row already binds this — "SEC-12 … becomes mandatory the moment a write-intent tool opens" — and the reason is the direct one: a write-intent tool is the first surface where a dropped key means a proposal a human reviews without a constraint the agent believed it had set. - ADR-0034's merge enforcement (slice B3) lands before any write-intent
tool registers. The same roadmap row states why: "T-15's 'nothing enforces
the merge' residual is a Phase B precondition, not a background fact:
opening a protocol-level write path multiplies the callers who can put a file
in
.theurian/migrations/, andmigrate applydoes not ask whether it was committed." - The tools and the flag (slice B4), in the order decision 5 fixes.
8. The standing guarantees extend to the new tools rather than being weakened for them
- Registration goes through
_tool. The seam refuses a callable that defers its body — a coroutine, an async generator, a generator — at registration time, because_forwarding'sexceptarm "only sees exceptions raised while it is on the stack" and the conversion "silently stops applying, and only under mcp >= 2.1" (mcp/tools.py,_tool). A write-intent tool that wants to be async is a design change with its own reasoning, not a decorator choice. -
The bytecode walk enumerates them automatically, and that is less than it sounds — so the gap is stated and slice B4 owes the control that closes it.
tests/integration/test_mcp_tools.py::test_no_registered_tool_can_reach_a_canonical_writeenumerates the built server rather than a list, so a new tool joins the sweep by existing. What the sweep then asks is narrower than "reaches approved state": -
Its reach is one level.
_referenced_nameswalks the registered callable's own code-object chain — the_forwardingwrapper, its__wrapped__, and nested code inco_consts. It does not enter the body of anything the tool calls, so a write performed inside a collaborator is invisible to it. - Its forbidden set is the canonical-store movers.
WRITE_GATEWAYS(SqliteWriter,write_transaction) together with the method names that exist onSqliteWriterand not onSqliteCanonicalStore— 17 names, computed live by_mutating_method_names.draft,acceptand_commitare in none of them.
So a tool that closes over a ProposalService and calls accept() passes the
sweep GREEN, while _commit writes into .theurian/migrations/ and
.theurian/knowledge/ — which is approved state in everything but the merge.
The sweep is a real control over canonical writes and it does not, by
itself, hold "no tool reaches approved state" over this surface.
docs/security/threat-model.md's T-12 control rests on that reading, in
its own words: "no MCP tool reaches a write path for approved state — not
behind a flag, not behind a permission. Write-intent tools emit proposal
files. A test enumerates every registered tool and asserts none reaches a
canonical write." The first sentence is stronger than the third, and slice B4
is where the gap between them has to close rather than widen. Both the control
and the two owed items below are named in Compliance.
- ADR-0013's owed E2E is discharged at slice B4. Its Still owed section
names it — "an E2E test asserting approved knowledge is unchanged after a full
agent session that calls every write-intent tool" — and records that the
property "still holds vacuously today" because no such tool is registered.
Slice B4 is where it stops being vacuous.
- SEC-11 needs no wiring. The secret-scan policy is read inside
ProposalService rather than injected, and the docstring's stated reason is
this arrival: an injected policy "is one a composition root can forget to
wire, and Milestone 7's write-intent MCP tools are a second root arriving."
So a tool that drafts through the service inherits the accept-time gate.
Draft-time advisory scanning is a different control and stays owed —
#330's remaining half,
inherited by this surface rather than introduced by it.
Consequences
Positive
- "AI proposes" becomes a protocol rather than a CLI. An agent from any vendor reaches the same proposal path Claude Code reaches today, which is Phase B's stated goal.
- One service, two front ends. Every guarantee
ProposalServiceholds — fresh identifiers, the digest pin, the unguarded-update refusal, the containment on writes — arrives with the tools rather than being rebuilt for them. The guarantees that live above the service, incli/propose_commands.py, do not travel, and decision 3 names both of them rather than letting this bullet imply they do. - The capability surface stays honest at every commit. No window exists in
which the machine-readable answer and the registered tool set disagree. This
line was scoped to once the coupling pin in Compliance lands, because until
then decision 5 was a rule a reviewer enforces; the pin landed with slice B4 as
tests/unit/test_write_tools_flag_claims.py::test_writetools_reads_true_exactly_when_a_write_intent_tool_is_registered, so the scoping is discharged rather than deleted.
Negative
- The wire surface is now something that can be got wrong. Two tools with large inputs is a larger contract than none, and ADR-0031's schemas are what hold it. The two ADRs are load-bearing for each other.
- A proposal directory is an agent-writable artifact reachable over the network-facing daemon. The daemon is loopback-bound and authenticated (ADR-0002, ADR-0011), and the write is confined to the project's proposal directory by tests that diff the whole tree — but the set of principals who can create a file in a repository grows by exactly this change, which is the fact ADR-0034's precondition exists for.
generateMigrationDraft's v1 refusals will be met by callers. An agent that reaches forupsertRevisionthere is told to use the other tool; one that reaches forchangeSensitivityorrestoreItemis told to use the CLI and has no tool to be redirected to. That is a deliberate cost of decision 3 and it will read as a limitation before it reads as a design.- Two of the three tools' owed controls were new work, not inherited.
Decision 6's caller-scoped revision lookup and decision 8's draft-only facade
were properties nothing in the tree held when this ADR was accepted; the sweeps
that looked like they held them did not. Naming that here was the point of the
two Compliance entries, and pretending otherwise is what the round that found
this was correcting. Both were built in slice B4 —
DraftOnlyProposalsand the lookupregisterinjects — and Compliance names what holds each.
Neutral
- The proposal format does not change.
docs/roadmap.md's Phase B row already says so, and this ADR keeps it: the migration, the body path and the evidence file are whatProposalServicealready writes. - Nothing about the accept path moves.
theurian propose acceptstays the human's command, and ADR-0027's validate-before-move stays its gate.
What this does not close
review.generateKnowledgeCandidate. Its own design is ADR-0033; it registers at slice B5, additively.- The remaining planned
knowledge.*tools —getContext,trace,listChanges,checkFreshness,submitFeedback— stay planned. This ADR neither builds nor retires them. - The ten operation kinds in
generateMigrationDraft's v1 set are admitted, not exercised. Which of them a real agent can usefully author, and what remedy text each refusal needs, is slice B4's to find by running it. - Widening
generateMigrationDraftto the content operations, tochangeSensitivity, or torestoreItem. Additive by construction (decision 3), and not designed here. Each of the two non-content ones needs its own recorded justification: what a declassification admits depends on a deployment ceiling the reviewer of the pull request cannot see, and a readmission needs the three things decision 3 names — a transition-aware refusal, a wire-requiredreason, and a decision about whether the enforcement seat is the tool or the engine (Phase D's ADR candidate #1). - Whether any residual disclosure survives decision 6's bind — answered at
slice B4, and now a measurement. The bind names the shape and two
seats — a caller-scoped
CurrentRevisionLookupforproposeChange, and, if decision 3's open question is answered at generation, whatever scopes the alias guard's status forgenerateMigrationDraft. Slice B4 ran the equality this owed on both — in the same-corpus shape the decision-6 compliance entry records, not the two-corpora one asked for here; that entry states the difference and the one channel the same-corpus form cannot catch (one carried by collection-wide state): the value channel by the disclosure oracle (test_write_intent_disclosure_oracle.py), the duration channel by the zero-body-read pin (test_pre_gate_body_materialization.py) plus an out-of-band timing measurement. On the value channel the refusal a caller reads carries no residual, to that entry's recorded reach. On the duration channel the body-size term is closed by the body-free lookup (get_item_metadata, T-26 face 4), so a refusal's timing no longer scales with a withheld body; the one residual is a content-independent existence term of ~9 µs — a withheld item that exists reads a bodyless pointer row where an absent id reads nothing — which carries no withheld content, sits about 155× below the ~1.40 ms transport floor (TB-1), and is not a gradeable disclosure. The equality covered refusals as well as responses, which is why timing was in scope: the duration channel decision 6's does not close row named is the ~9 µs existence term this measurement bounds, not the body-size one B4 removed. - Rate, size and concurrency bounds on a write-intent call. A caller able to make the daemon spend work no recorded limit bounds is the T-6 family's; #26's concurrency cap is the precedent for how such a bound is recorded.
- Draft-time secret scanning. #330's owed half, inherited here and not discharged here.
Alternatives considered
| Alternative | Why rejected |
|---|---|
Register the tools behind a configuration gate, dark, and flip writeTools in a later slice |
It makes a deliberately build-constant surface deployment-dependent. system.capabilities resolves no project and passes no _resolve (mcp/tools.py records that as the reason a flag may be published there while a sensitivity ceiling may not), so a config-dependent writeTools would be the one value on that block whose meaning varies per installation — and the pinned capability-key and tool-set assertions would each need a second, conditional arm. It also does not avoid decision 5's problem; it relocates it, since the build that can be configured to register a write tool is a build whose false is already conditional. |
One omnibus knowledge.write tool taking an operation discriminator |
Its blast radius is unnameable — "what can this tool do" has no answer shorter than the whole migration schema — and SEC-12's input schema becomes a union over fourteen operation shapes plus a body pipeline, which is the shape ADR-0031 decision 6's agreement check cannot usefully hold. Two tools with two schemas is what makes each one reviewable. |
Flip writeTools: true as its own later slice, after the tools land |
This is ADR-0030's reviewIngestion trade, and it does not transfer. There, no tool was callable during the window, which is what bounded the residual to "a wrong answer that costs no capability". Here the callable tool is the thing shipping, so the window would be a registered write path published as absent. |
Flip writeTools: true a slice early, so the flag never lags |
The mirror defect, and the one ADR-0026 names directly: a flag flipped ahead of its feature is exactly the dishonesty the pinned block exists to catch. A client told a write path exists and handed a METHOD_NOT_FOUND has been given a false answer in the other direction. |
Accept a body file path, with security/paths.py containment applied to it |
Containment is designed to keep project reads inside the project root; a caller-supplied path on this surface has no project root to be inside, since the body is by definition not yet in the project. The check that would be needed is "is this path one the caller is entitled to read", which the daemon cannot answer — it runs as the operator and sees the operator's whole filesystem. Decision 2 removes the parameter instead. |
Have the tools write proposal files directly, bypassing ProposalService |
It would produce a second procedure that must agree with propose accept about identifiers, digests and landed sets. ADR-0027 records what the first such disagreement cost, and ADR-0013's Compliance section records three separate accept-path procedures moved off filesystem enumeration onto the loaded MigrationSet for the same reason. |
Compliance
When this ADR was accepted it shipped no behaviour, so it had no shipped test to name. Its enforcement at design time was the measurements it cites; its enforcement at implementation time was the tests slice B4 owed, and the Still owed list below was written as properties an implementation must pin rather than as files that existed — the same honest split ADR-0030 states for the same reason.
Slice B4 has since landed, and the sentence above is corrected in place rather than left standing: the behaviour ships, and the section now partitions three ways — the dated design-time measurements, unchanged; what slice B4 discharged, each entry naming its test; and what is still owed, each naming its owner. An entry that landed in a different shape from the one this ADR asked for says so in its own words, because the difference is the part a later reader has to be able to attack.
Measured when this ADR was accepted, and reproducible from it (2026-09-12,
be977ea7). A dated reading, not a standing one — slice B4 moved several of
these, and the Landed entries below say which rather than editing the readings
here:
- The
writeToolspopulation is 18 lines across 10 files, with the key and its measured exclusions in Context, and the capabilities note is a second key returning 3 lines. Of the five non-prose files, 2 fail a build when the flag's value moves — mutation-measured in Context, control green. - The proposal generator emits exactly 2 of
OperationKind's 14 members —createItemandupsertRevision, read off_migration_document's returnedoperationslist inapplication/proposal_service.py. Decision 3's v1 set is 10: fourteen minus those two, minuschangeSensitivityand minusrestoreItem. restoreItemsetsAPPROVEDfrom any status, and nothing insrc/checks the transition.application/migration_engine.py:497-498passesKnowledgeStatus.APPROVEDto_set_status(:676-686), which reads the target status from its argument and never the current one;git grep -c "DEPRECATED" -- packages/theurian-core/srcanswers 4 lines in 3 files and none of them is a transition rule (the key and its limit are in decision 3).REJECTEDis in that reach, anddomain/enums.py:206-219records thatREJECTEDis reachable through no flag: "A rejected revision is one the team decided must not be followed, and it is also where a secret that caused the rejection still lives."- The alias guard's refusal renders an item id and its status, over the
unfiltered set.
AliasItemCollisionError.__init__(domain/errors.py:236-239) formats... collides with knowledge item {alias} (status {item_status}), anditem_statusarrives from_alias_item_collisions(application/migration_alias_guards.py:124-144), which reads_final_item_statuses(migration_set)— a fold overMigrationSet.ordered(...)with no status filter and no sensitivity filter. That is why decision 3's guard-timing question is bound by decision 6. - The status gate and the disclosure gate are each pinned by an exact-equality
set,
STATUS_GATE_CALL_SITESat 6 entries andDISCLOSURE_GATE_CALL_SITESat 5 (tests/unit/test_gate_call_sites.py, counted withastover the two assignments), and each has a prose count beside it indomain/enums.py(:231"six call sites",:273"five call sites") that no test derives from the set. Both pairs are movers for decision 6's owed lookup, and they are listed in Still owed rather than left to be discovered. - The two pulled non-content operations carry opposite wire requirements.
opRestoreItem(schemas/migrations/migration.schema.json:253-262) requires["op", "itemId"]and typesreasonas optional;opChangeSensitivity(:305-318) requires["op", "itemId", "sensitivity", "reason"]. - The bytecode sweep's forbidden set is 17 names —
WRITE_GATEWAYS(SqliteWriter,write_transaction) plus the 15 methods onSqliteWriterthat are not onSqliteCanonicalStore, computed live by_mutating_method_names(tests/integration/test_mcp_tools.py).draft,acceptand_commitare in none of them, which is what decision 8's second bullet records. ProposalRequestdeclares 16 fields, anddrafttakes one further keyword (local); the wire table in decision 1 is derived from that declaration rather than from the CLI's option list.- Evidence requiredness is enforced in two places on this path —
Evidence.__post_init__andProposalRequest.__post_init__, both callingrequire_evidence— with the reason for the second recorded inrequire_evidence's own docstring.
Landed in Phase B slice B4, with the test that discharges each. Each entry keeps the property as it was written and states what actually holds it:
- Both tools register through
_tool, and the walk covers them. Landed:tests/integration/test_mcp_tools.py::test_no_registered_tool_can_reach_a_canonical_writeand::test_every_registered_tool_goes_through_the_forwarding_seamare green over the enlarged built server, andtests/unit/test_tool_error_type_contract.py::test_every_tool_is_registered_through_the_one_seamholds that the two new tools go through the one seam rather than around it. The positive control that matters here istest_mcp_tools.py::test_the_walk_reaches_a_real_tool_body: the sweep is asserted to reach a real body, so it cannot pass over a set it never enumerated. - No write-intent tool holds an object that can move approved state, and the sweep is not what holds it (decision 8). Two controls landed, because one of them reaches one level and the other does not:
- A draft-only facade at the MCP composition root.
DraftOnlyProposals(application/draft_only_proposals.py) captures the two entries as closures rather than storing theProposalService, so its reachable surface is exactly{draft, draft_from_document}—acceptand_commitare not reachable as a method and not one attribute hop away through a_servicereference. Landed:test_mcp_tools.py::test_no_write_intent_tool_captures_an_object_that_moves_approved_statewalks each registered write-intent tool's closure cells over the built server;::test_the_closure_walk_flags_a_tool_that_captures_a_canonical_writeris the sibling control that a captured mover is flagged, and the same test carries a non-vacuity guard that the walk reaches a real captured object;::test_the_object_a_write_intent_tool_is_handed_is_the_draft_only_facadeinvokes the per-call factory a tool closes over and asserts what comes back is the facade and not aProposalService. At the unit leveltests/unit/test_draft_only_proposals.pyholds the facade's own surface, including that it keeps no bound method back to the service. - The forbidden-name set grew to the application-layer movers.
_mutating_method_names's result is joined withAPPROVED_STATE_MOVERS,{accept, _commit}. Landed with a driving test rather than an assertion:::test_a_planted_tool_calling_accept_goes_red_for_the_extended_canonical_write_pinplants a tool whose body calls them and asserts it is RED for the extended set and GREEN for the pre-extension one, so the extension has teeth against the counterexample the one-level sweep would otherwise miss. The recorded bound stands unchanged: the walk sees names in the registered callable's own code chain and does not enter a collaborator's body, so it catches a direct call and nothing deeper. That bound is the reason control 1 exists beside it rather than instead of it. docs/security/threat-model.md's T-12 control sentence was rewritten in the registration commit. It read "no MCP tool reaches a write path for approved state … A test enumerates every registered tool and asserts none reaches a canonical write", where the first clause is stronger than the third. It now names the two tools, names the draft-only facade as what holds "no tool reaches approved state", and calls the canonical-write sweep "a second, narrower control: it reaches one level and so does not, by itself, hold the first clause". Whether the rewrite is faithful is a reading and no mechanical check reaches it; that it happened in the same commit is what was not optional, and it did.writeToolsand the capability note moved in the registration commit (decision 5). Landed, with no intermediate state: the flag, the note, both registrations and every assertion they falsify are one commit. The two assertions that move on a value flip moved —tests/integration/test_mcp_tools.py::test_capabilities_report_what_is_and_is_not_built, and the e2e value assertion over a real client, nowtests/e2e/test_daemon_single_instance.py::test_capabilities_report_write_tools(it was::test_capabilities_report_no_write_tools) — along with the note's own assertion, which now demands "No MCP tool writes approved knowledge" and forbids the opposite, where it used to demand "No write-intent tool exists". Of the two pins this entry expected to move at registration time, one did and one did not, and the difference is recorded rather than smoothed: the tool-set equality moved and became::test_the_tool_set_is_exactly_the_published_nine(it was::test_the_tool_set_is_read_only), an equality over the nine registered names that still does not notice a flag value at all — slice B5's registration ofreview.generateKnowledgeCandidaterenamed it once more, to::test_the_tool_set_is_exactly_the_published_ten, which is the name to look it up under; the pinned capability-key set intest_mcp_tools.pydid not move, and could not have — registering a tool adds no capability key, andwriteToolswas already one of them.
The coupling is what got pinned, and it is a new test rather than one of the
above: tests/unit/test_write_tools_flag_claims.py::test_writetools_reads_true_exactly_when_a_write_intent_tool_is_registered
reads both facts out of mcp/tools.py's source — the value a contributor
wrote, and the names registered through the one _tool seam — and demands
writeTools read true exactly when a write-intent tool is registered, with
::test_the_coupling_checker_demands_the_other_state_when_either_side_moves
as the bidirectional control. It mirrors
tests/unit/test_review_ingestion_flag_claims.py's shape, as this entry asked.
The one instrument named here that did not land is the wire-contract
positive: test_wire_contract.py's writeTools case is still the type
negative it was, and the response schema still types the field boolean with
no const, so the conformance suite alone stays green on either value. The
property that item existed for — the flag cannot land half-moved — is held by
the coupling pin and the e2e value assertion instead; the gap between the
property and the instrument is recorded in Still owed rather than closed by
calling them the same thing. (It has since landed in #962, so the conformance
file no longer passes on either value: see A value-level wire-contract
assertion on writeTools below.)
- The prose sites that record the retiring meaning moved. The registration
commit moved README.md, docs/index.md, docs/protocol/mcp-tools.md and two
rows of docs/roadmap.md — An agent cannot change approved knowledge
directly in §0, and appendix row 6's registered figure and names;
the documentation cluster that follows the round moved the rest of the roadmap
(§0's opening, §1's Shipped and Partial entries and its SEC-12 row, §2's
Distribute what approval recorded, §3's change ①, and the Phase B
Architecture, MCP/API, Security, Tests and Exit-criteria rows), the README's
Alongside instructions and memory paragraph, docs/index.md's
What is enforced, and what is convention, and this ADR and
ADR-0013. Whether that rewrite is
faithful is a reading and no mechanical check reaches it, which is said here
rather than left to be inferred from a test name beside it. Two mechanical
checks do reach part of it —
tests/integration/test_documented_tool_set.py recomputes the README's and the
protocol page's tool lists from the built server, and the roadmap appendix
row 6's registered figure and nine names with them.
- generateMigrationDraft refuses four kinds and admits ten (decision 3).
Landed twice, at the service and over the wire.
tests/integration/test_generate_migration_draft.py drives the service entry:
an admitted kind lands a proposal, a content operation is refused to the
content path, a read-control operation is refused to the CLI, and a mixed
document is refused on its first unadmitted operation.
tests/integration/test_write_intent_wire.py drives the same through the
registered tool over the transport, where a wiring defect lives, with the
refused cases parametrized over _REFUSED_TO_CONTENT_PATH/_REFUSED_TO_CLI so
the case count moves with the enum-derived set rather than being stated beside
it, and ::test_the_wire_refused_set_is_exactly_the_two_pulled_pairs asserting
the refused set is a disjoint four against OperationKind. The partition
itself is pinned by
tests/unit/test_draft_only_proposals.py::test_the_v1_operation_set_partitions_operation_kind,
so a fifteenth kind is admitted or refused deliberately and never by omission,
and the gate is fail-closed for a kind in neither set. The redirect wording
reaches the wire, which it did not at first: a ProposalError crossing the
_forwarding seam loses exc.remedy for mcp 2.0.0 parity, so each tool body
catches its own ProposalError and re-raises through _with_remedy, and the
wire tests assert the redirect name is in the message rather than that
.remedy is set.
- Applying any admitted operation leaves every item's (status, sensitivity)
pair unchanged, deprecateItem excepted. Landed:
tests/unit/test_admitted_ops_preserve_read_controls.py applies each admitted
OperationKind against a corpus carrying every precondition an admitted
operation needs — a relation and an alias to remove, a spec to supersede, an
evidence anchor to remove — and compares every item's (status, sensitivity)
pair before and after. Only deprecateItem may move the status half of its own
item, to DEPRECATED, and must leave its sensitivity and every other item
untouched. Two controls keep it from degrading:
::test_the_admitted_operation_map_covers_the_v1_set asserts the map's
coverage against V1_OPERATION_KINDS, so a fifteenth admitted kind must be
given a real operation here, and
::test_the_base_corpus_holds_the_read_controls_the_invariant_measures
asserts the corpus has something to measure. The landing commit records a
mutation run behind it — changeOwner grown a sensitivity= keyword at its
call site flips the item's class and reddens this test — and that result is
cited to its commit rather than restated here as a fresh measurement. Before
this, the property was held by a keyword at a call site and nothing else:
application/migration_engine.py:536 spells _replace_item(item,
owner=operation.owner) while _replace_item (:727-737) accepts
{"sensitivity", "owner", "trust_level", "status"}, so an admitted operation
that grew a second keyword would move a read control with no test going RED.
This turns round 3's closure argument into a pinned property rather than a
declaration.
- A refusal about an out-of-view item is indistinguishable from one about an
absent item, on both tools (decision 6). Landed as
tests/integration/test_write_intent_disclosure_oracle.py, and in a
different shape from the one asked for here, which is worth stating rather than
smoothing over. This entry asked for one battery run against two corpora —
one that held the withheld items and one that never did. What landed is a
same-corpus equality: one synthetic corpus holding two withheld rows
(rejected-store, withheld by may_surface, and confidential-item, above
the default serving ceiling) and one in view, with each answer about an
out-of-view id compared against the answer about an id nothing ever stored.
The two forms differ in what they can catch — a two-corpora run would also
catch a channel carried by collection-wide state, which this one cannot — and
they agree on the channel decision 6 names, which is the refusal a caller
reads. The withheld-reach control is
::test_the_out_of_view_items_really_hold_a_revision_the_lookup_suppresses:
all three items are asserted to hold a real current revision, so a None from
the caller-scoped lookup is suppression and not genuine absence. The fixture is
synthetic, which is the only way to have a withheld row in a corpus whose scope
excludes them (ADR-0030 decision 6's reasoning, one surface over). Refusals
are asserted to carry no status, not only no revision id. Timing is
measured at slice B4 by a separate instrument — this oracle covers content
and does not measure duration; the duration channel is closed by the body-free
caller-scoped lookup (get_item_metadata, T-26 face 4) and pinned by the
zero-body-read counter (test_pre_gate_body_materialization.py), recorded in
the decision-6 Landed entry below, no longer in Still owed.
The battery covers generateMigrationDraft as well as proposeChange, at
one admitted operation per item-id-bearing input position. Over the ten
admitted kinds those positions are six distinct property names, read off
the schema rather than listed by hand — every property whose $ref resolves to
#/$defs/itemId — and the derivation below is now recomputed in the suite by
::test_the_six_positions_are_the_schema_derived_item_id_positions, so a
fifteenth operation with a seventh position reddens it rather than silently
falling outside the battery:
```python # run from the repository root; prints the table below import json, pathlib
defs = json.loads(pathlib.Path("schemas/migrations/migration.schema.json").read_text())["$defs"] pulled = {"operation", "opCreateItem", "opUpsertRevision", "opChangeSensitivity", "opRestoreItem"} positions: set[str] = set() for name, body in sorted(defs.items()): if not name.startswith("op") or name in pulled: continue ids = sorted( p for p, q in body.get("properties", {}).items() if q.get("$ref", "").endswith("itemId") ) positions |= set(ids) print(f"{name:26}{ids}") print("distinct positions:", len(positions), sorted(positions)) ```
console
opAddAlias ['alias', 'itemId']
opAddEvidence ['itemId']
opAddRelation ['sourceItemId', 'targetItemId']
opChangeOwner ['itemId']
opDeprecateItem ['itemId', 'supersededBy']
opRegisterSpecification ['itemId', 'specId']
opRemoveAlias ['alias']
opRemoveEvidence ['itemId']
opRemoveRelation ['sourceItemId', 'targetItemId']
opSupersedeSpecification ['specId', 'supersededBy']
distinct positions: 6 ['alias', 'itemId', 'sourceItemId', 'specId', 'supersededBy', 'targetItemId']
A battery scoped to itemId alone would pass a build that answered through
addRelation's targetItemId or deprecateItem's supersededBy, which is
why the obligation is stated per position and derived from the schema — a
fifteenth operation with a seventh position joins it by existing.
And the refusals are asserted to carry no status, not only no revision id —
the alias guard's message is the one that publishes a status today
(decision 3), so a battery written against the revision id alone would pass a
build that answered (status rejected).
- The wire path's CurrentRevisionLookup is caller-scoped (decision 6).
Landed: register builds the lookup at the MCP composition root and it
consults may_surface and may_disclose, so an item this caller may not see
answers None.
test_write_intent_disclosure_oracle.py::test_proposechange_refuses_an_out_of_view_item_like_an_absent_one
drives it, and ::test_proposechange_carries_the_revision_for_an_in_view_item
is the control the entry asks for — without it, a lookup returning None for
everything would satisfy the equality while breaking the
optimistic-concurrency remedy for in-view items. The landing commit records a
mutation run in both directions — dropping the may_surface/may_disclose
gate leaks the out-of-view revision, and returning None for everything drops
the in-view one — cited to that commit rather than restated here.
And the lookup is body-free (T-26 face 4). It reads get_item_metadata,
not the body-joining get_item, so a withheld item's refusal materialises no
body and its timing is content-independent — it does not scale with the
withheld body's size.
test_pre_gate_body_materialization.py::test_the_real_propose_change_handler_reads_no_body_before_a_withheld_refusal
pins the zero body read on the withheld refusal (RED when the closure's
get_item_metadata reverts to get_item), and
::test_the_real_propose_change_handler_names_the_current_revision_for_an_in_view_draft
pins include_unapproved=True in the lookup — the draft/proposed statuses
may_surface treats differently under the flag — so the in-view concurrency
remedy the #210 class depends on stays live. The one residual is a
content-independent existence term of ~9 µs (a withheld item that exists reads a
bodyless pointer row; an absent id reads nothing), about 155× below the
~1.40 ms transport floor (TB-1) and not a gradeable disclosure — the
measurement open-question 5 owed.
This item moved the pinned counts it said it would, in the commit that added
the call site. The lookup is one call site on each gate, so
STATUS_GATE_CALL_SITES is 7 and DISCLOSURE_GATE_CALL_SITES is 6,
both carrying the new ("mcp/tools.py", "register._draft_only_proposals.current_revision")
entry, and both prose counts in domain/enums.py moved with them — may_surface's
docstring now reads seven and may_disclose's six, each with the new site
enumerated. The disclosure axis was not touched, so
requirements-analysis.md's enforced-axes block and SECURITY.md's copy of
it did not move. The table below is the reading this ADR was accepted
against and is kept as that, not corrected in place: it is what the four
records held before the lookup landed.
| Record | What it holds now | Measured |
|---|---|---|
tests/unit/test_gate_call_sites.py's STATUS_GATE_CALL_SITES |
an exact-equality set of (module, function) pairs, so it fails on an addition as well as a removal |
6 entries |
the same file's DISCLOSURE_GATE_CALL_SITES |
the same shape for may_disclose |
5 entries |
may_surface's docstring (domain/enums.py) |
"it is consulted from six call sites", enumerated in prose | the word six |
may_disclose's docstring (domain/enums.py) |
"Consulted from five call sites" | the word five |
Counted with ast over the two assignments in test_gate_call_sites.py
(STATUS_GATE_CALL_SITES 6 / DISCLOSURE_GATE_CALL_SITES 5); the two
docstring words are read at domain/enums.py:231 and :273. Both sets are
asserted by equality, so neither degrades silently — but neither prose count
is derived from its set, so those two move by hand or not at all.
And if the disclosure axis itself is touched,
docs/architecture/requirements-analysis.md's enforced-axes block (:103-106,
"three enforced axes — chunks.project_id, chunks.status and
chunks.sensitivity") and SECURITY.md's copy of it move too; the same test
file checks both against what _scope emits, token set and spelled count.
- An agentId/taskId stated twice and disagreeing is refused (decision 4).
Landed over the wire, with both controls:
test_write_intent_wire.py::test_a_top_level_identity_that_disagrees_with_evidence_is_refused,
::test_a_top_level_identity_that_agrees_is_accepted and
::test_the_top_level_identity_absent_is_accepted — so the check is not
satisfied by a build that refuses every call carrying the field. The evidence
block stays the authoritative one; the top-level pair remains ambient
provenance no handler reads into a proposal, which is
#665's standing residual and
not something this decision closes.
- The operations path lands through the same guards as the content path,
reached through the injected validator. Landed in part.
test_generate_migration_draft.py::test_it_reaches_the_injected_validator
spies the injected MigrationDocumentValidator and asserts the document it saw
is the stamped one — the minted id, not a caller value — so the generator and
the accept-time rehearsal validate the same bytes;
::test_the_landed_migration_is_schema_valid_and_carries_the_operation
re-validates the written file against the published migration schema;
::test_the_service_mints_the_migration_id_over_a_caller_supplied_one holds
that a caller cannot choose an id that collides with a landed migration; and
::test_a_document_the_schema_rejects_is_refused_and_nothing_is_written is the
nothing-written arm. Two halves of this entry did not land and are in
Still owed: the end-to-end drive through theurian propose accept, and a
test for the structural no-direct-loader-import property. (Neither is owed
now: the drive landed after the slice, and the structural property was already
held, for import statements that name theurian.infrastructure, when this was
written. See The operations path's accept drive and its
no-direct-loader-import property below.)
- The CLI-only guarantees have wire equivalents (decision 3). Landed, and the
two rows landed differently. Duplicate labels[] is a schema refusal naming
the labels key path over the wire
(test_write_intent_wire.py::test_duplicate_labels_are_refused_by_the_schema_over_the_wire).
The body cap is published as a maxLength on the body key and pinned to
MAX_REQUEST_BODY_BYTES by tests/unit/test_input_schema_bounds.py, but
::test_the_body_size_bound_is_a_schema_constraint_on_the_body_key drives it
against the loaded schema rather than over the wire, because over the wire
the rendered-character bound and the transport cap are both tighter and fire
first — so the published maxLength is not the refusal a caller meets
(#699). The unit it counts
is #691's. Both are recorded
in Still owed rather than read as discharged. (#691's landed in PR #1001,
and moved here from Still owed: ProposalService.draft refuses a
body over MAX_SOURCE_FILE_BYTES in UTF-8 —
test_proposal_service.py::test_a_body_over_the_byte_cap_is_refused_before_anything_is_written
for ASCII, astral and --local bodies, and over the wire for both tools
test_write_intent_input_paths.py::test_a_body_over_the_byte_cap_is_refused_on_the_wire_and_writes_nothing
— and drafts one of exactly that size that accept then lands,
test_proposal_service.py::test_a_body_of_exactly_the_byte_cap_is_drafted_and_accepted.)
- ADR-0013's owed E2E is discharged. Landed as
tests/e2e/test_write_intent_session.py::test_a_session_calling_every_write_intent_tool_leaves_approved_knowledge_unchanged:
against a real daemon the session calls each write-intent tool, and approved
knowledge is asserted unchanged two ways — the read tools report the identical
status and approved item through the daemon, and the canonical store's main
file and the approved bodies are byte-identical on disk (SQLite's read-time WAL
and SHM sidecars excluded, since a read creates empty ones). The non-vacuity
control is that each call is asserted to have landed a distinct proposal. The
landing commit records a mutation run against an isolated branch build — a
write-intent tool appending to an approved body reddens the digest assertion —
cited to that commit rather than restated here.
ADR-0013's own Still owed entry moved
to a Landed in Phase B slice B4 section naming this test, and the coverage
residual that section first recorded — a committed argument set, which cannot
redden when a newly registered write-intent tool is missing from it — was
closed in the same slice: the set is now derived from tools/list, keyed on
decision 4's required evidence object, and asserted equal to the arguments the
session carries. What remains is the bound of that key, recorded in ADR-0013's
Still owed rather than here, since it is that ADR's property.
- Every wire field carries its published input schema (ADR-0031). Landed:
schemas/mcp/knowledge-propose-change-input.schema.json and
schemas/mcp/knowledge-generate-migration-draft-input.schema.json ship, and
both tools join test_input_validation_wire.py's per-tool parametrization, so
they are covered by ADR-0031's fail-closed rule — a registered tool that
resolves to no loaded schema is refused at dispatch — rather than by being
remembered. Owed there rather than here, and named here because this surface is
the one that makes it mandatory.
- A value-level wire-contract assertion on writeTools. Landed in
#962, after the slice:
tests/integration/test_wire_contract.py::test_the_published_write_tools_flag_equals_whether_write_intent_tools_are_registered.
The Landed entry above records why it was owed: the response schema types
the field boolean with no const, so the conformance file's type-negative
case alone was green on either value, the gap this test closes. The coupling
pin and the e2e value assertion hold the property beside it.
Corrected in place. This bullet's heading said, in Still owed: "Slice B5
or later — a value-level wire-contract assertion on writeTools."
- The facade's accept backstop fails closed (decision 8). Landed in #962:
tests/integration/test_write_intent_facade_population.py::test_accept_reached_through_the_facades_captured_service_fails_closed
calls accept on the MCP facade's captured service and asserts the decision-8
RuntimeError, with .theurian/knowledge and .theurian/migrations unchanged.
- A file path is refused by construction inside
knowledge.generateMigrationDraft's document (decision 2). The tool-level
input schemas landed in #962:
tests/integration/test_write_intent_input_paths.py pins each one's declared
members (_RECORDED, with a reason per path-shaped one in _PATH_SHAPED) and
drives dereference with a canary file; its docstring states the reach. The
document interior, an opaque object at its schema, landed in
#966 (c45e7ac2): the same
file pins a closed property-path set per v1-admitted operation definition
(_V1_RECORDED), asserts that no v1-admitted operation declares
contentFile, drafts each recorded path-shaped member (_V1_PATH_MEMBERS)
over the wire with a canary path whose text lands while its bytes reach
neither a file under the test's tree outside .git nor the response, and
drives an upsertRevision refused with the v1 gate's message and the tree
outside .git unchanged. This entry was moved here from Still owed.
Corrected in place. This bullet's heading said, in Still owed: "Slice B5
or later — a file path is refused by construction, and nothing recomputes it
(decision 2)." Its last clause no longer holds: the tests named above pin the
declared members. The bullet's upsertRevision clause said "the tree
unchanged"; that test's comparison excludes .git, as the canary clause
beside it says.
Corrected in place. This bullet said: "The property holds as shipped:
neither published input schema declares a path, URI, or reference field, and
neither handler signature has a path parameter." That was false:
sourceAnchors[]'s sourceUri, filePath and repository, scopePaths
(also a handler parameter) and, on review.generateKnowledgeCandidate,
repository and fixCommit are declared. The property is dereference: the
anchor members and scopePaths are recorded and not read as paths where the
test drives them, the candidate tool's repository is a review-store lookup
key the resolve refuses when unknown, and fixCommit is resolved as a git
object id its schema pattern confines.
#963 recorded the same
wording in two schema descriptions and the CHANGELOG [0.3.0] entry.
#995 corrected those faces
and one #963 did not list, the knowledge.proposeChange handler docstring's
"There is no path parameter, by construction": it replaced the wording in the
two descriptions with the names of their path-shaped members, added a
CHANGELOG Changed entry that names the [0.3.0] sentence and leaves the
released entry as it shipped, and restated the docstring the same way: there
is no body-path parameter, and the path-shaped parameters it names are
recorded as text and not read as paths.
The bullet's reasoning for the shape of the owed check is kept, because it is
why #962 pins a closed set of declared members rather than a refusal:
"What is owed is the check, and the shape matters — a refusal test would
pin today's spelling of a rejection, while what this needs is a structural
test that no write-intent tool's input schema declares a path-shaped field.
Today the absence is held by review and by ADR-0031's
unevaluatedProperties: false refusing any key the schema does not name,
which stops a caller smuggling one and does nothing about a schema someone
widens." Its middle step does not hold: a structural test that no input schema
declares a path-shaped field would fail on the fields above, so the walk
records them instead of forbidding them. Nor does its last sentence. Its
premise is the absence corrected above, and its widening clause is superseded
by #962's walk.
tests/integration/test_write_intent_input_paths.py::test_a_write_intent_schema_declares_only_the_recorded_properties
compares each recorded tool's input-schema property paths, $ref followed,
with a closed set;
tests/integration/test_write_intent_input_paths.py::test_the_schemas_checked_are_the_registered_write_intent_tools
holds the recorded tools equal to the registered write-intent tools; and
tests/integration/test_write_intent_input_paths.py::test_the_walk_refuses_an_applicator_it_does_not_follow
drives the walk's raise on applicator keywords it does not descend, in planted
nodes.
Corrected in place. This bullet said: "Its last step does not hold: a test
that no input schema declares a path-shaped field would fail on the fields
above, so the walk records them instead of forbidding them." The step it
refuted is the middle one, and the last sentence was left unexamined.
- The operations path's accept drive and its no-direct-loader-import
property. Recorded after the slice, with no new test:
#703 and
#959 were filed for these two
halves of the operations-path entry above, and both were closed on this record
after the checks below were found to hold them, the second only for import
statements that name theurian.infrastructure. The property as it was written
in Still owed: "A test that a document drafted through draft_from_document
produces a proposal directory theurian propose accept accepts, driven through
the shipped commands rather than asserted about the service; and a structural
test that the entry imports no migration-loader symbol directly (ADR-0003)."
The accept drive. Three tests, each landed after #703 was filed on
2026-09-15, draft a proposal through a write-intent tool over the MCP transport
(mcp_session) — the third in two of its four parameters — run
propose accept in-process through the CLI's Typer app, and assert that the
accepted change landed:
- tests/integration/test_accept_never_introduces_a_report_row.py::test_the_withdrawal_drafted_again_after_the_update_is_accepted_and_takes_effect
drafts a deprecateItem through knowledge.generateMigrationDraft — the
draft_from_document path the property names — and asserts the item's state
row reads deprecated after migrate apply. Landed in 7007565d, the
GHSA-v2qg-23fc-7fqp merge (2026-10-05).
- tests/integration/test_candidate_lands_as_a_proposal.py::test_the_shipped_propose_accept_accepts_a_generated_candidate
drafts through review.generateKnowledgeCandidate and asserts the migration
reaches .theurian/migrations/ and the drafted body reaches the
bodyDestination the tool answered. Landed in 76b9eba1 (#744, 2026-09-19).
- tests/integration/test_update_label_inheritance.py::test_an_update_omitting_sensitivity_leaves_the_items_sensitivity_unchanged,
whose two mcp-* parameters draft through knowledge.proposeChange, runs
propose accept and migrate apply and asserts the item's
current_revision_id is the drafted revision. Landed in 7007565d.
Only the first drives draft_from_document; the other two tools draft through
ProposalService.draft. Measured at f3abfba0 in a private copy, over the six
node ids the three collect (the third's four parameters are two mcp-* and two
cli-*, the latter drafted by theurian propose): 6 passed as shipped, and 6
failed with ProposalService._commit's migration write,
_write_file(migration_destination, migration_bytes, exclusive=True), replaced
by pass. That driver reddens the first test at its stale-refusal step,
because the CLI update it lands first no longer lands; skipping the write only
for a migration containing deprecateItem reddens it at the deprecated
assertion, after propose accept exited 0 — measured at f3abfba0 too.
The structural property was already held, for import statements that name
theurian.infrastructure.
tests/unit/test_layering.py::test_application_does_not_import_infrastructure
and ::test_only_composition_roots_import_infrastructure walk each in-scope
module's whole AST, so they flag an absolute theurian.infrastructure import —
the loader is infrastructure/filesystem/migration_loader.py — at module level
or inside a function. Both landed in 261eff32 (2026-08-01). Ruff's TID251
banned-api entry on theurian.infrastructure in pyproject.toml, which the
gate's ruff check runs, flags the same import, and was added in 7562b41c
(2026-08-01). Measured at f3abfba0 in a private copy, with
from theurian.infrastructure.filesystem import migration_loader planted in
application/proposal_service.py: test_layering.py went from 6 passed to 2
failed and 4 passed, the 2 being the tests above, and ruff check reported
TID251 on the planted line, both with the import at module top and with it
inside draft_from_document. Ruff alone catches two other forms, each leaving
test_layering.py at 6 passed: a parent-relative
from ..infrastructure.filesystem import migration_loader at module top
(TID251 and TID252), and from theurian import infrastructure at module
top and inside draft_from_document (TID251). Planted inside
draft_from_document, four forms pass both (6 passed, no TID rule):
__import__ and importlib.import_module naming the loader, and
validate_migration_document imported from theurian.cli.propose_commands or
theurian.daemon.runner, each of which re-exports the loader's own function.
The re-export residual was filed as
#975, and the relative
form's escape from test_layering.py's scan as
#972; the two dynamic forms
are recorded on those issues.
Moved from Still owed and corrected. The bullet said: "The second holds
today by reading application/proposal_service.py's imports, and by nothing
else." That was false when it was written: both layering tests (261eff32) and
the TID251 entry (7562b41c) predate the bullet, which was added in
e262b36e (#698, 2026-09-16).
Corrected in place. This bullet's heading said, in Still owed: "Slice B5 or later — the two halves of the operations-path entry that did not land."
Still owed, with the milestone that will satisfy it:
Corrected in place. This paragraph said: "The first three below are
addressed to a slice and to no issue. Measured 2026-09-15, gh issue list
--state open --search "write-intent OR proposeChange OR generateMigrationDraft OR
facade OR draft-only" returns nothing that covers any of them, so this section
is their only owner — a reader should treat that as the gap it is rather than
assume a tracker entry exists. The last three each name their issue." #700,
701 and #703 were filed for them that day, and each item below now names its
owner. (Open-question 5's timing measurement, formerly a fourth
slice-addressed item here, landed at slice B4 and moved to the decision-6
Landed entry above. The three items #700, #701 and #703 were filed for have
since moved to Landed above as well: A value-level wire-contract assertion on
writeTools (#700), A file path is refused by construction inside
knowledge.generateMigrationDraft's document (#701, through #966), and The
operations path's accept drive and its no-direct-loader-import property (#703,
with #959).)
- #699 — that
maxLengthis unreachable over the shipped transport. The rendered-character bound and the transport cap are both tighter and fire first, so a caller never meets the bound this surface publishes. - #665 — the top-level
snapshotId,agentIdandtaskId. Admitted by the enforced contract on both new tools, as on the other seven, and read by no handler. Decision 4 makes the evidence pair authoritative and refuses a disagreeing top-level one; it does not make the top-level trio read.