Skip to content

docs(adr): accept 0069, a learned kind keeps one ready copy while its copies are leased (#1374) - #1378

Merged
V3RON merged 8 commits into
mainfrom
feature/1374-adr
Nov 7, 2026
Merged

V3RON merged 8 commits into
mainfrom
feature/1374-adr

Conversation

@V3RON

@V3RON V3RON commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

ADR 0069 for #1374, Accepted — not yet implemented. A learned warm kind keeps max(peak − leased, 1) copies ready, not ADR 0038 §2's "ready + leased + reclaiming ≥ peak". Since ADR 0061 a leased copy is destroyed on release, so counting it left no spare and the next lease booted (#1371). This applies to plain and baseline kinds; configured targets are unchanged. Nothing changes in the contract, config or events.

It narrows 0038 §2 and §3.

This PR is the bottom of #1374's stack and merges with the feature's last task.

Review

Spec review: 2 blocking, 2 fixed, 0 notes. Code review: skipped. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 2. Tokens: 4.3M.
Runs: 6. Cost USD: 1.4574. Agent seconds: 671.

Assessment: complete

Status

Review: round 2, passed Hardware: n/a Gate: waiting for the stack
Next: merge with #1387 at the top of the stack

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 6, 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: 9d5384ec-a18c-4a1e-9c34-cfb6b5adb646
Commits

Reviewing files that changed from the base of the PR and between 3321f23 and 8f6d51d.

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

Adds accepted ADR 0069, marked not yet implemented. It defines the learned-kind ready target as max(L − H, 1) and specifies how that target combines with configured ready counts. It also describes the rule’s effects on pool budgets and ready copies. The ADR index and ADR 0038 status now record the decision.

Suggested reviewers: leonardoxr

Merge Risk: Minimal · previous review 3321f

This records a future policy without changing runtime behavior. No merge-blocking risk was identified.

Architecture risk: Low · up to 3321f

The change affects 1 system.

Changed systems: docs

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — docs (service) was modified; 3 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in docs/internal/adr/0038-the-warm-pool-learns-its-kinds-from-leases-and-boots-for-every-queued-request.md: The status declaration now notes that §2, in addition to §3, was narrowed by ADR 0069.
  • observed — Modified behavior in docs/internal/adr/0069-a-learned-kind-keeps-one-ready-copy-while-its-copies-are-leased.md: Adds ADR metadata and scope: the decision narrows specified ADR 0038 rules while retaining its peak definition and ADR 0017’s configured-target count of ready devices.
  • observed — Modified behavior in docs/internal/adr/0069-a-learned-kind-keeps-one-ready-copy-while-its-copies-are-leased.md: Describes how ADR 0061’s destruction of each virtual device after one lease invalidates ADR 0038’s assumption that leased copies return ready. Records the resulting no-spare behavior for learned kinds and the observed baseline-kind delay.
  • observed — Modified behavior in docs/internal/adr/0069-a-learned-kind-keeps-one-ready-copy-while-its-copies-are-leased.md: Adds a flowchart showing the prior behavior: with peak 1 and one leased copy, the pool plans nothing, release destroys the copy, and the next lease must boot.
Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly identifies ADR 0069 and its proposed ready-copy rule.
Description check Passed The description matches the ADR changes and states that the rule is not yet implemented.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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: 35ae7194-2b14-474e-b4b2-a7ad03c6fb4d
Commits

Reviewing files that changed from the base of the PR and between ce61cf0 and 3321f23.

Files selected for processing: 1

  • docs/internal/adr/README.md

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

@V3RON V3RON changed the title docs(adr): propose 0069, a learned kind keeps one ready copy while its copies are leased (#1374) docs(adr): accept 0069, a learned kind keeps one ready copy while its copies are leased (#1374) Nov 6, 2026
@V3RON

V3RON commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Review findings, round 1 (67bb27c)

ADR-only PR, spec lens (Opus/high). Assessment: complete. Two blocking findings.

  • R1 (blocking): ADR 0069 line 41 does not say whether H counts leased copies of older baseline versions. The peak L counts every version (ADR 0062 §2), but the pool matches devices by sameSpec, which includes the version (src/core/domain.ts:108, src/core/warm-pool/converger.ts:262). After a new version, a held burst of L old copies would keep L spares, not one, so the line 78 cost claim is false for that case.
  • R2 (blocking): line 45, "H is never above L", is false. warm forget and the 33rd-kind drop delete lease rows while the leases are held (src/core/warm-pool/learned.ts:145-156, :199-214), so the relearned peak is 1 while H stays higher.

Rerun: round 2 after the fixes.

Written by an agent.

@V3RON

V3RON commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 67bb27c
Round 2: 3c6f1c4

Runs: 6. Cost USD: 1.4574. Agent seconds: 671.
Tokens input 95, output 26714, cache read 1527238, cache write 233632.
- review 1 reviewer: claude-sonnet-5-5 252 s $0.1989
- review 1 spec-reviewer spec: claude-opus-5-5 164 s $0.7495
- fix 1 implementer: claude-sonnet-5-5 56 s $0.081
- review 2 reviewer: claude-sonnet-5-5 122 s $0.1539
- review 2 spec: claude-opus-5-5 25 s $0.157
- review 2 claims: claude-sonnet-5-5 52 s $0.1171
Finding outcomes: {"duplicate":1,"fixed":2}. Classes: {"ADR leaves its own question undecided":1,"false consequence":1,"false statement in decision":1}.
{"findings":[{"id":"R1","role":"spec","class":"ADR leaves its own question undecided","outcome":"fixed","fix":"3c6f1c406","path":"docs/internal/adr/0069-a-learned-kind-keeps-one-ready-copy-while-its-copies-are-leased.md","round":"1"},{"id":"R2","role":"spec","class":"false statement in decision","outcome":"fixed","fix":"3c6f1c406","path":"docs/internal/adr/0069-a-learned-kind-keeps-one-ready-copy-while-its-copies-are-leased.md","round":"1"},{"id":"R3","role":"spec","class":"false consequence","outcome":"duplicate","canonicalId":"R1","path":"docs/internal/adr/0069-a-learned-kind-keeps-one-ready-copy-while-its-copies-are-leased.md","round":"1"}]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 6, 2026 12:59
@V3RON
V3RON merged commit 4de19a7 into main Nov 7, 2026
30 checks passed
@V3RON
V3RON deleted the feature/1374-adr branch November 7, 2026 08:39
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