qdb Platform Docs Download

Repository source: docs/plans/unified_removal_format/unified_removal_format_step4_implementation_summary.md

Feature plan: Step 1 · Step 2 · Step 3 · Step 4

Debug mode: enabled. Effort study: railspike-effort / v3/unified_removal_format; ledger. Extended estimates: enabled.

Cycle estimate: 0.70

Entry — 2026-10-29 UTC

Step 3 explicitly approved; planning commit 5143ab6f, branch feature/unified-removal-format. Scope v2/A, original baseline/R1/P2 retained; single exposed Codex rater. Step 3 whole-cycle 0.70 reaffirmed. Original S1–S7/v2 stage work: 0.10/0.15/0.15/0.10/0.15/0.10/0.15; non-additive, prior v1 values in plan. No old-format compatibility or migration; no dependencies/deployment/data cleanup. All stages pending at entry. No measured labor or accepted outcome.

— Codex · 2026-10-29 UTC

Stage 1 - Receipt contract

Original estimate: 0.10

Retrospective stage work: 0.10

  • Changes: strict common codec/specification, explicit authority profiles and repeated label blocks. No old-format reader. Signed profile binds exact request/signature; source hash remains optional for signed requests, required for local actions, matching the existing signed target contract without inventing hashes.

  • Verification: php tests/run.php RemovalReceiptTest 2/2; malformed/duplicate fields, invalid dates, contradictory authority, duplicate label bindings and anonymous resolution covered. Whitespace checks pass.

  • Notes: S1/v2 unchanged; no writer switched yet. No dependencies. Initial runner did not discover the new suite until explicitly registered; final run passed.

— Codex · 2026-10-29 UTC

Stage 2 - Common interpretation

Original estimate: 0.15

Retrospective stage work: 0.15

  • Changes: common accepted-removal resolver replaces array-union precedence in label aggregation, import and rebuild; preserves signed attribution/evidence while combining compatible label bindings. Conflicting structure/source/label hashes throw explicit errors; local resolution cannot undo signed deletion.

  • Verification: php tests/run.php RemovalReceiptTest ReadModelPostRetractionsTest ReadModelThreadLabelsTest 13/13, including actual rebuild/content suppression and retained independent replies. Combination/conflict tests pass. Full new-format transition/retry matrix follows writer integration and Stage 7.

  • Notes: S2/v2 unchanged; no core table/index/query change, so no schema increment. Existing writers are switched in subsequent stages. Zero dependencies.

— Codex · 2026-10-29 UTC

Stage 3 - Operator deletion and repair

Original estimate: 0.15

Retrospective stage work: 0.15

  • Changes: local receipts now use the common codec and .txt paths; removed JSON decoding and Git-history acceptance reconstruction. Recovery journals explicitly identify the new format and validate before replay. Changed accepted label hashes and incompatible signed evidence are rejected before mutation.

  • Verification: read-model retraction suite 8/8; four actual CLI deletion/repair/failed-commit retry scenarios 4/4; new live-resolution → deletion test 1/1 verifies retained bindings, independent reply, readable receipt and rejection of an old unversioned journal without deleting the source.

  • Notes: S3/v2 unchanged. CLI source route assertions await Stage 5 registration; no release claim. Existing source-byte discovery for explicit repair remains separate from removed acceptance reconstruction. Zero dependencies.

— Codex · 2026-10-29 UTC

Stage 4 - Signed retraction

Original estimate: 0.10

Retrospective stage work: 0.10

  • Changes: signed receipt wrapper uses the shared codec exclusively, preserving exact detached request/signature and result paths; incompatible local evidence blocks signed mutation. No previous text format fallback remains.

  • Verification: receipt/acceptance/transaction suites 10/10, including actual GPG round trip and process-exit fault injection. Extended receipt suite 4/4 tests real signed/local files, unioned bindings, conflicting source hash and old-text rejection. Five actual signed API scenarios pass: account attribution, operator privilege recheck, author authorization/bad signature, canonical deletion/replay and refresh failure/retry.

  • Notes: S4/v2 unchanged. Logs /tmp/unified-signed-tests.log; no new dependency or UI. Archive registration for local receipts remains Stage 5.

— Codex · 2026-10-29 UTC

Stage 5 - Source and archives

Original estimate: 0.15

Retrospective stage work: 0.15

  • Changes: text local receipts registered in source/catalog/import and labeled in Activity; previous JSON paths are not canonical imports. Exact local acceptance remains required for imported duplicates.

  • Verification: archive/export/import planner/recovery run 27/27 unaffected checks passed; source test initially used the wrong historical route and failed, corrected to /source/blob/<commit>/... then passed with exact current/historical bytes and normal deletion retry. New actual ZIP export/unpack test passes readable receipt equality, local duplicate, empty-destination rejection and tamper rejection.

  • Notes: S5/v2 unchanged. /tmp/unified-source-tests.log retains initial 27/28 run; corrected source and added archive tests pass separately. No dependency delta.

— Codex · 2026-10-29 UTC

Stage 6 - Maintenance and recovery guidance

Original estimate: 0.10

Retrospective stage work: 0.10

  • Changes: maintenance cutoff uses validated deleting receipts, excluding resolution-only entries. Removed legacy migration implementation; removed migrate from help and return an explicit unsupported-format error for the old command. Updated retraction/shared receipt/schema/operator/CLI references and replaced obsolete migration assertions with old-format rejection checks.

  • Verification: parser/maintenance/sweep/acceptance suites 62/62; added resolution-only versus local-deletion artifact/exchange cleanup scenario 1/1. Actual CLI help lists preview/run/status; migrate exits 1 with clear no-migration guidance. New-action repeat cleanup remains idempotent.

  • Notes: S6/v2 unchanged. Internal recovery journals remain JSON machine state. No old files migrated/deleted; no dependencies. /tmp/unified-maintenance-tests.log.

— Codex · 2026-10-29 UTC

Stage 7 - Acceptance and closeout

Original estimate: 0.15

Retrospective stage work: 0.20

  • Changes: final browser fixture expects the shared header; strengthened actual live resolution → signed retraction → retry/export/rebuild flow, source-change rejection and operator commit-retry staging checks. F02 closed in the format audit; links/navigation and approval history reconciled.

  • Corrections: a source-change test initially omitted the final newline and hit canonical text validation; corrected the fixture, then verified the intended hash-conflict rejection. Stronger unrelated-staging assertion exposed an operator retry bug: a rejected commit leaves deleted paths absent from disk/index but present in HEAD. Retry now includes HEAD paths in its scoped commit, avoids re-adding already staged absent paths, and deletes both supported signature suffixes. The initial failing assertion remains in /tmp/unified-final-corrections.log; final recovery tests 4/4 and final normal-flow run 21/21 pass. This is required recovery correction, not added scope.

  • Verification: focused regression batch 122/122 (codecs, transactions with signed-path actual process-exit injection, canonical parsers, read models, import/export/recovery, high-traffic/absent snapshots and maintenance). Final 21/21 API/CLI checks after recovery correction cover author/operator/account authorization, deletion/repair, source exact bytes, actual ZIP and original-archive imports, same-post transitions, independent replies, failed commit/refresh/artifact/queue retries and actual v3 rebuild. Changed PHP lint 25/25, shell syntax, whitespace, local links and 16-item/13-open checklist counts pass. No full-suite claim.

  • Browser: actual Chromium author/operator/account/partial-retry flows and signature verification pass; raw source request/signature/receipt equality, independent conversation preservation, all 13 themes at phone/desktop widths and overflow pass. Separate keyboard activation, Escape/focus and touch checks pass. Inspected the raw receipt desktop screenshot and Word97 phone post screenshot. No UI copy/navigation changes.

  • Notes: S7/v2 preserved; retrospective increase reflects integration/recovery corrections and evidence. Zero dependency/manifest/lock/vendor delta. No core read-model schema/query changes. No production data deletion, migration, history purge, deployment, full-suite or physical-device verification.

— Codex · 2026-10-29 UTC

Study closeout and release limits

Seven planned/seven completed stages on feature/unified-removal-format; original scope v2/A/baseline/R1/P2 retained. Planning 5143ab6f; S1–S6 b62bea4e, a3e284d7, 477fe668, 2a3e9f56, a6f6fc50, 50cc5ed2; Stage 7 is this summary's commit. Debug handoff follows as its own log-only commit.

Original cycle projection: 0.70. Retrospective scope assessment: 0.75.

Single exposed Codex rater; no measured labor or independent rating. Original S1–S7/v2 0.10/0.15/0.15/0.10/0.15/0.10/0.15 retained; separate retrospectives 0.10/0.15/0.15/0.10/0.15/0.10/0.20. Earlier scope v1 scores/stages remain in approved plan history. Maintainer comfortable-fit and acceptance are pending; accepted-count unchanged. Merge, push and deployment not performed. Previous receipts and pending state are unsupported; new-format recovery is verified. This changes receipt representation and effective interpretation, not the separate signing/CLI entry points or later history-purge scope.

Temporary evidence: /tmp/unified-{regressions,final-flows,final-recovery,browser,menu,source-tests,maintenance-tests,signed-tests}.log and /tmp/retraction-browser-evidence/. Durable results and failure corrections are recorded above.

— Codex · 2026-10-29 UTC

Merge verification — 2026-10-29 UTC

User requested help merging. On entry, local main already contained the feature through 182ed3e1 and a pull of origin/main at 1e99e2dc was paused on one ledger conflict. Resolved the appended sections by preserving both complete cycle histories verbatim; application/test changes merged automatically. No additional application fixes or dependencies were required.

Combined-tree verification: 122/122 focused PHP regressions, 21/21 API/CLI flows, actual author/operator/account/partial-retry browser flows and all 13 themes at phone/desktop widths passed. All 25 incoming added/modified PHP files linted; staged whitespace checks passed. Logs: /tmp/unified-merge-regressions.log, /tmp/unified-merge-flows.log and /tmp/unified-merge-browser.log. No full-suite, physical-device or deployment claim. This commit completes the merge locally; no push was requested or performed. Study estimates/acceptance remain unchanged.

— Codex · 2026-10-29 UTC