DD-469 #6: implement canonical managed-record profile primitives #25

Closed
opened 2026-11-19 10:55:26 +00:00 by svc-agent-writer · 5 comments

Decision and authority

Fresh bounded production child of #6, following closed #23 and merged PR #24 at 1499001652392c3e4392417f325f35ea00a28c89. Implements the already reviewed P09 canonical record encoding/profile foundation under the #6 standing grant (parent comment 42500, SHA-256 fc91e05e770da3139184c2ce21f74c2ccb141ffd3279f7f40cc6b86c249fd693). Exact transition protocol v2 has adversarial PASS 0, parent comment 42606; protocol SHA-256 1aaab9cb149d2575879428eaa9ce42d9b401a582a2ffa9bb44c31d4b2ac82cc2, review fd7dec433c30a201584f98841283441289af01782736a0464aed2b1062e04e80. Frozen protocol/map/review bytes must remain unchanged. This is fresh work, not a continuation of exhausted #6/proof runners. Default SVD rework caps and delegated auto-gate apply.

Result required

Add a private production module src/attention_mind_mcp/managed_profile.py providing the common encoded-record and accounting primitives required by the subsequent logical SQLite exporter, encrypted frontier and restore implementation. It must have one deep, documented interface that canonicalizes a named record class and validates/charges complete encoded bytes and counts. This child establishes no new public MCP/CLI operation and does not enable managed mode.

Use the exact reviewed P09 limits: 512 live records / 8 MiB aggregate canonical live candidate/provenance/disposition representation; 1,024 command records at most 64 KiB EACH including their complete record/framing; 65,536 lifetime opaque occurrence slots at most 128 encoded bytes EACH; 4,096 retained non-forgotten evidence facts at most 1 KiB EACH; 32 complete artifact inventory/location records at most 16 KiB EACH; one complete prepared record at most 64 KiB. Define stable named classes, explicit framing and a format version; reject unknown record classes and unknown framing fields. Semantic validation of each class's domain payload belongs to the later actual exporter/restorer; this primitive must not claim a semantically valid restore from structurally bounded JSON. Document exactly which class contains each current/future logical state record; no uncharged miscellaneous class. Binary payload fields must be explicitly base64 encoded with a canonical helper rather than implicitly stringified. Do not silently serialize unsupported Python objects.

Canonical representation is UTF-8 JSON, sorted keys, compact separators, no floats/NaN/Infinity, no duplicate object keys at any decode boundary, no non-string mapping keys, and bounded nesting. Restrict integers to the P02 signed-time/unsigned-counter envelope (negative values no lower than signed 64-bit; positives no larger than unsigned 64-bit); reject booleans where integer accounting is required. Reject malformed Unicode and ambiguous or noncanonical binary encodings. Caps apply AFTER encoding, including framing, escaping and base64; character count/Python-object size is not a byte charge. Account all framing used by the primitive; P09 reserves a header up to 64 KiB, footer up to 4 KiB and a hard 96 MiB plaintext cap. Expose these bounds and the 96 MiB + 8 KiB AEAD envelope bound to later callers without claiming encryption, authentication or complete-archive validation. Do not add a general unbounded parser or whole-artifact accumulator as a shortcut.

The accountant must be usable incrementally without retaining all payloads. A refused record must not partially consume a count/byte reservation. The primitive validates one archive's encoded occupancy against a caller-supplied high-water bound, and refuses decreases within that accountant instance. It neither establishes the authority or freshness of that bound nor enforces lifetime consumption across instances, processes, queue generations or restore. Durable non-reset remains an explicit integration requirement under P09 and is not discharged by this child. Keep the per-archive occurrence ceiling, range/type checks, in-instance monotonicity, atomic refusal and absence of decrement/refund/reset APIs. Existing installations above the managed profile remain untouched; later managed-mode migration must explicitly refuse or migrate rather than truncate. Do not change existing local-mode limits or behavior.

Scope correction and outstanding P09 obligation

Spec disposition /private/tmp/attention6-child25-lifetime-disposition-20261119.md, SHA-256 e96961eb3606ef7154787045c9ca5dd48b97dbfc3f8773abef78f9491d42da80, corrects the contradictory fresh-writer claim above. The original product requirement that a fresh writer cannot reset lifetime consumption is preserved as outstanding under parent #6/P09; closing this narrower child does not satisfy it. Future durable integration must reconcile the independent authoritative frontier and persistent original-admission reservations before restore or new admission. Neither an older authenticated archive nor reconstruction of an accountant may replenish capacity. Missing or inconsistent authority must refuse/quarantine; restart, stale-restore and fresh-writer tests remain owed under #6/P09. Header-counter consistency belongs to a later schema-aware archive validator, and is not added to this child.

HEADER is a structural byte-charge home for queue/principals/grants only; it does not approve secret serialization or a final restore schema. Queue HMAC/suppression/signing-root custody remains separate, with no exporter here. Future delivery-intent mapping is explicitly UNASSIGNED: a later child must assign a named class and verify the complete reviewed bound before including those records. There is no miscellaneous uncharged class.

