Skip to content

fix(denkraum): enforce full startup config and physical state boundary - #750

Merged
mergify[bot] merged 2 commits into
mainfrom
cursor/dr-15b-start-integration
Oct 9, 2026
Merged

mergify[bot] merged 2 commits into
mainfrom
cursor/dr-15b-start-integration

Conversation

@Cuarroc

@Cuarroc Cuarroc commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Die Startprüfung berücksichtigt jetzt Windows-Kurznamen bei der Prüfung des Datenpfads.
Sie meldet Benachrichtigungen ohne Webhook-Adresse als ausgeschaltet und weist ungültige Adressen ohne Preisgabe ihres Werts zurück.
Die Linux-Prüfungen sind grün; der Windows-Nachweis und die unabhängigen Reviews stehen noch aus.

Report

DR-15b startup integration, including fix1 for R750-A1 and R750-A2. Parent: Z1, startup without manual secret input. Job: srv-pr750-fix1; operator: NACHBESSERN; owner: Codex implementation worker. Authority: the dispatched fix1 brief. Delivery: implemented, tested, pushed; review, acceptance and integration remain with the orchestrator.

  • Merge base: 85ab28626a3fbccf0a262afc64fb57383222fb8b.
  • Reviewed starting head: 35dd42620f68601cc2ffb33fc01edd0e2a0a3161, verified before changes.
  • Candidate: b43e87c3a5795c19fa3b6b766f847a6a88b36f6e, verified with git ls-remote.
  • Whole PR: 223 insertions + 37 deletions = 260 ALL, measured with git diff --numstat "$(git merge-base origin/main HEAD)" HEAD; four authorized files only. Fix1 changes three of those files (76 insertions + 9 deletions).

Changes

  • The original integration requires a valid root ID and secrets, applies lexical and physical STATE boundaries, and makes the server consume the full startup configuration. Explicit root-ID overrides pass through the same validation; invalid configuration prevents listening and prints fixed diagnostics.
  • A1: both repository resolution and the nearest-existing-ancestor walk now use realpathSync.native. Missing descendants continue walking; broken links and other resolution failures remain fail-closed. The new Windows test derives the actual 8.3 alias with cmd.exe and checks both long-root/short-STATE and short-root/long-STATE directions. It visibly skips on non-Windows hosts or when the fixture has no short alias.
  • A2: absent or empty DECISION_DESK_WEBHOOK_URL disables notifications with a fixed reason. Present URLs use the existing notifier rules: HTTPS, the AgentsRoom host, a valid trigger path, and no credentials, non-default port, query or fragment. Invalid URLs produce a startup error naming only the variable and a fixed reason. --check reports enabled status against the webhook variable. The existing server startup already calls this preflight, so no additional server source change was necessary in fix1.
  • Tests cover absent and valid URLs plus malformed URLs, protocol, host, port, credentials, query, fragment and path failures. Both CLI entries reject invalid URLs without exposing them. Existing success expectations now reflect disabled notifications when no URL is supplied.
  • No dependencies or architecture allowlist entries changed.

Findings

Source: supplied Anthropic review of 35dd426 and the fix1 disposition brief. This table records implementation disposition, not an independent approval of the new head.

ID Disposition
R750-A1 Accepted and implemented in b43e87c3a5795c19fa3b6b766f847a6a88b36f6e; Windows execution remains pending.
R750-A2 Accepted and implemented in b43e87c3a5795c19fa3b6b766f847a6a88b36f6e; Linux red-to-green evidence below.
R750-A3 Follow-up per fix1 brief; outside this correction.
R750-A4 Follow-up per fix1 brief; outside this correction.
R750-A5 Follow-up per fix1 brief; outside this correction.
R750-A6 Follow-up per fix1 brief; outside this correction.

Evidence (2026-10-08 UTC, Linux, Node v24.21.0)

Command Exit Observation
npm run dev:start-check 0 Initial observation: 12.5 GB free, no Cargo builds; before push: 11.6 GB free, one Cargo build. No current provider usage file was available.
node --test tools/denkraum/config.test.mjs tools/denkraum/server-gate.test.mjs before fix 1 24 passed, two new A2 tests failed, one Windows test skipped; tests loaded and ran successfully.
Same targeted command after fix 0 26 passed, zero failed, one Windows test skipped.
npm run test:denkraum 0 93 passed, zero failed, one skipped; hygiene: 26 files, zero findings. Repeated successfully by the hooks on the candidate.
bash scripts/ci/secret-scan.sh 0 Staged fix scanned before commit; no leaks.
git commit with regular precommit hook 0 All applicable precommit gates passed. Tests and fix committed together after observing RED; the precommit lane requires the Denkraum tests to pass.
bash scripts/ci/red-first.sh --plan 0 Eight exact named Test-First specifications at the candidate.
bash scripts/ci/red-first.sh 0 All eight specifications absent at the merge base and passing at the candidate. Existing dependencies reused as described below.
CARGO_BUILD_JOBS=2 bash scripts/ci/gates.sh lane prepush 0 Own worktree: all 22 gates passed, 160 seconds; assigned Cargo slot used.
CARGO_BUILD_JOBS=2 git push -u origin cursor/dr-15b-start-integration 0 Regular hook reran all 22 prepush gates on b43e87c, 102 seconds. Rust suite: 1,888 passed, seven skipped.
git ls-remote origin cursor/dr-15b-start-integration 0 Remote equals the candidate SHA above.
git diff --check 0 No whitespace errors.

The red-first script normally runs npm ci in its temporary base checkout. To honor the no-install instruction, a process-local npm function handled only that exact invocation by comparing both package.json and package-lock.json with the existing worktree and symlinking its existing node_modules; comparisons and linking had to succeed. Other npm commands were passed through. No gate or test implementation was changed or skipped, and no installation occurred.

New commit trailers:

Test-First: tools/denkraum/config.test.mjs::check reports notifications disabled without a webhook URL
Test-First: tools/denkraum/server-gate.test.mjs::webhook preflight matches notifier URL rules and redacts invalid URLs at both entries
No-Test: Windows-only 8.3 alias path; covered by Windows-only test config.test.mjs::STATE through Windows 8.3 repository aliases is rejected, skipped on Linux

Architecture drift

Gate passed without allowlist changes. Existing startup and notifier contracts retained.

NICHT ABGEDECKT

  • STATE through Windows 8.3 repository aliases is rejected was skipped on Linux with reason Windows-only 8.3 short-name resolution. No local Windows RED or GREEN is claimed. On Windows it also skips visibly when 8.3 aliases are disabled.
  • Windows execution needs explicit orchestration: scripts/ci/gates.sh:164 registers the Denkraum gate for precommit/prepush/branchpush/linux, but not windows. The existing merge-queue Windows lane alone therefore does not execute this new Node test. The orchestrator must arrange node --test tools/denkraum/config.test.mjs tools/denkraum/server-gate.test.mjs on Windows with 8.3 enabled; gate changes are outside the four-file authorization.
  • Linux does not compile or run #[cfg(windows)] tests or Windows clippy branches; that native Windows coverage belongs to the merge queue.
  • No real webhook delivery, live secret-manager injection, external service health or browser smoke was exercised. Frontend build and workflow gates belong to the Linux CI lane.
  • Physical validation remains a startup snapshot; concurrent filesystem changes after validation are not covered.
  • The local lage-jetzt mirror was unavailable; live Git and GitHub sources were checked. The harness identifies the worker as Codex, but exposes no exact served-model identifier/effort or current quota measurement; these are not claimed as observed.

Review and handover

Review: ausstehend (Stufe A).

No reviewer was started by this worker. The orchestrator owns independent review of the changed candidate, Windows proof, acceptance and queue admission. A3–A6 remain follow-up. Existing draft state is retained; no readiness, labels or merge action was taken.

Native goal evidence: initial get_goal returned null; create_goal returned active for the bounded fix1 handover; the post-push get_goal still returned active pending this report update. Parent Z1 acceptance is separate from worker delivery.

Root-Abnahme (09.10.2026, head b43e87c)

ID Source Severity Finding Disposition
R750-A1/A2 Anthropic d2 (claude-sonnet-5-5, server) medium/low physical state boundary (realpathSync.native, 8.3) FIXED in b43e87c; condition "Windows run" met: workflow_dispatch 37866786510 on b43e87c → gates (linux) success, gates (windows) success
R750-A3..A6 Anthropic r1 low outside fix1 Follow-up (unchanged)
R750-G1 GLM 5.2 (Zhipu, Ollama Cloud, local transport) medium config.test.mjs "physical STATE checks…" calls symlinkSync without the EPERM skip guard of its sibling test Follow-up: both CI lanes create symlinks successfully (Linux + Windows green above); guard to be added in the DR-SEC config follow-up that touches config.mjs/config.test.mjs after this merge
R750-G2 GLM 5.2 low validated webhook URL not returned in config; server re-reads env Follow-up (same DR-SEC config package)

Tier A: authors Cursor auto (r1, family unknown) + Codex gpt-6-astra (fix1, OpenAI). Reviewers: Anthropic (approve with conditions → met) and Zhipu/GLM 5.2 (approve with conditions → disposed as follow-up above, no runtime defect on our CI platforms). Bound to head b43e87c. GLM report: Root scratchpad review_pr750_glm-5.2.md (prompt sha256 in header).

Test-First: tools/denkraum/config.test.mjs::missing root agent id is a start error
Test-First: tools/denkraum/config.test.mjs::rejects root agent ids that the store cannot use
Test-First: tools/denkraum/config.test.mjs::STATE through a junction/symlink into the repository is rejected
Test-First: tools/denkraum/config.test.mjs::physical STATE checks resolve repository aliases and fail closed on broken links
Test-First: tools/denkraum/server-gate.test.mjs::the server entry refuses to start without token/webhook secret
Test-First: tools/denkraum/server-gate.test.mjs::the server entry validates ports and explicit root overrides through the full config
Use native realpath for both sides of the state boundary and derive notification status from the webhook URL. Reject invalid endpoints with fixed diagnostics before server startup.

Test-First: tools/denkraum/config.test.mjs::check reports notifications disabled without a webhook URL
Test-First: tools/denkraum/server-gate.test.mjs::webhook preflight matches notifier URL rules and redacts invalid URLs at both entries
No-Test: Windows-only 8.3 alias path; covered by Windows-only test config.test.mjs::STATE through Windows 8.3 repository aliases is rejected, skipped on Linux
@mergify

mergify Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 2 merge protections satisfied — ready to merge.

Show 2 satisfied protections

🟢 Paket-PR bringt seinen Bericht mit

Package branches (w<N>-, df<N>, ki-<N>, hq2-, dr-, z<N>-) must carry their report in the PR body, in a section that starts with "## Report".

  • body ~= (?m)^## Report

🟢 🚦 Auto-queue

When all merge protections are satisfied and these conditions match, this pull request will be queued automatically.

  • -conflict
  • -draft
  • base = main
  • check-success = gates (linux)
  • check-success = gates (windows)
  • check-success = red-first
  • label != do-not-merge
  • label = review-ok

@Cuarroc
Cuarroc marked this pull request as ready for review October 9, 2026 01:23
@Cuarroc Cuarroc added the review-ok Pipeline: review disposition complete, no open high finding label Oct 9, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 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-09T01:28:43.001273Z b43e87c 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b43e87c3a5

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +223 to +224
symlinkSync(repoRoot, alias, process.platform === "win32" ? "junction" : "dir");
symlinkSync(join(fixtureRoot, "missing"), broken, process.platform === "win32" ? "junction" : "dir");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle link-creation denial in the physical-path test

On Windows environments where creating junctions requires unavailable privileges, either symlinkSync call throws EPERM and aborts the entire test file instead of reporting this case as unsupported. The new junction test above already catches and skips on EPERM; apply the same handling here so restricted Windows runners can complete the remaining configuration tests.

Useful? React with 👍 / 👎.

Comment thread tools/denkraum/server.mjs
Comment on lines +132 to +133
const env = flag > 1 ? { ...process.env, DECISION_DESK_ROOT_AGENT_ID: process.argv[flag + 1] } : process.env;
const { config, errors } = loadStartConfig(env, { repoRoot: join(root, '..', '..') });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Detect aliased server entry paths before startup

When the server is launched through a symlink or Windows junction, Node canonicalizes import.meta.url while process.argv[1] retains the alias, so the surrounding entry-point comparison is false and this startup block never runs; the process exits successfully without validating configuration or listening. The config entry already resolves aliases through createRequire, and the server entry needs equivalent detection before executing this integrated startup path.

AGENTS.md reference: AGENTS.md:L40-L43

Useful? React with 👍 / 👎.

@mergify mergify Bot added the queued label Oct 9, 2026
@mergify
mergify Bot merged commit 86eeb68 into main Oct 9, 2026
21 checks passed
@mergify
mergify Bot deleted the cursor/dr-15b-start-integration branch October 9, 2026 01:52
@mergify

mergify Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 23 minutes 40 seconds in the queue, including 13 minutes 54 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
  • all of [🛡 Merge Protections rule Paket-PR bringt seinen Bericht mit]:
  • 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

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