<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xml:base="https://docs.spec-kitty.ai/adr/3.x/2026-07-16-1-wp-runtime-state-authority-event-log-eviction/">
  <id>https://docs.spec-kitty.ai/adr/3.x/2026-07-16-1-wp-runtime-state-authority-event-log-eviction/</id>
  <title>WP runtime-state authority — evict runtime-mutable state from tasks/WP##.md into the canonical event log</title>
  <updated>2026-07-16T00:00:00.000Z</updated>
  <author><name>Spec Kitty</name></author>
  <link rel="alternate" type="text/html" href="https://docs.spec-kitty.ai/adr/3.x/2026-07-16-1-wp-runtime-state-authority-event-log-eviction/"/>
  <summary>Runtime-mutable work-package state leaves `tasks/WP##.md` for the append-only event log, carried by an annotation event class so the 9-lane machine gains no self-edges.</summary>
  <content type="html">&lt;p&gt;&lt;strong&gt;Status:&lt;/strong&gt; Proposed&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Date:&lt;/strong&gt; 2026-07-16&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Deciders:&lt;/strong&gt; Architecture squad (architect-alphonso · paula-patterns · planner-priti), reconciled with #2093 / #2400 owner&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Technical Story:&lt;/strong&gt; Charter-completion of #2093 / #2400 (WP-metadata authority split). Prerequisite mission for the YAML-authoritative / markdown-derived WP prompt (proposal Parts 1–3). Sequenced with #2160 (coord-authority Wave 2).&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;context-and-problem-statement&quot;&gt;Context and Problem Statement&lt;/h2&gt;
&lt;p&gt;The shipped &lt;code dir=&quot;auto&quot;&gt;lane&lt;/code&gt; retirement (&lt;code dir=&quot;auto&quot;&gt;frontmatter.py:47-49&lt;/code&gt;, migration-only in
&lt;code dir=&quot;auto&quot;&gt;task_metadata_validation.py:82&lt;/code&gt;) moved one runtime-mutable field out of the WP
file into the append-only event log. It generalised badly: &lt;strong&gt;&lt;code dir=&quot;auto&quot;&gt;tasks/WP##.md&lt;/code&gt;
still holds other runtime-mutable state that live phase-2 code writes and reads
on every &lt;code dir=&quot;auto&quot;&gt;implement&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;move-task&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;mark-status&lt;/code&gt;, and review action.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This blocks two shipped-intent goals at once:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;#2093 / #2400’s own charter&lt;/strong&gt; — “static intent stays canonical in the WP
file; dynamic runtime state retires to event-log / invocation authority” —
is only half-delivered. &lt;code dir=&quot;auto&quot;&gt;lane&lt;/code&gt; moved; &lt;code dir=&quot;auto&quot;&gt;shell_pid&lt;/code&gt;, subtask-checkbox state,
review-cycle fields, activity-log narrative, &lt;code dir=&quot;auto&quot;&gt;agent&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;assignee&lt;/code&gt;, and more
did not.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The YAML-authoritative WP-prompt schema&lt;/strong&gt; (proposal Part 4 &lt;strong&gt;B3&lt;/strong&gt;) cannot
be built. Declaring &lt;code dir=&quot;auto&quot;&gt;WP##.md&lt;/code&gt; “derived, do not edit” clobbers claim-liveness
(&lt;code dir=&quot;auto&quot;&gt;stale_detection.py&lt;/code&gt;) and done-inference (&lt;code dir=&quot;auto&quot;&gt;emit.py&lt;/code&gt; &lt;code dir=&quot;auto&quot;&gt;done==total&lt;/code&gt;) on the
very next &lt;code dir=&quot;auto&quot;&gt;implement&lt;/code&gt;, because those signals are read back out of the file
the render would overwrite.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;An architecture-and-roadmap review squad (2026-07-16, recorded in
&lt;a href=&quot;../../plans/investigations/wp-runtime-state-eviction-scope.md&quot;&gt;&lt;code dir=&quot;auto&quot;&gt;docs/plans/investigations/wp-runtime-state-eviction-scope.md&lt;/code&gt;&lt;/a&gt;
§“Squad review corrections”) pressure-tested the eviction scope. Verdict:
&lt;strong&gt;direction correct and correctly homed under #2093 / #2400, but one
load-bearing architectural decision was unaddressed and the writer/reader
inventory was materially incomplete.&lt;/strong&gt; This ADR pins the five decisions that
scope §C8 requires before the mission is planned.&lt;/p&gt;
&lt;h3 id=&quot;the-load-bearing-gap--runtime-state-mutates-off-the-transition-axis-scope-c1&quot;&gt;The load-bearing gap — runtime state mutates OFF the transition axis (scope §C1)&lt;/h3&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;StatusEvent&lt;/code&gt; is a &lt;strong&gt;transition ledger&lt;/strong&gt;: it mandates &lt;code dir=&quot;auto&quot;&gt;from_lane&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;to_lane&lt;/code&gt;
(&lt;code dir=&quot;auto&quot;&gt;status/models.py:224-226&lt;/code&gt;) and &lt;code dir=&quot;auto&quot;&gt;validate_transition&lt;/code&gt; rejects any edge not in
the 9-lane FSM (&lt;code dir=&quot;auto&quot;&gt;status/transitions.py:53,83-99&lt;/code&gt;). But three of the evicted
mutations are &lt;strong&gt;non-transition&lt;/strong&gt; — they happen with no accompanying lane change:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code dir=&quot;auto&quot;&gt;shell_pid&lt;/code&gt; refresh on resume&lt;/strong&gt; — rewritten on &lt;em&gt;every&lt;/em&gt;
&lt;code dir=&quot;auto&quot;&gt;implement&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;agent action&lt;/code&gt; invocation, including resume of an already
&lt;code dir=&quot;auto&quot;&gt;in_progress&lt;/code&gt; WP (&lt;code dir=&quot;auto&quot;&gt;implement.py:1730&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;workflow_executor.py:669&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;subtask marking&lt;/strong&gt; — mid-&lt;code dir=&quot;auto&quot;&gt;in_progress&lt;/code&gt; &lt;code dir=&quot;auto&quot;&gt;- [x] T###&lt;/code&gt; flips
(&lt;code dir=&quot;auto&quot;&gt;tasks_materialization.py:260,304&lt;/code&gt;, and an uncheck in &lt;code dir=&quot;auto&quot;&gt;tasks.md&lt;/code&gt; at
&lt;code dir=&quot;auto&quot;&gt;tasks_move_task.py:1662&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;activity-log notes&lt;/strong&gt; — free-text narrative appended mid-work (six writers,
incl. external &lt;code dir=&quot;auto&quot;&gt;orchestrator_api/commands.py:1563&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A &lt;code dir=&quot;auto&quot;&gt;claimed&lt;/code&gt;-event payload captures only &lt;code dir=&quot;auto&quot;&gt;planned→claimed&lt;/code&gt;; it cannot carry a
resume refresh or a mid-&lt;code dir=&quot;auto&quot;&gt;in_progress&lt;/code&gt; mark. &lt;strong&gt;This is the pivotal decision (C1),
and everything else rests on it.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;decision&quot;&gt;Decision&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Adopt the eviction as the charter-completion of #2093 / #2400, and resolve
the C1 axis mismatch by introducing a non-transition annotation event class
rather than polluting the 9-lane FSM.&lt;/strong&gt; The five scope §C8 decisions are pinned
below.&lt;/p&gt;
&lt;h3 id=&quot;decision-1--non-transition-event-shape-annotation-event-class-not-self-edges-scope-c1-c81&quot;&gt;Decision 1 — Non-transition event shape: annotation event class, NOT self-edges (scope §C1, §C8.1)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Chosen: a distinct non-transition “annotation” event class in the same
append-only log, folded by the reducer as a payload update — the FSM transition
ledger is left untouched.&lt;/strong&gt; Self-transition (&lt;code dir=&quot;auto&quot;&gt;X→X&lt;/code&gt;) edges do &lt;strong&gt;not&lt;/strong&gt; become
legal in the 9-lane matrix.&lt;/p&gt;
&lt;p&gt;Concretely:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;initial claim’s&lt;/strong&gt; &lt;code dir=&quot;auto&quot;&gt;shell_pid&lt;/code&gt; + &lt;code dir=&quot;auto&quot;&gt;baseline&lt;/code&gt; ride the real
&lt;code dir=&quot;auto&quot;&gt;planned→claimed&lt;/code&gt; transition. Mechanism note A2 applies: &lt;code dir=&quot;auto&quot;&gt;policy_metadata: dict|None&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;models.py:234&lt;/code&gt;) is already a generic event sidecar
(&lt;code dir=&quot;auto&quot;&gt;implement.py:1328&lt;/code&gt;), so this needs &lt;strong&gt;no wire-schema change&lt;/strong&gt;; the
reduced &lt;em&gt;snapshot&lt;/em&gt; is where the pair becomes typed.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;non-transition mutations&lt;/strong&gt; — resume &lt;code dir=&quot;auto&quot;&gt;shell_pid&lt;/code&gt; refresh, mid-work
subtask marks, activity-log notes — are recorded as &lt;strong&gt;annotation events&lt;/strong&gt;: a
new record class carrying &lt;code dir=&quot;auto&quot;&gt;wp_id&lt;/code&gt;, an &lt;code dir=&quot;auto&quot;&gt;annotation_kind&lt;/code&gt;
(&lt;code dir=&quot;auto&quot;&gt;shell_refresh&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;subtask_marked&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;activity_note&lt;/code&gt;), a typed payload, and a
truthful &lt;code dir=&quot;auto&quot;&gt;at&lt;/code&gt; timestamp, with &lt;strong&gt;no &lt;code dir=&quot;auto&quot;&gt;from_lane&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;to_lane&lt;/code&gt;&lt;/strong&gt;. Annotation
events bypass &lt;code dir=&quot;auto&quot;&gt;validate_transition&lt;/code&gt; (they are not transitions) and are folded
by the reducer onto the reduced snapshot.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Why not fold-onto-transition (scope §C1 option b).&lt;/strong&gt; Folding was considered
and rejected as the primary mechanism. It cannot carry a resume refresh (there
is no lane change on resume), so a resumed WP would carry a stale PID and
claim-liveness would silently degrade to the git-timestamp heuristic
(&lt;code dir=&quot;auto&quot;&gt;stale_detection.py:254-301&lt;/code&gt;) — a user-visible regression on the exact
claim-liveness path this mission exists to protect (AC-2). Worse, mid-work
subtask marks and activity-log notes have &lt;strong&gt;no transition to attach to at all&lt;/strong&gt;
(they occur wholly within &lt;code dir=&quot;auto&quot;&gt;in_progress&lt;/code&gt;); folding them is not merely lossy, it
is impossible without inventing a fake transition. Option (b) “works” only by
dropping the M7 data the mission is chartered to preserve.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why not self-edges.&lt;/strong&gt; Making &lt;code dir=&quot;auto&quot;&gt;X→X&lt;/code&gt; legal in the transition matrix would
redefine the FSM invariant that a transition always changes lane, and would ripple
into kanban rendering, drift detection, and done-inference. The annotation class
achieves the same capture with &lt;strong&gt;zero change to the transition contract&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;decision-2--stable-content-hash--total-eviction-invariant-scope-c82&quot;&gt;Decision 2 — Stable-content-hash + total-eviction invariant (scope §C8.2)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;code dir=&quot;auto&quot;&gt;tasks/WP##.md&lt;/code&gt; (plus the &lt;code dir=&quot;auto&quot;&gt;tasks.md&lt;/code&gt; subtask surface) is the sole churn
surface, and it becomes stable across every runtime mutation.&lt;/strong&gt; After the
mission, &lt;code dir=&quot;auto&quot;&gt;content_hash&lt;/code&gt; over the authored WP spec is &lt;strong&gt;invariant&lt;/strong&gt; across claim,
resume, subtask-done, review, and history append. That single guard is the
acceptance test that proves the mission — and directly delivers the original
hash-churn fix.&lt;/p&gt;
&lt;p&gt;“Total eviction” forces scope §C2’s missed writers into scope. Every one of
these must be repointed off the file, or the invariant leaks by construction:&lt;/p&gt;





































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Field&lt;/th&gt;&lt;th&gt;Live writers that must be repointed&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;shell_pid&lt;/code&gt; (+&lt;code dir=&quot;auto&quot;&gt;shell_pid_created_at&lt;/code&gt;, baseline)&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;implement.py:1730&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;workflow_executor.py:669&lt;/code&gt; (implement), &lt;code dir=&quot;auto&quot;&gt;:1337&lt;/code&gt; (review), &lt;code dir=&quot;auto&quot;&gt;tasks_move_task.py:1638&lt;/code&gt; — &lt;strong&gt;4 writers&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;agent&lt;/code&gt; (scalar)&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;workflow_executor.py:667&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;tasks_move_task.py:1631&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;assignee&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;tasks_move_task.py:1629&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;activity_log&lt;/code&gt; (body)&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;tasks.py:913&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;workflow_executor.py:679&lt;/code&gt; &amp;#x26; &lt;code dir=&quot;auto&quot;&gt;:1344&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;tasks_move_task.py:1645&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;orchestrator_api/commands.py:1563&lt;/code&gt; — &lt;strong&gt;6 writers, incl. external orchestrator-api&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;subtask checkbox&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;tasks_materialization.py:260,304&lt;/code&gt; (WP##.md) + &lt;code dir=&quot;auto&quot;&gt;tasks_move_task.py:1662&lt;/code&gt; uncheck (&lt;strong&gt;&lt;code dir=&quot;auto&quot;&gt;tasks.md&lt;/code&gt;&lt;/strong&gt;)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;review_artifact_override_{at,actor,wp_id,reason}&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;tasks_materialization.py:58-61,125-128&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;base_branch&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;base_commit&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;created_at&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;implement_support.py:133-142&lt;/code&gt; (fresh-lane creation)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;&lt;code dir=&quot;auto&quot;&gt;move-task&lt;/code&gt; is the primary lane-transition writer&lt;/strong&gt; and must be an explicit
AC-1 target: it alone rewrites &lt;code dir=&quot;auto&quot;&gt;shell_pid&lt;/code&gt; + &lt;code dir=&quot;auto&quot;&gt;agent&lt;/code&gt; + &lt;code dir=&quot;auto&quot;&gt;assignee&lt;/code&gt; +
activity-log + &lt;code dir=&quot;auto&quot;&gt;tracker_refs&lt;/code&gt; and unchecks subtasks. A naive eviction that
misses it churns the hash on the very next transition. &lt;code dir=&quot;auto&quot;&gt;history[]&lt;/code&gt;’s frontmatter
mirror is already &lt;strong&gt;DEAD&lt;/strong&gt; (&lt;code dir=&quot;auto&quot;&gt;add_history_entry&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;frontmatter.py:347&lt;/code&gt;, has no
live callers) — “evict” there means &lt;em&gt;confirm-removed&lt;/em&gt; and render &lt;code dir=&quot;auto&quot;&gt;## History&lt;/code&gt;
from events.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One canonical runtime-mutable field-set.&lt;/strong&gt; The eviction extends the existing
&lt;code dir=&quot;auto&quot;&gt;migration/strip_frontmatter.py:MUTABLE_FIELDS&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;{lane, review_status, reviewed_by, review_feedback, progress, shell_pid, assignee, agent}&lt;/code&gt;) — adding
&lt;code dir=&quot;auto&quot;&gt;history&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;shell_pid_created_at&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;activity_log&lt;/code&gt;,
&lt;code dir=&quot;auto&quot;&gt;review_artifact_override_*&lt;/code&gt;, and resolving &lt;code dir=&quot;auto&quot;&gt;tracker_refs&lt;/code&gt;. It does &lt;strong&gt;not&lt;/strong&gt;
author a rival list.&lt;/p&gt;
&lt;p&gt;Two classification corrections from scope §C3 are pinned here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code dir=&quot;auto&quot;&gt;tracker_refs&lt;/code&gt; cannot be both static and derived.&lt;/strong&gt; It is runtime-written
(&lt;code dir=&quot;auto&quot;&gt;tasks_move_task.py:1575-1595&lt;/code&gt;, FR-011) yet the schema proposal lists it
static. &lt;strong&gt;Re-decide in the mission:&lt;/strong&gt; either keep it authored + immutable
(move the &lt;code dir=&quot;auto&quot;&gt;--tracker-ref&lt;/code&gt; write elsewhere) or evict it. Do not ship it as
both.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code dir=&quot;auto&quot;&gt;progress&lt;/code&gt;&lt;/strong&gt; is in &lt;code dir=&quot;auto&quot;&gt;MUTABLE_FIELDS&lt;/code&gt; but has no live writer or reader →
&lt;strong&gt;explicitly retire&lt;/strong&gt;, do not silently drop.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The static residue that &lt;strong&gt;stays&lt;/strong&gt; authored in the WP file is confirmed sound
(no runtime writers anywhere): &lt;code dir=&quot;auto&quot;&gt;branch_strategy&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;merge_target_branch&lt;/code&gt; /
&lt;code dir=&quot;auto&quot;&gt;planning_base_branch&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;priority&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;phase&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;task_type&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;cross_cutting&lt;/code&gt; /
&lt;code dir=&quot;auto&quot;&gt;owned_files&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;agent_profile&lt;/code&gt; (authored assignment) / &lt;code dir=&quot;auto&quot;&gt;requirement_refs&lt;/code&gt; /
&lt;code dir=&quot;auto&quot;&gt;plan_concern_refs&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;create_intent&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;authoritative_surface&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;scope&lt;/code&gt; /
&lt;code dir=&quot;auto&quot;&gt;work_package_id&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;title&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;dependencies&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;decision-3--migration-contract-scope-c6-c83&quot;&gt;Decision 3 — Migration contract (scope §C6, §C8.3)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Order is strict: backfill → verify → reader cutover → writer cutover.&lt;/strong&gt;
Readers keep the frontmatter fallback &lt;em&gt;only until backfill is verified&lt;/em&gt;.
Writer-first opens the exact B3 clobber window and is prohibited.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Deterministic, ULID-valid seed-ids.&lt;/strong&gt; The reducer dedups by &lt;code dir=&quot;auto&quot;&gt;event_id&lt;/code&gt;,
which must match &lt;code dir=&quot;auto&quot;&gt;ULID_PATTERN&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;reducer.py:139-149&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;models.py:70&lt;/code&gt;). A
content hash is &lt;strong&gt;not&lt;/strong&gt; a valid ULID. Seed events use a &lt;strong&gt;namespaced
deterministic ULID&lt;/strong&gt; derived from &lt;code dir=&quot;auto&quot;&gt;mission_id + wp_id + field&lt;/code&gt;, so re-runs are
idempotent (no double-seed).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Timestamp honesty.&lt;/strong&gt; Subtask checkboxes carry no &lt;code dir=&quot;auto&quot;&gt;at&lt;/code&gt;; a backfilled
&lt;code dir=&quot;auto&quot;&gt;subtask_marked&lt;/code&gt; annotation has &lt;strong&gt;no truthful timestamp&lt;/strong&gt;. AC “no data loss”
is therefore not literally achievable for reconstructed marks — the mission
states the reconstruction contract explicitly (clamp to the WP’s &lt;code dir=&quot;auto&quot;&gt;claimed&lt;/code&gt;
timestamp) rather than fabricating precision.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extend &lt;code dir=&quot;auto&quot;&gt;strip_frontmatter.py&lt;/code&gt;&lt;/strong&gt; (Decision 2’s single field-set) as the
migration’s canonical stripper — do not fork it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scale:&lt;/strong&gt; backfill covers the existing corpus of missions’ frontmatter
runtime fields into seed events; idempotent by construction (deterministic
ids).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;decision-4--2093--2400-relationship--delete-legacy-resolver-fallbacks-scope-c5-c84&quot;&gt;Decision 4 — #2093 / #2400 relationship + delete legacy resolver fallbacks (scope §C5, §C8.4)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;This mission lands under #2400 as charter-completion, not as a rival ruling.&lt;/strong&gt;
It accepts #2093’s authority decision unchanged: static intent stays canonical
in the WP file; dynamic runtime state is event-log-owned.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Eviction means remove, not merely stop writing.&lt;/strong&gt; Leaving a dormant
“read frontmatter when the canonical field is absent” branch violates the
&lt;em&gt;no legacy resolver paths&lt;/em&gt; invariant (&lt;a href=&quot;/adr/3.x/2026-07-01-1-no-legacy-compat-branches-in-resolvers/&quot;&gt;ADR
2026-07-01-1&lt;/a&gt;). The
following fallbacks are &lt;strong&gt;deleted&lt;/strong&gt; by this mission:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code dir=&quot;auto&quot;&gt;workflow_cores.py:340-341&lt;/code&gt; — reads &lt;code dir=&quot;auto&quot;&gt;review_status&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;review_feedback&lt;/code&gt; from
frontmatter when the canonical &lt;code dir=&quot;auto&quot;&gt;review_ref&lt;/code&gt; is absent.&lt;/li&gt;
&lt;li&gt;&lt;code dir=&quot;auto&quot;&gt;done_bookkeeping.py:104-105&lt;/code&gt; — reads &lt;code dir=&quot;auto&quot;&gt;meta.reviewed_by&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;review_status&lt;/code&gt;
off &lt;code dir=&quot;auto&quot;&gt;WPMetadata&lt;/code&gt; (frontmatter).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And the most-consumed reader layer is repointed to the reduced snapshot:
&lt;code dir=&quot;auto&quot;&gt;WorkPackage.{shell_pid, agent, assignee}&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;task_utils/support.py:288,292,296&lt;/code&gt;)
and &lt;code dir=&quot;auto&quot;&gt;WPMetadata&lt;/code&gt; coercion (&lt;code dir=&quot;auto&quot;&gt;wp_metadata.py:364,580&lt;/code&gt;).&lt;/p&gt;
&lt;h3 id=&quot;decision-5--9-lane-fsm-invariant-preserved-scope-c85&quot;&gt;Decision 5 — 9-lane FSM invariant preserved (scope §C8.5)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;The 9-lane FSM is unchanged. Self-transition edges do NOT become legal in the
transition matrix; &lt;code dir=&quot;auto&quot;&gt;validate_transition&lt;/code&gt; continues to reject any non-lane-
changing edge.&lt;/strong&gt; The non-transition mutations live in the annotation class
(Decision 1), &lt;em&gt;outside&lt;/em&gt; the transition ledger.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reducer precedence (payload-only self-events).&lt;/strong&gt; The reducer folds in event
order: transition events set the lane and any transition-carried payload;
annotation events fold their typed payload onto the reduced snapshot &lt;strong&gt;after&lt;/strong&gt;
transitions, last-writer-wins per field. At equal timestamps, annotation folds
apply after the transition fold, so a &lt;code dir=&quot;auto&quot;&gt;claimed&lt;/code&gt; transition carrying an initial
&lt;code dir=&quot;auto&quot;&gt;shell_pid&lt;/code&gt; is not clobbered by an out-of-order read, and a later
&lt;code dir=&quot;auto&quot;&gt;shell_refresh&lt;/code&gt; annotation deterministically supersedes it
(&lt;code dir=&quot;auto&quot;&gt;reducer.py:160&lt;/code&gt; precedence extended, not rewritten).&lt;/p&gt;
&lt;h2 id=&quot;decision-drivers&quot;&gt;Decision Drivers&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Charter-completion, not new construction&lt;/strong&gt; — the mission finishes #2093 /
#2400’s own ruling; it must not re-litigate the authority split.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No data loss&lt;/strong&gt; — activity-log narrative and review-feedback prose (scope
M7) must survive; that forces the annotation class, since the transition
ledger carries only fields + a &lt;code dir=&quot;auto&quot;&gt;review_ref&lt;/code&gt; pointer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No silent behaviour regression&lt;/strong&gt; — claim-liveness (AC-2) and done-inference
(AC-3) must gate identically to today; fold-onto-transition would degrade the
resume path.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No legacy resolver paths&lt;/strong&gt; — dormant frontmatter fallbacks are deleted, not
left inert (ADR 2026-07-01-1).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Single canonical field-set&lt;/strong&gt; — extend &lt;code dir=&quot;auto&quot;&gt;strip_frontmatter.py&lt;/code&gt;; never author a
rival &lt;code dir=&quot;auto&quot;&gt;MUTABLE_FIELDS&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FSM invariant is load-bearing&lt;/strong&gt; — the transition contract is consumed by
kanban rendering, drift detection, and done-inference; it must not be widened
to carry payload-only self-events.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;considered-options-decision-1-the-pivotal-one&quot;&gt;Considered Options (Decision 1, the pivotal one)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;(A) Annotation event class, FSM untouched — CHOSEN.&lt;/strong&gt; New non-transition
event kind folded by the reducer; transition ledger and 9-lane matrix
unchanged.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;(B) Fold onto existing transitions.&lt;/strong&gt; Carry runtime payload on the nearest
lane transition; accept a documented resume-staleness behaviour change.
&lt;em&gt;Rejected:&lt;/em&gt; cannot carry resume refresh or mid-&lt;code dir=&quot;auto&quot;&gt;in_progress&lt;/code&gt; marks; lossy by
construction.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;(C) Self-edges in the FSM.&lt;/strong&gt; Make &lt;code dir=&quot;auto&quot;&gt;X→X&lt;/code&gt; legal so payload-only self-events
are “transitions.” &lt;em&gt;Rejected:&lt;/em&gt; redefines the FSM invariant and ripples into
every transition consumer for no capture benefit over (A).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;consequences&quot;&gt;Consequences&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Positive&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code dir=&quot;auto&quot;&gt;WP##.md&lt;/code&gt; becomes stable-hashing static intent — unblocks the YAML-authoritative
WP-prompt schema (proposal Parts 1–3) as a pure formalization.&lt;/li&gt;
&lt;li&gt;The eviction &lt;strong&gt;alone&lt;/strong&gt; delivers the churn fix; the separate “semantic-only
hash” slice shrinks to a small follow-up (still co-moving
&lt;code dir=&quot;auto&quot;&gt;sync/body_upload.py&lt;/code&gt; TOCTOU, no mixed parity pool — scope §C7).&lt;/li&gt;
&lt;li&gt;#2093 / #2400’s charter is completed; one canonical runtime-mutable field-set;
the dormant frontmatter fallbacks are gone.&lt;/li&gt;
&lt;li&gt;Activity-log and review narrative gain a truthful structured home (annotation
events), resolving M7’s data-loss.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Negative / cost&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A new event class is a real reducer change (fold + precedence rule) and a new
record shape — additive, but it touches the hot reduce path.&lt;/li&gt;
&lt;li&gt;The migration is corpus-wide and must reconstruct timestamps it cannot know
precisely (Decision 3 clamp).&lt;/li&gt;
&lt;li&gt;The &lt;code dir=&quot;auto&quot;&gt;shell_pid&lt;/code&gt; writers overlap #2160’s Wave-2 &lt;code dir=&quot;auto&quot;&gt;implement.py&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;workflow.py&lt;/code&gt;
degod; the shell_pid move must &lt;strong&gt;co-sequence with (or land behind) #2160&lt;/strong&gt;,
not race it (scope §C7). A &lt;code dir=&quot;auto&quot;&gt;blocks&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;blocked_by&lt;/code&gt; edge is required.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Neutral&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The C-007 PID-reuse hardening (&lt;code dir=&quot;auto&quot;&gt;process_liveness.py:44-95&lt;/code&gt;) is
authority-neutral; the only interaction risk is option (B)‘s dropped refresh,
which the chosen option (A) avoids.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;confirmation&quot;&gt;Confirmation&lt;/h3&gt;
&lt;p&gt;The mission is proven when a full WP lifecycle (claim → resume → subtask-done →
review → history append) produces a &lt;strong&gt;stable content hash&lt;/strong&gt; over the authored
spec while claim-liveness, done-inference, and all narrative views resolve
identically to today from the reduced snapshot. Acceptance criteria:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AC-1&lt;/strong&gt; — No &lt;code dir=&quot;auto&quot;&gt;implement&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;move-task&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;mark-status&lt;/code&gt; / review action writes
to &lt;code dir=&quot;auto&quot;&gt;tasks/WP##.md&lt;/code&gt; (snapshot mtime + bytes across a full lifecycle; assert
unchanged). &lt;strong&gt;&lt;code dir=&quot;auto&quot;&gt;move-task&lt;/code&gt; is an explicit target.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AC-2&lt;/strong&gt; — Claim-liveness resolves from the reduced snapshot, not frontmatter
&lt;code dir=&quot;auto&quot;&gt;shell_pid&lt;/code&gt;; a claimed WP with empty frontmatter is correctly live.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AC-3&lt;/strong&gt; — Done-inference (&lt;code dir=&quot;auto&quot;&gt;emit.py&lt;/code&gt; &lt;code dir=&quot;auto&quot;&gt;done==total&lt;/code&gt;) resolves from
&lt;code dir=&quot;auto&quot;&gt;subtask_marked&lt;/code&gt; annotations; lane transitions gate identically.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AC-4&lt;/strong&gt; — &lt;code dir=&quot;auto&quot;&gt;## Activity Log&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;## History&lt;/code&gt;, and review sections render from
events with no content loss vs today (resolves M7).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AC-5&lt;/strong&gt; — A full WP lifecycle produces a stable content hash (the churn fix,
wired once, no mixed pool).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AC-6&lt;/strong&gt; — Migration backfills the corpus into seed events; idempotent
(deterministic ULID seed-ids); reconstruction contract stated for
timestamp-less marks; no unrecoverable data loss.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;implementation-slices-sequenced&quot;&gt;Implementation slices (sequenced)&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Annotation event class + reducer fold&lt;/strong&gt; (Decision 1, 5) — record shape,
&lt;code dir=&quot;auto&quot;&gt;validate&lt;/code&gt; bypass for non-transitions, reducer precedence. FSM untouched.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reader cutover&lt;/strong&gt; (Decision 4) — repoint &lt;code dir=&quot;auto&quot;&gt;WorkPackage.*&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;WPMetadata&lt;/code&gt;
coercion, &lt;code dir=&quot;auto&quot;&gt;stale_detection&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;emit.py&lt;/code&gt; done-inference to the reduced
snapshot; keep frontmatter fallback behind a flag until backfill verified.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Migration&lt;/strong&gt; (Decision 3) — extend &lt;code dir=&quot;auto&quot;&gt;strip_frontmatter.py&lt;/code&gt;; backfill seed +
annotation events with deterministic ULIDs; &lt;strong&gt;backfill → verify&lt;/strong&gt; gate.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Writer cutover&lt;/strong&gt; (Decision 2) — cut all §C2 writers (incl. &lt;code dir=&quot;auto&quot;&gt;move-task&lt;/code&gt;,
&lt;code dir=&quot;auto&quot;&gt;orchestrator_api&lt;/code&gt;) off the file; &lt;strong&gt;co-sequenced with #2160&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Delete legacy fallbacks&lt;/strong&gt; (Decision 4) — remove &lt;code dir=&quot;auto&quot;&gt;workflow_cores.py:340-341&lt;/code&gt;
and &lt;code dir=&quot;auto&quot;&gt;done_bookkeeping.py:104-105&lt;/code&gt;; add the stable-hash guard (AC-5).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resolve &lt;code dir=&quot;auto&quot;&gt;tracker_refs&lt;/code&gt; classification&lt;/strong&gt; (Decision 2) — author-immutable or
evict; ship exactly one.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;related&quot;&gt;Related&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Scope: &lt;a href=&quot;../../plans/investigations/wp-runtime-state-eviction-scope.md&quot;&gt;&lt;code dir=&quot;auto&quot;&gt;docs/plans/investigations/wp-runtime-state-eviction-scope.md&lt;/code&gt;&lt;/a&gt; (§“Squad review corrections (2026-07-16)” is authoritative)&lt;/li&gt;
&lt;li&gt;Proposal: &lt;a href=&quot;../../plans/investigations/wp-op-schema-proposal.md&quot;&gt;&lt;code dir=&quot;auto&quot;&gt;docs/plans/investigations/wp-op-schema-proposal.md&lt;/code&gt;&lt;/a&gt; Part 4 (the corrected 4-step arc; &lt;strong&gt;B3&lt;/strong&gt; is this mission)&lt;/li&gt;
&lt;li&gt;Tickets: &lt;a href=&quot;../../plans/investigations/wp-op-schema-related-tickets.md&quot;&gt;&lt;code dir=&quot;auto&quot;&gt;docs/plans/investigations/wp-op-schema-related-tickets.md&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Design: &lt;a href=&quot;/architecture/wp-runtime-state-eviction/&quot;&gt;&lt;code dir=&quot;auto&quot;&gt;docs/architecture/wp-runtime-state-eviction.md&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/adr/3.x/2026-07-01-1-no-legacy-compat-branches-in-resolvers/&quot;&gt;ADR 2026-07-01-1 — No legacy-compat branches in resolvers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/adr/3.x/2026-06-11-1-op-as-first-class-execution-artifact/&quot;&gt;ADR 2026-06-11-1 — Op as a first-class execution artifact&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/adr/3.x/2026-06-07-3-wp-lane-fsm-genesis-and-finalize-clobber/&quot;&gt;ADR 2026-06-07-3 — WP lane FSM, the &lt;code dir=&quot;auto&quot;&gt;genesis&lt;/code&gt; lane, and the finalize event-log clobber fix&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Issues: #2093, #2400 (charter parent), #2160 (co-sequence), #1619 / #1666 (aggregate, gates the later schema flip)&lt;/li&gt;
&lt;/ul&gt;</content>
</entry>