Malformed JSON, including malformed numeric syntax, maps to noncanonical_record. A syntactically valid integer token outside the envelope, including one exceeding the runtime conversion-length limit, maps to integer_out_of_range. Any disallowed record-class value or subclass maps to unknown_record_class. Do not map every ValueError to integer overflow, change the process-wide integer conversion limit, relax the envelope or leak input/library exception text; other specific refusal codes are unchanged.

Validation

Add meaningful production-component tests in tests/test_managed_profile.py, marked unit. Verify every count and encoded-byte boundary, including exactly-at-limit success and one-over refusal; two-byte and escaped Unicode; base64 expansion; unsupported/non-finite/floating/nested/duplicate-key input; unknown classes/framing fields; integer overflow; and failed-charge atomicity. Exercise simultaneous maximum class occupancy through the real incremental production primitive, not an algebraic stand-in or merely a reader refusing an oversize object. Verify aggregate measured encoded bytes remain inside the reviewed plaintext bound. Stream/discard encoded records instead of retaining the maximum archive in memory. This is component evidence only: successful encryption/decryption/restore at full profile, real SQLite/WAL/disk/RAM measurements and saturation Forget remain E06 owed.

Run standard repository quality, unit and transport checks appropriate to the change. PR requires independent Standards and Spec reviews PASS 0, exact-head CI and full raw-log audit of command not found, errors during collection, = not found, and "is_error":true before merge. No exception to those gates.

Fixed write set and exclusions

Write only src/attention_mind_mcp/managed_profile.py, tests/test_managed_profile.py, and docs/planning/issue-6-review-register.md (append a concise component status and the operator-attested disposal update; preserve its historical facts). No contract/ADR/guarantee change, dependency/lock/build/CI change, schema migration, service wiring, filesystem staging, provider adapter, credential lookup, IAM, network/provider request, cleanup claim/reservation, observer replay, release or production deployment. No new API may claim content is erased, encrypted, recoverable, authenticated, current or usable before later required integration.

All E01-E15 full-product rows remain owed. V7 overall remains UNQUALIFIED. Operator attested console disposal of slot and identical at 21:51:52 +11:00, parent comment 42633; the former two-key debt is discharged by attestation only, with no sampled absence/version/physical-sanitization evidence. Scripted cleanup v1 is RETIRED UNUSED. Provider budget unchanged at 57 charged units / 1,943 remaining / 1,504 charged body bytes; cumulative actual wire count UNKNOWN. Report child/merge to guide t8t and spec t8g; do not close #6, #7, #8 or epic #1.

Blocked by

  • #23 (closed; reviewed specification baseline merged in PR #24).
## Decision and authority Fresh bounded production child of #6, following closed #23 and merged PR #24 at `1499001652392c3e4392417f325f35ea00a28c89`. Implements the already reviewed P09 canonical record encoding/profile foundation under the #6 standing grant (parent comment 42500, SHA-256 `fc91e05e770da3139184c2ce21f74c2ccb141ffd3279f7f40cc6b86c249fd693`). Exact transition protocol v2 has adversarial PASS 0, parent comment 42606; protocol SHA-256 `1aaab9cb149d2575879428eaa9ce42d9b401a582a2ffa9bb44c31d4b2ac82cc2`, review `fd7dec433c30a201584f98841283441289af01782736a0464aed2b1062e04e80`. Frozen protocol/map/review bytes must remain unchanged. This is fresh work, not a continuation of exhausted #6/proof runners. Default SVD rework caps and delegated auto-gate apply. ## Result required Add a private production module `src/attention_mind_mcp/managed_profile.py` providing the common encoded-record and accounting primitives required by the subsequent logical SQLite exporter, encrypted frontier and restore implementation. It must have one deep, documented interface that canonicalizes a named record class and validates/charges complete encoded bytes and counts. This child establishes no new public MCP/CLI operation and does not enable managed mode. Use the exact reviewed P09 limits: 512 live records / 8 MiB aggregate canonical live candidate/provenance/disposition representation; 1,024 command records at most 64 KiB EACH including their complete record/framing; 65,536 lifetime opaque occurrence slots at most 128 encoded bytes EACH; 4,096 retained non-forgotten evidence facts at most 1 KiB EACH; 32 complete artifact inventory/location records at most 16 KiB EACH; one complete prepared record at most 64 KiB. Define stable named classes, explicit framing and a format version; reject unknown record classes and unknown framing fields. Semantic validation of each class's domain payload belongs to the later actual exporter/restorer; this primitive must not claim a semantically valid restore from structurally bounded JSON. Document exactly which class contains each current/future logical state record; no uncharged miscellaneous class. Binary payload fields must be explicitly base64 encoded with a canonical helper rather than implicitly stringified. Do not silently serialize unsupported Python objects. Canonical representation is UTF-8 JSON, sorted keys, compact separators, no floats/NaN/Infinity, no duplicate object keys at any decode boundary, no non-string mapping keys, and bounded nesting. Restrict integers to the P02 signed-time/unsigned-counter envelope (negative values no lower than signed 64-bit; positives no larger than unsigned 64-bit); reject booleans where integer accounting is required. Reject malformed Unicode and ambiguous or noncanonical binary encodings. Caps apply AFTER encoding, including framing, escaping and base64; character count/Python-object size is not a byte charge. Account all framing used by the primitive; P09 reserves a header up to 64 KiB, footer up to 4 KiB and a hard 96 MiB plaintext cap. Expose these bounds and the 96 MiB + 8 KiB AEAD envelope bound to later callers without claiming encryption, authentication or complete-archive validation. Do not add a general unbounded parser or whole-artifact accumulator as a shortcut. The accountant must be usable incrementally without retaining all payloads. A refused record must not partially consume a count/byte reservation. The primitive validates one archive's encoded occupancy against a caller-supplied high-water bound, and refuses decreases within that accountant instance. It neither establishes the authority or freshness of that bound nor enforces lifetime consumption across instances, processes, queue generations or restore. Durable non-reset remains an explicit integration requirement under P09 and is not discharged by this child. Keep the per-archive occurrence ceiling, range/type checks, in-instance monotonicity, atomic refusal and absence of decrement/refund/reset APIs. Existing installations above the managed profile remain untouched; later managed-mode migration must explicitly refuse or migrate rather than truncate. Do not change existing local-mode limits or behavior. ## Scope correction and outstanding P09 obligation Spec disposition `/private/tmp/attention6-child25-lifetime-disposition-20261119.md`, SHA-256 `e96961eb3606ef7154787045c9ca5dd48b97dbfc3f8773abef78f9491d42da80`, corrects the contradictory fresh-writer claim above. The original product requirement that a fresh writer cannot reset lifetime consumption is preserved as outstanding under parent #6/P09; closing this narrower child does not satisfy it. Future durable integration must reconcile the independent authoritative frontier and persistent original-admission reservations before restore or new admission. Neither an older authenticated archive nor reconstruction of an accountant may replenish capacity. Missing or inconsistent authority must refuse/quarantine; restart, stale-restore and fresh-writer tests remain owed under #6/P09. Header-counter consistency belongs to a later schema-aware archive validator, and is not added to this child. HEADER is a structural byte-charge home for queue/principals/grants only; it does not approve secret serialization or a final restore schema. Queue HMAC/suppression/signing-root custody remains separate, with no exporter here. Future delivery-intent mapping is explicitly UNASSIGNED: a later child must assign a named class and verify the complete reviewed bound before including those records. There is no miscellaneous uncharged class. Malformed JSON, including malformed numeric syntax, maps to `noncanonical_record`. A syntactically valid integer token outside the envelope, including one exceeding the runtime conversion-length limit, maps to `integer_out_of_range`. Any disallowed record-class value or subclass maps to `unknown_record_class`. Do not map every `ValueError` to integer overflow, change the process-wide integer conversion limit, relax the envelope or leak input/library exception text; other specific refusal codes are unchanged. ## Validation Add meaningful production-component tests in `tests/test_managed_profile.py`, marked unit. Verify every count and encoded-byte boundary, including exactly-at-limit success and one-over refusal; two-byte and escaped Unicode; base64 expansion; unsupported/non-finite/floating/nested/duplicate-key input; unknown classes/framing fields; integer overflow; and failed-charge atomicity. Exercise simultaneous maximum class occupancy through the real incremental production primitive, not an algebraic stand-in or merely a reader refusing an oversize object. Verify aggregate measured encoded bytes remain inside the reviewed plaintext bound. Stream/discard encoded records instead of retaining the maximum archive in memory. This is component evidence only: successful encryption/decryption/restore at full profile, real SQLite/WAL/disk/RAM measurements and saturation Forget remain E06 owed. Run standard repository quality, unit and transport checks appropriate to the change. PR requires independent Standards and Spec reviews PASS 0, exact-head CI and full raw-log audit of `command not found`, `errors during collection`, `= not found`, and `"is_error":true` before merge. No exception to those gates. ## Fixed write set and exclusions Write only `src/attention_mind_mcp/managed_profile.py`, `tests/test_managed_profile.py`, and `docs/planning/issue-6-review-register.md` (append a concise component status and the operator-attested disposal update; preserve its historical facts). No contract/ADR/guarantee change, dependency/lock/build/CI change, schema migration, service wiring, filesystem staging, provider adapter, credential lookup, IAM, network/provider request, cleanup claim/reservation, observer replay, release or production deployment. No new API may claim content is erased, encrypted, recoverable, authenticated, current or usable before later required integration. All E01-E15 full-product rows remain owed. V7 overall remains UNQUALIFIED. Operator attested console disposal of `slot` and `identical` at 21:51:52 +11:00, parent comment 42633; the former two-key debt is discharged by attestation only, with no sampled absence/version/physical-sanitization evidence. Scripted cleanup v1 is RETIRED UNUSED. Provider budget unchanged at 57 charged units / 1,943 remaining / 1,504 charged body bytes; cumulative actual wire count UNKNOWN. Report child/merge to guide t8t and spec t8g; do not close #6, #7, #8 or epic #1. ## Blocked by - #23 (closed; reviewed specification baseline merged in PR #24).
Collaborator

⏸ SVD architect gate: dev/attention-mind-mcp#25 dd-469-6-implement-canonical-managed-record-profile-primitiv

Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity standard · dispatch effort medium

Run: 20261119T105942Z-f3b9f4a6

Held because: CLEAN but 6 open risk(s) (3 verification · 3 decision) — HOLD-ALL parks everything. The risks, verbatim:

Open risks:

  1. P09 names no class for the existing principals/grants tables or the queue singleton (including its 32-byte HMAC secret), and the issue forbids an uncharged miscellaneous class. The lean maps them to HEADER, bounded by 64 KiB. Question: is HEADER the right charged home for authority rows, and is it right to leave to the later exporter child the decision on whether the queue secret may be exported (P08 root custody)? [decision]
  2. Future slice-5 pending delivery intents (DEFAULT_LIMITS pending_delivery_count/bytes) have no P09 class. The lean documents them under LIVE (512 records / 8 MiB). Question: is LIVE acceptable, or must a later child revise the reviewed bound with a new named class before delivery tables join a managed archive? Only the docstring mapping changes in this child. [decision]
  3. Lifetime high-water interpretation: ArchiveOccupancy takes a caller-supplied durable lifetime_high_water, refuses OCCURRENCE slots beyond it, and only allows it to rise. Durable admission/reservation is left to future integration. Question: does this satisfy 'a caller cannot reset lifetime/high-water consumption merely by starting a new writer', or should the high-water instead be carried in and cross-checked against the HEADER record? [decision]
  4. No numeric test baseline was measured: the Half-A sandbox has no uv/.venv, and the host has Python 3.14 against a required 3.12. Check: on pristine 1499001 before the first edit, run uv run python3 -m pytest -m unit and uv run python3 -m pytest -m transport; after the change, assert the failure set is unchanged and that tests/test_managed_profile.py passes in full. [verification]
  5. This is component evidence only. E06 (fully populated maximum profile successfully encrypted, decrypted and restored, with real SQLite/WAL/disk/RAM measurement and saturation Forget) remains owed by a later #6 child before any managed-mode claim. Check: the E06 run in that child, not this PR. [verification]
  6. Merge gates are post-PR. Check on the exact PR head: independent Standards and Spec reviews with PASS 0, green Woodpecker CI, and a full raw-log grep showing zero hits for command not found, errors during collection, = not found and "is_error":true. [verification]

Change: New private module src/attention_mind_mcp/managed_profile.py, stdlib plus from .contract import FoundationError. Contents:

  • Constants: FORMAT_VERSION=1; MAX_RECORD_DEPTH=32; MIN_INTEGER=-(263); MAX_INTEGER=264-1; PLAINTEXT_BYTES=96 MiB; AEAD_ENVELOPE_BYTES=96 MiB+8 KiB; REVIEWED_PROFILE_CEILING_BYTES=86 MiB; PROFILE_TOTAL_BYTES=88,739,840.
  • RecordClass StrEnum with 8 members (header, live, command, occurrence, evidence, artifact, prepared, footer) and an immutable PROFILE MappingProxyType of frozen ClassLimit(max_count, max_record_bytes, max_total_bytes) holding the exact P09 values. The docstring maps every current and future table to a class; there is no miscellaneous class.
  • canonical_record(cls, payload): exact-type walk (refuses float, tuple, bytes, IntEnum, non-str keys, lone surrogates, out-of-range ints, depth over 32). Frame {"c","p","v"}, encoded with json.dumps(sort_keys, compact, ensure_ascii=False, allow_nan=False) plus a trailing \n. The class cap applies after encoding.
  • decode_record(raw): bounded to MAX_RECORD_BYTES before parse. Mirrors the contract._depth pre-scan and the _unique/_constant hooks (contract.py:45-136), adds a parse_int range check, closed frame keys and a version check. Byte-identical re-canonicalization is required, so non-canonical spellings are refused.
  • encode_binary/decode_binary: canonical padded RFC 4648 base64 with a round-trip check.
  • ArchiveOccupancy(lifetime_high_water=): charge/charge_encoded use a check-all-then-mutate reservation following custody.prepare (custody.py:203-229). It enforces class count, class bytes, the plaintext bound and occurrence slots ≤ the declared high-water. raise_lifetime_high_water is monotone; snapshot() is immutable; there is no refund, decrement or reset API.
  • FoundationError is raised with fixed codes. contract.encode/decode and commands.canonical are mirrored, not reused or changed.
  • Review register: append-only new section (component status, operator-attested slot/identical disposal from comment 42633, cleanup v1 RETIRED UNUSED superseding the HOLD sentence, budget unchanged).

Files: src/attention_mind_mcp/managed_profile.py · tests/test_managed_profile.py · docs/planning/issue-6-review-register.md

Decision: accept the 6 open risk(s) above and dispatch this spec (svd:go), or park (svd:skip) / re-spec (svd:respec)?

Your call (when this issue is held at the gate via svd:hold):

  • add label svd:go — approve; Half-B dispatch accepts exactly this spec (open risks accepted)
  • add label svd:fire beside svd:go — approve AND authorise the Half-B fire from the phone; never on its own
  • add label svd:skip — park it; dispatch refuses it and the issue stays for a human
  • add label svd:respec — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-19-dd-469-6-implement-canonical-managed-record-profile-primitiv.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-19-dd-469-6-implement-canonical-managed-record-profile-primitiv.md

### ⏸ SVD architect gate: dev/attention-mind-mcp#25 dd-469-6-implement-canonical-managed-record-profile-primitiv **Status:** CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity `standard` · dispatch effort `medium` **Run:** `20261119T105942Z-f3b9f4a6` **Held because:** CLEAN but 6 open risk(s) (3 verification · 3 decision) — HOLD-ALL parks everything. The risks, verbatim: **Open risks:** 1. P09 names no class for the existing principals/grants tables or the queue singleton (including its 32-byte HMAC secret), and the issue forbids an uncharged miscellaneous class. The lean maps them to HEADER, bounded by 64 KiB. Question: is HEADER the right charged home for authority rows, and is it right to leave to the later exporter child the decision on whether the queue secret may be exported (P08 root custody)? [decision] 2. Future slice-5 pending delivery intents (DEFAULT_LIMITS pending_delivery_count/bytes) have no P09 class. The lean documents them under LIVE (512 records / 8 MiB). Question: is LIVE acceptable, or must a later child revise the reviewed bound with a new named class before delivery tables join a managed archive? Only the docstring mapping changes in this child. [decision] 3. Lifetime high-water interpretation: ArchiveOccupancy takes a caller-supplied durable lifetime_high_water, refuses OCCURRENCE slots beyond it, and only allows it to rise. Durable admission/reservation is left to future integration. Question: does this satisfy 'a caller cannot reset lifetime/high-water consumption merely by starting a new writer', or should the high-water instead be carried in and cross-checked against the HEADER record? [decision] 4. No numeric test baseline was measured: the Half-A sandbox has no uv/.venv, and the host has Python 3.14 against a required 3.12. Check: on pristine 1499001 before the first edit, run `uv run python3 -m pytest -m unit` and `uv run python3 -m pytest -m transport`; after the change, assert the failure set is unchanged and that tests/test_managed_profile.py passes in full. [verification] 5. This is component evidence only. E06 (fully populated maximum profile successfully encrypted, decrypted and restored, with real SQLite/WAL/disk/RAM measurement and saturation Forget) remains owed by a later #6 child before any managed-mode claim. Check: the E06 run in that child, not this PR. [verification] 6. Merge gates are post-PR. Check on the exact PR head: independent Standards and Spec reviews with PASS 0, green Woodpecker CI, and a full raw-log grep showing zero hits for `command not found`, `errors during collection`, `= not found` and `"is_error":true`. [verification] **Change:** New private module src/attention_mind_mcp/managed_profile.py, stdlib plus `from .contract import FoundationError`. Contents: - Constants: FORMAT_VERSION=1; MAX_RECORD_DEPTH=32; MIN_INTEGER=-(2**63); MAX_INTEGER=2**64-1; PLAINTEXT_BYTES=96 MiB; AEAD_ENVELOPE_BYTES=96 MiB+8 KiB; REVIEWED_PROFILE_CEILING_BYTES=86 MiB; PROFILE_TOTAL_BYTES=88,739,840. - RecordClass StrEnum with 8 members (header, live, command, occurrence, evidence, artifact, prepared, footer) and an immutable PROFILE MappingProxyType of frozen ClassLimit(max_count, max_record_bytes, max_total_bytes) holding the exact P09 values. The docstring maps every current and future table to a class; there is no miscellaneous class. - canonical_record(cls, payload): exact-type walk (refuses float, tuple, bytes, IntEnum, non-str keys, lone surrogates, out-of-range ints, depth over 32). Frame {"c","p","v"}, encoded with json.dumps(sort_keys, compact, ensure_ascii=False, allow_nan=False) plus a trailing \n. The class cap applies after encoding. - decode_record(raw): bounded to MAX_RECORD_BYTES before parse. Mirrors the contract._depth pre-scan and the _unique/_constant hooks (contract.py:45-136), adds a parse_int range check, closed frame keys and a version check. Byte-identical re-canonicalization is required, so non-canonical spellings are refused. - encode_binary/decode_binary: canonical padded RFC 4648 base64 with a round-trip check. - ArchiveOccupancy(lifetime_high_water=): charge/charge_encoded use a check-all-then-mutate reservation following custody.prepare (custody.py:203-229). It enforces class count, class bytes, the plaintext bound and occurrence slots ≤ the declared high-water. raise_lifetime_high_water is monotone; snapshot() is immutable; there is no refund, decrement or reset API. - FoundationError is raised with fixed codes. contract.encode/decode and commands.canonical are mirrored, not reused or changed. - Review register: append-only new section (component status, operator-attested slot/identical disposal from comment 42633, cleanup v1 RETIRED UNUSED superseding the HOLD sentence, budget unchanged). **Files:** `src/attention_mind_mcp/managed_profile.py` · `tests/test_managed_profile.py` · `docs/planning/issue-6-review-register.md` **Decision:** accept the 6 open risk(s) above and dispatch this spec (`svd:go`), or park (`svd:skip`) / re-spec (`svd:respec`)? **Your call** (when this issue is held at the gate via `svd:hold`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-19-dd-469-6-implement-canonical-managed-record-profile-primitiv.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-19-dd-469-6-implement-canonical-managed-record-profile-primitiv.md`</sub>
Author
Member

Resumption gate after operator proceed

The operator's 22:19:52 +11:00 proceed permits resuming #25 under the registered #6 standing grant, delegated auto-gate and default caps. #25 is independent of E09's unreviewed custody seam: its fixed write set remains managed_profile.py, its unit tests and the append-only review register, with no provider adapter or E09 interface adoption. E09 setup, identities, policies and the proposed frontier-bucket grant extension remain unapproved.

Half-A run 20261119T105942Z-f3b9f4a6 is CLEAN/0, with no degraded or inconclusive lenses and no rework rounds. The original result/spec are preserved. Auto-gate found a residual that CLEAN does not resolve: the draft's caller-supplied high-water limits one-archive occupancy but cannot prove durable lifetime non-reset across a new writer. The issue also defers durable admission. Spec t8g has the precise interpretation question (publication 59e6acda-f402-4379-a67a-785408b32d77) before any acceptance is weakened or dispatch starts. This is a routine issue-contract interpretation gate, not an E09 dependency. No svd:go added, no new runner or implementation dispatch; the same admitted run and default caps remain preserved.

Before any production edit, pristine base 1499001652392c3e4392417f325f35ea00a28c89 passed 359 unit tests and 64 transport tests under Python 3.12.12 with locked dependencies. Checkout remains clean. Receipt: /private/tmp/attention6-qualification-20261119/child25-pristine-test-baseline.json. These are baseline results only. Independent Standards/Spec PASS 0, exact-head CI and all four raw-log checks remain mandatory for any later PR.

No Wasabi credential lookup, provider request, claim or reservation. Accounting remains 57 charged units / 1,943 remaining / 1,504 bytes; historical actual wire total UNKNOWN. #6 remains open and overall UNQUALIFIED; E01–E15 product acceptance remains owed.

## Resumption gate after operator proceed The operator's 22:19:52 +11:00 proceed permits resuming #25 under the registered #6 standing grant, delegated auto-gate and default caps. #25 is independent of E09's unreviewed custody seam: its fixed write set remains managed_profile.py, its unit tests and the append-only review register, with no provider adapter or E09 interface adoption. E09 setup, identities, policies and the proposed frontier-bucket grant extension remain unapproved. Half-A run `20261119T105942Z-f3b9f4a6` is CLEAN/0, with no degraded or inconclusive lenses and no rework rounds. The original result/spec are preserved. Auto-gate found a residual that CLEAN does not resolve: the draft's caller-supplied high-water limits one-archive occupancy but cannot prove durable lifetime non-reset across a new writer. The issue also defers durable admission. Spec t8g has the precise interpretation question (publication `59e6acda-f402-4379-a67a-785408b32d77`) before any acceptance is weakened or dispatch starts. This is a routine issue-contract interpretation gate, not an E09 dependency. No `svd:go` added, no new runner or implementation dispatch; the same admitted run and default caps remain preserved. Before any production edit, pristine base `1499001652392c3e4392417f325f35ea00a28c89` passed 359 unit tests and 64 transport tests under Python 3.12.12 with locked dependencies. Checkout remains clean. Receipt: `/private/tmp/attention6-qualification-20261119/child25-pristine-test-baseline.json`. These are baseline results only. Independent Standards/Spec PASS 0, exact-head CI and all four raw-log checks remain mandatory for any later PR. No Wasabi credential lookup, provider request, claim or reservation. Accounting remains 57 charged units / 1,943 remaining / 1,504 bytes; historical actual wire total UNKNOWN. #6 remains open and overall UNQUALIFIED; E01–E15 product acceptance remains owed.
Author
Member

Registered spec's 22:35 lifetime gate disposition, SHA-256 e96961eb3606ef7154787045c9ca5dd48b97dbfc3f8773abef78f9491d42da80, option (a). #25 acceptance has been amended and independently read back exactly.

The primitive validates one archive's encoded occupancy against a caller-supplied high-water bound, and refuses decreases within that accountant instance. It neither establishes the authority or freshness of that bound nor enforces lifetime consumption across instances, processes, queue generations or restore. Durable non-reset remains an explicit integration requirement under P09 and is not discharged by this child.

The original fresh-writer non-reset requirement remains owed under parent #6/P09: independent authoritative frontier plus persistent original-admission reconciliation before restore or new admission; missing/inconsistent authority refuses/quarantines. Restart, stale-restore and fresh-writer integration tests remain owed. No header cross-check or interface expansion enters #25. HEADER charges are structural only, with no secret-export permission; future delivery-intent mapping remains UNASSIGNED.

The spec's normative module contract, acceptance and test descriptions now match, including test_declared_occurrence_bound_and_in_instance_monotonicity. The production module and test file do not yet exist; their corrected requirements govern dispatch. Fixed codes: malformed JSON/numeric syntax → noncanonical_record; valid out-of-envelope integer token, including runtime digit-limit cases → integer_out_of_range; disallowed class value/subclass → unknown_record_class. No blanket ValueError mapping or process-wide integer-limit changes.

Amended spec SHA-256 7dcbd361d9880feb6b44c5e47803442b3978eccb8413a8a24ef833b6b74eca81; original SHA-256 6d580042a2a3a3aa5fc81de13b16b1c6fbff8aeafc59d1fb0d4facd15520ed82 and complete original Half-A run are preserved at /private/tmp/attention6-child25-lifetime-correction/. Same run 20261119T105942Z-f3b9f4a6, zero prior rework rounds consumed; default caps, engines, base and three-file write set unchanged. Affected correctness/spec/security verification is next; no GO or implementation dispatch yet. Existing pristine baseline remains 359 unit / 64 transport PASS.

The eventual register change must be append-only and keep the outstanding P09 obligation traceable under #6. All E01–E15 remain owed; #6 remains UNQUALIFIED. No E09 dependency, provider request, credential lookup, reservation, cleanup, parent closure or release follows. Provider accounting unchanged: 57 charged units, 1,943 remaining, 1,504 charged body bytes; cumulative actual wire count UNKNOWN. Exact-head independent Standards and Spec PASS 0, CI and raw-log audit remain required before merge.

Registered spec's 22:35 lifetime gate disposition, SHA-256 `e96961eb3606ef7154787045c9ca5dd48b97dbfc3f8773abef78f9491d42da80`, option (a). #25 acceptance has been amended and independently read back exactly. The primitive validates one archive's encoded occupancy against a caller-supplied high-water bound, and refuses decreases within that accountant instance. It neither establishes the authority or freshness of that bound nor enforces lifetime consumption across instances, processes, queue generations or restore. Durable non-reset remains an explicit integration requirement under P09 and is not discharged by this child. The original fresh-writer non-reset requirement remains owed under parent #6/P09: independent authoritative frontier plus persistent original-admission reconciliation before restore or new admission; missing/inconsistent authority refuses/quarantines. Restart, stale-restore and fresh-writer integration tests remain owed. No header cross-check or interface expansion enters #25. HEADER charges are structural only, with no secret-export permission; future delivery-intent mapping remains UNASSIGNED. The spec's normative module contract, acceptance and test descriptions now match, including `test_declared_occurrence_bound_and_in_instance_monotonicity`. The production module and test file do not yet exist; their corrected requirements govern dispatch. Fixed codes: malformed JSON/numeric syntax → `noncanonical_record`; valid out-of-envelope integer token, including runtime digit-limit cases → `integer_out_of_range`; disallowed class value/subclass → `unknown_record_class`. No blanket ValueError mapping or process-wide integer-limit changes. Amended spec SHA-256 `7dcbd361d9880feb6b44c5e47803442b3978eccb8413a8a24ef833b6b74eca81`; original SHA-256 `6d580042a2a3a3aa5fc81de13b16b1c6fbff8aeafc59d1fb0d4facd15520ed82` and complete original Half-A run are preserved at `/private/tmp/attention6-child25-lifetime-correction/`. Same run `20261119T105942Z-f3b9f4a6`, zero prior rework rounds consumed; default caps, engines, base and three-file write set unchanged. Affected correctness/spec/security verification is next; no GO or implementation dispatch yet. Existing pristine baseline remains 359 unit / 64 transport PASS. The eventual register change must be append-only and keep the outstanding P09 obligation traceable under #6. All E01–E15 remain owed; #6 remains UNQUALIFIED. No E09 dependency, provider request, credential lookup, reservation, cleanup, parent closure or release follows. Provider accounting unchanged: 57 charged units, 1,943 remaining, 1,504 charged body bytes; cumulative actual wire count UNKNOWN. Exact-head independent Standards and Spec PASS 0, CI and raw-log audit remain required before merge.
Collaborator

✅ SVD architect gate: dev/attention-mind-mcp#25 dd-469-6-implement-canonical-managed-record-profile-primitiv

Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity unclassified · dispatch effort unclassified

Run: 20261119T105942Z-f3b9f4a6

Files: src/attention_mind_mcp/managed_profile.py · tests/test_managed_profile.py · docs/planning/issue-6-review-register.md

Write-set divergence: present table wins. 0 sourceHashes vs 14-row table.

Decision: dispatch this spec (svd:go)?

Your call (when this issue is held at the gate via svd:hold):

  • add label svd:go — approve; Half-B dispatch accepts exactly this spec (open risks accepted)
  • add label svd:fire beside svd:go — approve AND authorise the Half-B fire from the phone; never on its own
  • add label svd:skip — park it; dispatch refuses it and the issue stays for a human
  • add label svd:respec — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-19-dd-469-6-implement-canonical-managed-record-profile-primitiv.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-19-dd-469-6-implement-canonical-managed-record-profile-primitiv.md

### ✅ SVD architect gate: dev/attention-mind-mcp#25 dd-469-6-implement-canonical-managed-record-profile-primitiv **Status:** CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity `unclassified` · dispatch effort `unclassified` **Run:** `20261119T105942Z-f3b9f4a6` **Files:** `src/attention_mind_mcp/managed_profile.py` · `tests/test_managed_profile.py` · `docs/planning/issue-6-review-register.md` **Write-set divergence:** present table wins. 0 sourceHashes vs 14-row table. **Decision:** dispatch this spec (`svd:go`)? **Your call** (when this issue is held at the gate via `svd:hold`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-19-dd-469-6-implement-canonical-managed-record-profile-primitiv.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-19-dd-469-6-implement-canonical-managed-record-profile-primitiv.md`</sub>
Collaborator

spec-verify-dispatch Half B for dev/attention-mind-mcp#25 dd-469-6-implement-canonical-managed-record-profile-primitiv completed integration verify.

  • PR: #27
  • Branch: feat/svd-dev-attention-mind-mcp-25-dd-469-6-implement-canonic-f3b9f4a6
  • Commit: 92ecee55dc
  • Build: none
  • Test: green
  • Reader audit clean: True
  • Spec fidelity: True
  • Ready for merge: True
  • Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/76/pipeline/28/1
  • Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll
  • Warning: Subagent deviation: a second independently reachable class-byte refusal is impossible for ARTIFACT and EVIDENCE, because total cap equals max_count times max_record_bytes. The tests cover exact ARTIFACT occupancy and count refusal, and LIVE class-byte refusal. This follows from the profile arithmetic. Not a defect.
  • Warning: Test names differ from the spec's indicative names. The unicode, base64, integer-envelope and nesting checks are merged into test_unicode_and_base64_charge and test_integer_envelope_and_nesting. The spec has no scenario table and calls the names indicative. I did not audit the merged tests line by line.
  • Warning: Durable P09 non-reset remains an outstanding obligation on parent #6, per the architect adjustment. This PR does not cover it.
  • Warning: self-review (oversized integer in malformed JSON classified before full syntax check) was fixed. The 406 unit and 64 transport tests pass.
  • Warning: I did not read PR comments or reviews, so I make no claim about independent review. CI is pending on the forge.
  • CI wait: ci/woodpecker/pr/validation -> pass
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261119T105942Z-f3b9f4a6 --confirm-merge)
spec-verify-dispatch Half B for dev/attention-mind-mcp#25 dd-469-6-implement-canonical-managed-record-profile-primitiv completed integration verify. - PR: https://git.groupthink.asia/dev/attention-mind-mcp/pulls/27 - Branch: feat/svd-dev-attention-mind-mcp-25-dd-469-6-implement-canonic-f3b9f4a6 - Commit: 92ecee55dc474617e93d9617a231f2ca61ca4392 - Build: none - Test: green - Reader audit clean: True - Spec fidelity: True - Ready for merge: True - Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/76/pipeline/28/1 - Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll - Warning: Subagent deviation: a second independently reachable class-byte refusal is impossible for ARTIFACT and EVIDENCE, because total cap equals max_count times max_record_bytes. The tests cover exact ARTIFACT occupancy and count refusal, and LIVE class-byte refusal. This follows from the profile arithmetic. Not a defect. - Warning: Test names differ from the spec's indicative names. The unicode, base64, integer-envelope and nesting checks are merged into test_unicode_and_base64_charge and test_integer_envelope_and_nesting. The spec has no scenario table and calls the names indicative. I did not audit the merged tests line by line. - Warning: Durable P09 non-reset remains an outstanding obligation on parent #6, per the architect adjustment. This PR does not cover it. - Warning: self-review (oversized integer in malformed JSON classified before full syntax check) was fixed. The 406 unit and 64 transport tests pass. - Warning: I did not read PR comments or reviews, so I make no claim about independent review. CI is pending on the forge. - CI wait: ci/woodpecker/pr/validation -> pass - Decision: review the PR and merge? (`codex-svd ship --run-id 20261119T105942Z-f3b9f4a6 --confirm-merge`)
svc-svd-writer 2026-11-19 12:18:37 +00:00
  • closed this issue
  • removed the
    svd:go
    label
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/attention-mind-mcp#25
No description provided.