Skip to content

feat(denkraum): split progress and patch plans onto the store (DR-04c-1) - #671

Merged
mergify[bot] merged 3 commits into
mainfrom
claude/dr-04c1-denkraum-progress
Oct 8, 2026
Merged

mergify[bot] merged 3 commits into
mainfrom
claude/dr-04c1-denkraum-progress

Conversation

@Cuarroc

@Cuarroc Cuarroc commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Der Denkraum kann jetzt auf dem neuen Speicherkern den Fortschritt einer Antwort (geprüft, geplant, umgesetzt) und Patchpläne festhalten, genauso wie im bisherigen Stand P1.
Ohne konfigurierte Root-Kennung lehnt er beides mit Fehler 503 ab; eine Bestätigung „umgesetzt“ mit Fortschrittsbeleg funktioniert jetzt, statt wie bisher mit 503 abgelehnt zu werden.
Ideen und Fragen folgen im nächsten Paket (DR-04c-2), danach Server und CLI (DR-06); zwei Fremdprüfungen und Roots Abnahme stehen noch aus.

Report

Package: DR-04c-1 (Z1), parent ticket 55ea21ce. Root decision 14:00Z via Orchestrator (msg-0muzlobgi): Option A. Compose the P1 ops that DR-06 needs before the server: putProgress/#progress, putPatch, putIdea and putQuestion from P1 592b309d lines 264–382 and 392–415, plus the store.mjs re-export.

What changed (2 new files, 203 ALL incl. the R671-O1 fix)

  • tools/denkraum/store/progress.mjs (99): class ProgressStore extends DeliveryStore with putProgress, private #progress, putPatch, moved from P1 lines 264–347.
    • diff of P1 264–347 against progress.mjs lines 12–95 shows exactly 5 hunks:
      • this.#change( → this.change( (2);
      • receiptFor(state, event) → receiptFor(state, event, this.rootAgentId) (2), because the DR-02 model takes the root id as an argument;
      • progress actor: rootAgentId (P1 constant) → actor: this.rootAgentId (D2).
    • New line 11: progressTransition(state, input) { return this.#progress(state, input); } binds the named DR-04a hook. A V2 ack with status:'applied' and a progress proof now runs the transition inside the ack's own change (P1 behaviour), instead of the 503 that DR-04a: answers, receipts and acks on the store core + C-3 root check #666 returned while no progress module existed.
  • tools/denkraum/store/progress.test.mjs (104): 5 tests, synthetic ids only.
    • Full path: the exact receipt is required, then incoming → reviewed → planned (patch plan required) → applied through ack + the hook with observed evidence. Replay returns the stored transition without a write; reuse with another payload gives 409. Root is the actor.
    • Refusals: no verifier 503; verifier false 403; illegal jump 409; stale revision 409; evidence before applied 400; a deferred answer cannot reach planned 409. Nothing is written.
    • Patches: a source without receipt 409; a defer source 409; a duplicate source 400; no verifier 503; verifier false 403; an unknown id 404; replay and conflicting reuse; a revision check 409; then revision 2. V1 ledger → 409 for both.
    • D2: progress and patch fail with 503 without a root id and write nothing.

Evidence

Step Command / site Result
RED on base 144f12f server worktree 13:59:55Z, test file only, node --test --test-name-pattern='progress and patches fail closed without a configured root agent id' tools/denkraum/store/progress.test.mjs Node exit 1, ERR_MODULE_NOT_FOUND for progress.mjs (new module, same red pattern as DR-03/04b); log sha256 e3879df18b800f19…
GREEN local node --test tools/denkraum/store/progress.test.mjs; npm run test:denkraum (Windows) exit 0, 4/4; exit 0, 56/56, hygiene 16 files 0 findings
D1 split = P1 behaviour (scratch, not committed) frozen P1 siblings (incl. unchanged progress.test.mjs, patches.test.mjs, store.test.mjs) + P1 ideas.test.mjs + this model/core/answers/delivery/progress + only P1 putIdea/migrate/putQuestion left in the shim as DeskStore extends ProgressStore with injected root id; node --test --test-concurrency=1 *.test.mjs exit 0, 101/101
Commit + hooks server, CARGO_TARGET_DIR=~/targets/slot5, CARGO_BUILD_JOBS=2, foreground ssh_exec e35500c precommit exit 0 (14:00:24–14:00:36Z)
prepush server bash scripts/ci/gates.sh lane prepush on e35500c exit 0, 14:00:53–14:02:45Z (foreground ssh_exec), 22 gates gruen, rust-suite nextest 1873 run / 1873 passed / 7 skipped; log sha256 6aa9bbf24e498004…
red-first server bash scripts/ci/red-first.sh exit 0; the new trailer is red/absent at merge base 7e3a7af and green at the head
push git push + git ls-remote 14:03:26Z PA_PREPUSH=light git push -u after the full prepush on the same head, exit 0; git ls-remote 14:04:13Z = e35500cea3fa6570fbe7d9a865c7883d1a4742b0; #669 branch unchanged at 144f12f
R669-O1 merge-forward server git merge --no-ff of dc34cae (#669), no rebase (Root order) merge d45d610 brings only delivery.mjs/delivery.test.mjs (+18/−3), no conflict, no change of this package's files; trailer No-Test (fix is red-first tested in dc34cae). prepush exit 0 14:30:26–14:32:10Z, nextest 1873 / 1873 passed / 7 skipped, log sha256 5e8680e1ea3bbdb9…; red-first exit 0; git ls-remote 14:33:10Z = d45d610c6f255a6a9e5c7b3999f4af96d399540e. D1 composition rerun with the fixed delivery.mjs: 101/101
R671-O1 fix commit server, 5d31ef5 precommit exit 0 (14:43:38Z); prepush exit 0 14:43:52–14:46:29Z, nextest 1873 / 1873 passed / 7 skipped, log sha256 0e5703731c797ef4…; red-first exit 0 (new trailer red at merge base, green at head); git ls-remote 14:47:59Z = 5d31ef56b8086fe84f8bc93d5caf7279dd744eac; local npm run test:denkraum 58/58

Limits (unchanged, not solved here)

  • Serialization per store instance only (R661-02). F-01 open; activeEvents is quadratic and also runs in every progress and patch call.
  • verifyProgressEvidence / verifyPatchAuthority are injected verifiers as in P1. Which verifier the server binds is DR-06 (P1 server binds async () => true behind the root receipt token).

Review

Tier A. OpenAI R1 on e35500c rejected (R671-O1). The fix is in 5d31ef5.
At head 5d31ef5:

  • OpenAI delta (gpt-6-astra, review-drdelta-openai-r2): R671-O1 FIXED and the red check is proven (exit 1 against the old progress.mjs); verdict approve.
  • Google R1 (Gemini 3.1 Pro, review-dr-google-r1-671-674-676): approve.

The inherited R669-O1 remainder is follow-up DR-04B-FU (PLAN #695) and does not block this PR. Root acceptance: 2026-10-08 17:06Z.

ID Source Severity Finding Disposition
R671-O1 OpenAI R1 medium progress.mjs:32 and :77: a replayed progress or patch request returned the stored result from a store without a root id, because the replay branch returned before receiptFor (:36/:86) checked the root. Accepted, fixed in 5d31ef5. A module helper requireRoot is now the first statement of #progress and of putPatch, before input validation and replay. #progress covers putProgress and the V2 applied ack hook. Test: progress.test.mjs::replayed progress and patch requests refuse a missing root agent id like new ones (R671-O1). Server RED 14:42:53Z on d45d610: exit 1, 4 pass / 1 fail ("Missing expected rejection: progress replay"), log sha256 3344b6d5a45cac5e….
R671-O1 siblings Root (same class as R669-O1) – Check the other public paths for success without a root id. 04a (#666): no defect. receipt and ack call #requireRoot before their replay branches (answers.mjs:53, :89). A V1 receipt answers 409 before the root check; that is a refusal, not success. 04b (#669): R669-O1, fixed in dc34cae. 04c-2 (#674): no defect. putIdea, putQuestion and answer never read receipts or attest the root. They are local saves as in P1 and stay usable without a root id; their automatic delivery fails closed in the store. Without a defect there is no red test.

NICHT ABGEDECKT

  • putIdea/putQuestion and the store.mjs re-export are DR-04c-2. The frozen P1 suites still run only in the scratch composition.
  • No HTTP/CLI (DR-06), no ENV default for the root id, no UI, no usability claim. F-01 and R661-02 stay open in the DR-03 parent acceptance.
  • Gate block of this run: Linux half only. The #[cfg(windows)] tests (run_in_pty, npm_shim, ConPTY, DPAPI) and the Windows arms of clippy are not covered. Browser smoke, frontend build and workflow gates run only in lane linux. External services are not checked by any gate. The Windows verdict comes from the merge queue.

🤖 Generated with Claude Code

Move putProgress/#progress and putPatch from the frozen P1 DeskStore
(lines 264-347) into tools/denkraum/store/progress.mjs as ProgressStore
extends DeliveryStore. Only three kinds of change: this.#change( to
this.change(, receiptFor(state, event) to receiptFor(state, event,
this.rootAgentId), and the progress actor taken from the injected root
agent id instead of the P1 constant (D2).

progressTransition now binds the DR-04a hook to #progress, so a V2
"applied" acknowledgement runs the transition inside its own change.
Without a configured root agent id, progress and patches fail closed
with 503. Idea and question operations follow in DR-04c-2.

Test-First: tools/denkraum/store/progress.test.mjs::progress and patches fail closed without a configured root agent id

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Cuarroc and others added 2 commits October 8, 2026 16:30
Brings dc34cae (V2 pending, inbox and delivery require the root id even
on an empty ledger) up the DR-04/DR-06 stack. Merge, no rebase, as
ordered by Root; no conflict, no code change of this package.

No-Test: merge commit only; the fix is red-first tested in dc34cae (delivery.test.mjs R669-O1)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…671-O1)

OpenAI R1 on #671 found that a replayed progress or patch request
returned the stored result from a store without a configured root agent
id: the replay branch returned before receiptFor() checked the root.

putProgress, the acknowledgement hook and putPatch are root-bound, so
the root id is now checked first, before input validation and replay.
Same class as R669-O1; the 04a receipt and ack paths already check the
root before their replay, and answer, ideas and question import are not
root-bound (local saves as in P1).

Test-First: tools/denkraum/store/progress.test.mjs::replayed progress and patch requests refuse a missing root agent id like new ones (R671-O1)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Base automatically changed from claude/dr-04b-denkraum-delivery to main October 8, 2026 16:35
@Cuarroc
Cuarroc marked this pull request as ready for review October 8, 2026 17:05
@Cuarroc Cuarroc added the review-ok Pipeline: review disposition complete, no open high finding label Oct 8, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T17:08:11.605462Z 5d31ef5 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mergify mergify Bot added the queued label Oct 8, 2026
@mergify
mergify Bot merged commit 32d70a7 into main Oct 8, 2026
8 checks passed
@mergify

mergify Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 31 minutes 2 seconds in the queue, including 12 minutes 26 seconds running CI.

Required conditions to merge
  • check-success = gates (linux)
  • check-success = gates (windows)
  • check-success = red-first
  • github-review-approved [🛡 GitHub repository ruleset rule main-pr-required-checks]
  • label != do-not-merge
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/gates (linux)
    • check-neutral = @github-actions/gates (linux)
    • check-skipped = @github-actions/gates (linux)
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/gates (windows)
    • check-neutral = @github-actions/gates (windows)
    • check-skipped = @github-actions/gates (windows)
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/red-first
    • check-neutral = @github-actions/red-first
    • check-skipped = @github-actions/red-first
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-neutral = @mergify/Mergify Merge Protections
    • check-skipped = @mergify/Mergify Merge Protections
    • check-success = @mergify/Mergify Merge Protections

@mergify
mergify Bot deleted the claude/dr-04c1-denkraum-progress branch October 8, 2026 17:43
@mergify mergify Bot removed the queued label Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-ok Pipeline: review disposition complete, no open high finding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant