Skip to content

docs(adr): 0099 the daemon owns config.json while it runs, and the console edits settings through it (#1151) - #1989

Open
V3RON wants to merge 9 commits into
mainfrom
feature/1151-adr
Open

V3RON wants to merge 9 commits into
mainfrom
feature/1151-adr

Conversation

@V3RON

@V3RON V3RON commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

ADR 0099 for #1151, Accepted — not yet implemented. While a daemon runs it is the one writer of its config.json. GET and PATCH /v1/settings read and change settings, three keys apply live, secrets are write-only, and a key that names a program is changed on the machine only. daemon.restart goes through the updater.

It replaces the earlier draft ADR 0057 (#1152). This PR is the bottom of #1151's stack and merges with the feature's last task.

Status

Implement: fix done Review: fix-check at 5cb5620, passed Hardware: n/a Gate: waiting for the stack
Next: finish the PR body, then the stack
Ledger:

  • R1 (spec): fixed in 67bc374, no new evidence. R3 (spec): fixed in 67bc374, no new evidence. R2 (spec, safety-class credential exposure): fixed in 5cb5620. The fix has impact "claims" only. Verified by: coordinator. The probe read the source at 5cb5620. config.get is declared role: "admin" in src/contract/operations-admin.ts:170-174. Both handlers return the unredacted config when showSecrets === true: src/daemon/dispatcher-status.ts:128-129 (local) and src/gateway/dispatcher.ts:408-409 (gateway, remote sessions). The rewritten sentence says "to any admin caller, on the local socket or a remote admin session". That matches both handlers and ADR 0035:224, which says showSecrets answers admins. There are no other hunks in 67bc374..5cb5620.
    State: {"issue":1151,"branch":"feature/1151-adr","pr":1989,"stacked":true,"last":"ff11a386717e","done":"review","mode":"fix","audited":true,"adr":true,"assessment":"complete","rounds":["1:2136d6a05691a09d904e187ee50f9390779a9ad9","2:67bc37446e5a7855ab030a9aa2d331e496a2c6d6","fix-check:review:5cb5620d7"],"round":"fix-check","commit":"5cb5620d7","checkedBase":"d95c152c61740c62dea87a42a0156d31419211f1","reviewBase":"d95c152c61740c62dea87a42a0156d31419211f1","lenses":0,"findings":"/private/tmp/claude-501/-Users-szymon-chmal--t3-worktrees-pitlane-t3-877a43c3-5c93855b70c6e20e/31eb968d-c1b6-4a9f-aa40-6fe0ae349125/scratchpad/findings-1989.json"}

Review

Spec review: 3 blocking, 3 fixed, 0 notes. Code review: skipped. Claims review: skipped.
Rounds: 2. Tokens: 1.9M.
Runs: 7. Cost USD: 1.6706. Agent seconds: 430.

Assessment: complete

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: 4d018f17-aef8-417b-841f-2856edccc374
Commits

Reviewing files that changed from the base of the PR and between a93776b and c04ad14.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds ADR 0099, marked accepted but not yet implemented. It documents daemon-mediated settings reads and writes, validation and application rules, updater-mediated restarts, and console and gateway restrictions. The ADR index adds the new decision, and ADR 0003 references its narrower rule for config set while a daemon is running.

Suggested reviewers: leonardoxr

Merge Risk: Minimal · previous review 5cb56

This adds a design document and cross-references only. It changes no runtime behavior and is safe to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: ADR 0099 on the daemon owning config.json while it runs and the console editing settings through it. The docs(adr) prefix matches the changeset, which adds that ADR an…
Description check Passed The description is directly related to the changeset. It states that ADR 0099 is accepted but not yet implemented, and it summarizes the design: the daemon as sole config.json writer while running, GE…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: ADR 0099 on the daemon owning config.json while it runs and the console editing settings through it. The docs(adr) prefix matches the changeset, which adds that ADR and updates the ADR index and ADR 0003. The title is long (108 characters) but it is specific and accurate.

Full details: Description check

Explanation

The description is directly related to the changeset. It states that ADR 0099 is accepted but not yet implemented, and it summarizes the design: the daemon as sole config.json writer while running, GET and PATCH /v1/settings, three keys applied live, write-only secrets, program-naming keys changed locally, and daemon.restart through the updater. It also explains that the ADR replaces draft ADR 0057 and records the review fixes.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: f473a004-3932-4c68-b3c4-e7e1eaf55afb
Commits

Reviewing files that changed from the base of the PR and between d95c152 and 5cb5620.

Files selected for processing: 3

  • docs/internal/adr/0003-one-typed-daemon-contract-behind-every-frontend.md
  • docs/internal/adr/0099-the-daemon-owns-config-json-while-it-runs-and-the-console-edits-settings-through-it.md
  • docs/internal/adr/README.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@V3RON

V3RON commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 2136d6a
Round 2: 67bc374
Round fix-check: 5cb5620 review

Runs: 7. Cost USD: 1.6706. Agent seconds: 430.
Tokens input 95, output 25347, cache read 1164655, cache write 272108.
- review 1 reviewer: claude-sonnet-5-5 112 s $0.0946
- review 1 spec: claude-opus-5-5 63 s $0.7402
- fix 1 implementer: claude-sonnet-5-5 59 s $0.1278
- review 2 reviewer: claude-sonnet-5-5 96 s $0.0828
- review 2 spec: claude-opus-5-5 35 s $0.5003
- fix 2 implementer: claude-sonnet-5-5 37 s $0.0679
- review fix-check reviewer: claude-sonnet-5-5 28 s $0.057
Finding outcomes: {"fixed":3}. Classes: {"contradicts accepted ADR":1,"contradicts specification":1,"false statement":1}.
{"findings":[{"id":"R1","role":"spec","class":"contradicts accepted ADR","outcome":"fixed","path":"docs/internal/adr/0099-the-daemon-owns-config-json-while-it-runs-and-the-console-edits-settings-through-it.md:47","round":"1","fix":"67bc37446e5a7855ab030a9aa2d331e496a2c6d6"},{"id":"R2","role":"spec","class":"false statement","outcome":"fixed","path":"docs/internal/adr/0099-the-daemon-owns-config-json-while-it-runs-and-the-console-edits-settings-through-it.md:76","round":"1","fix":"5cb5620d736d74c0f3773e143b8a0862aa83ce79"},{"id":"R3","role":"spec","class":"contradicts specification","outcome":"fixed","path":"docs/internal/adr/0099-the-daemon-owns-config-json-while-it-runs-and-the-console-edits-settings-through-it.md:122","round":"1","fix":"67bc37446e5a7855ab030a9aa2d331e496a2c6d6"}]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review December 1, 2026 08:52
@V3RON
V3RON added this pull request to stack #2013 December 1, 2026 09:13

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant