Repository navigation
docs(adr): ADR-0028 amendments from the adversarial review + ADR-0022 erratum (phantom broadcast) - #123
Conversation
Still Proposed, so amended in place (ADR-0015 immutability binds only Accepted ADRs). Findings addressed: - The sync::broadcast shutdown channel does not exist yet (no broadcast anywhere in the workspace); the ADR now introduces it instead of consuming it, and points at the ADR-0022 erratum. - Cooperative per-connection shutdown specified: in-flight execs run until exit or the imminent deadline, the child is killed through the owned-Child path, and exec.finished is emitted — the ADR-0023 audit invariant holds on the shutdown path, with a drop-guard required for the abort and panic paths. - Blocking-pool coupling declared: up to four spawn_blocking tasks per exec exceed tokio's default 512 threads at the default cap; the runtime sizes max_blocking_threads from the configured cap. - Alternative 4 no longer claims deterministic caps give "the same protection" as the MaxStartups probabilistic band; the full-saturation lockout is stated as an accepted §8.3 consequence. - Admission-check order fixed (rate limit first, then the three caps; first failure names the reason) and connection.refused / connection.accepted declared mutually exclusive. - Second-signal (immediate abort) and exit-code semantics specified. Claude-Session: https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa Signed-off-by: Gonzalo Fleming <[email protected]>
…ever built ADR-0015 errata lane: at acceptance (#86 sweep) this ADR claimed the sync feature served a broadcast graceful-shutdown signal and that Phase 1's broadcast shutdown path was driven by tests. Neither was true — no broadcast exists in the workspace; sync serves the exec layer's mpsc channels. Banner added; both claims corrected in place. The shutdown broadcast is introduced by ADR-0028 (Phase 2). Claude-Session: https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa Signed-off-by: Gonzalo Fleming <[email protected]>
Review: PR #123 — ADR-0028 amendments + ADR-0022 erratumClassification: ADR/RFC docs under Verdict: Approved. No high-signal findings.ADR-0022 erratum — compliant with ADR-0015The erratum corrects two factual claims that were false at acceptance:
The fix is correctly scoped: the ADR-0028 amendments — sound under Proposed statusADR-0028 is Proposed (ADR-0015 immutability binds only Accepted ADRs), so in-place amendment is governance-correct. Seven findings addressed:
Cross-reference integrity
MANIFIESTO + threat model alignment
|
There was a problem hiding this comment.
Pull request overview
Updates Phase-2 runtime governance documentation by amending ADR-0028 (Proposed) based on adversarial review findings and adding a post-acceptance erratum to ADR-0022 (Accepted) to correct factual claims that were already false at acceptance.
Changes:
- Amend ADR-0028 to clarify admission-control evaluation order, shutdown semantics (including second-signal behavior), and operational constraints (blocking pool sizing, deterministic-cap trade-offs).
- Add a Post-acceptance errata banner to ADR-0022 correcting the
tokiosyncfeature rationale and removing the incorrect implication that Phase 1 had an existing shutdown broadcast path.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/adr/0028-phase-2-concurrent-connections-limits-graceful-shutdown.md | Clarifies Phase-2 concurrency admission checks, shutdown/drain/cooperative behavior, and operational sizing constraints. |
| docs/adr/0022-phase-1-async-runtime-tokio.md | Adds annotated errata correcting previously inaccurate statements about Tokio feature usage and shutdown. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
… exec.rs path Review feedback on #123: the state-mutating rate-limit check moves to last (a connection refused by a cap never grows the per-source map — the load-shedding order for the rotating-source flood the ADR discloses), the numbered list now carries all four checks, and the Links path is spelled crates/quantumssh-core/src/exec.rs. Claude-Session: https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa Signed-off-by: Gonzalo Fleming <[email protected]>
|
I've read CLAUDE.md, the threat model summary, ADR-0015 (errata governance), and the full diff. This is an ADR/RFC docs PR — review is for design soundness, not code bugs. Review: PR #123 — ADR-0028 amendments + ADR-0022 erratumClassification: ADR/RFC docs under Verdict: Approved. No high-signal findings.All prior review comments (Copilot's 3-items-vs-4 mismatch, Claude's phantom ADR-0022 erratum — compliant
ADR-0028 amendments — soundThe final admission-check ordering (caps-first → rate-limit-last) is correct: three non-mutating O(1)/O(map) reads before the state-mutating token-bucket check. A saturated global cap drops connections without touching per-source state. The parent sentence names the "load-shedding" rationale, making the ordering deliberate rather than accidental.
MANIFIESTO + threat model alignment
Cross-reference chainADR-0028 → ADR-0022 erratum → ADR-0015 is now a clean chain. The ADR-0028 |
Review: PR #123 — ADR-0028 amendments + ADR-0022 erratumClassification: ADR/RFC docs under Verdict: Approved. No high-signal findings. ADR-0022 erratum — compliant with ADR-0015The erratum banner carries date, PR reference, and description per ADR-0015. It corrects two factual claims that were false at acceptance: the ADR-0028 amendments — sound under Proposed statusADR-0028 is Proposed — ADR-0015 immutability binds only Accepted ADRs, so in-place amendment is governance-correct. Seven findings addressed, all internally consistent in the final state:
The admission-check ordering (caps-first → rate-limit-last) is load-shedding-correct: a saturated global cap drops connections without touching the per-source map, and the parent sentence now explicitly names the rationale. Cross-reference chainADR-0028 → ADR-0022 erratum → ADR-0015 is a clean chain. The ADR-0028 MANIFIESTO + threat model alignment
|
Review: PR #123 — ADR-0028 amendments + ADR-0022 erratumClassification: ADR docs under Verdict: Approved. No high-signal findings. ADR-0022 erratum — compliant with ADR-0015The erratum banner carries date, PR reference, and description per ADR-0015. It corrects two factual claims false at acceptance (the ADR-0028 amendments — sound under Proposed statusADR-0028 is Proposed — ADR-0015 immutability binds only Accepted ADRs, so in-place amendment is governance-correct. Seven findings addressed, all internally consistent:
The admission-check ordering (caps-first → rate-limit-last) is the load-shedding-correct structure: a saturated global cap drops connections without touching the per-source map. The parent sentence explicitly names this rationale, making the ordering read as deliberate. MANIFIESTO + threat model alignment
Cross-reference chainADR-0028 → ADR-0022 erratum → ADR-0015 is clean. ADR-0028 says "introduces" the broadcast (not "reuses existing"); ADR-0022's |
…ce (#126) The note's banner and workstream map predated RFC-0010's acceptance (#116) and ADR-0028 (#122, amended #123): the banner claimed no Phase-2 governance existed beyond RFC-0008, and the config/runtime rows still pointed at to-be-written lanes. Refresh both, and add the connection.refused event to the freeze checklist — ADR-0028 §Consequences names it a freeze item, but the checklist here never picked it up. Mutable-note lane per ADR-0027; nothing here decides anything. Claude-Session: https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa Signed-off-by: Gonzalo Fleming <[email protected]>
What
Two governance fixes from an adversarial review of ADR-0028 (merged in #122, Status Proposed):
Findings driving the amendments
sync::broadcastshutdown referenced as existing;grep broadcastover the workspace: zero hits (thesyncfeature serves the exec mpsc channels)exec.finished(async-path-only emission,channel.rs:535), breaking ADR-0023's every-exec.started-gets-an-exec.finishedinvariantspawn_blockingtasks per exec (pumps + reap,exec.rs) × default cap 256 = 1024 > tokio's default 512 blocking threads → starvation at loadmax_blocking_threads ≥ 4 × capreasonconnection.accepted/connection.refusedco-occurrence unspecified (0.1.0 schema-freeze relevant)Verified non-findings: workspace panic profile is
unwind(RAII guards andJoinErrorlogging hold),JoinSet/select!/signalavailable in the pinned tokio 1.51,accept()/join_next()cancel-safety.Refs #109, follows #122.
https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa