Skip to content

B1 closure trio (post-T-014): business + security + performance baseline#16

Merged
cemililik merged 6 commits into
mainfrom
b1-closure-trio-2026-05-07
May 7, 2026
Merged

B1 closure trio (post-T-014): business + security + performance baseline#16
cemililik merged 6 commits into
mainfrom
b1-closure-trio-2026-05-07

Conversation

@cemililik
Copy link
Copy Markdown
Collaborator

@cemililik cemililik commented May 7, 2026

Summary

  • B1 truly closed 2026-05-07. T-014 promoted In Review → Done; fresh closure trio (business + consolidated security + performance baseline) replaces the 2026-04-28 trio's load-bearing role. The 2026-04-28 trio remains as historical record of what was believed at PR Development #10 — T-012 (B1 IRQ infrastructure) + B0 closure retros #10 merge.
  • Smoke-verified end-to-end. Full demo trace through `tyrne: all tasks complete` + `boot-to-end elapsed = ... ns` (~5.5–6.5 ms typical on QEMU virt Cortex-A72); `-d int,unimp,guest_errors` empty for the entire run; 152/152 host tests + 152/152 miri clean.
  • B2 prep reactivated. ADR-0027 (kernel virtual memory layout) drafting becomes the next implementation thread; design-first via `docs/architecture/memory-management.md` per T-008 / T-012 precedents.

What's in this PR

Test plan

  • Reviewer pulls and runs `cargo host-test` — expect 152/152.
  • Reviewer runs `cargo +nightly miri test` — expect 152/152.
  • Reviewer runs `./tools/run-qemu.sh` and confirms full demo trace through `tyrne: all tasks complete` + `boot-to-end elapsed = ... ns`.
  • Reviewer reads the 3 review artefacts in order (business → security → performance) for narrative coherence.

Out of scope (handed off to follow-up work)

  • δ: ADR-0023 placeholder file (Deferred status body); endpoint rollback / `ipc_cancel_recv` ADR before B2 lands first userspace destroy path.
  • B2 prep: ADR-0027 + memory-management.md (design-first).

🤖 Generated with Claude Code

Summary by Sourcery

Record final closure of B1 milestone after resolving idle-dispatch regression, and rebaseline business, security, and performance artefacts post-T-014.

Enhancements:

  • Update roadmap to mark B1 as closed, promote T-014 to Done, and activate B2 (kernel virtual memory layout) preparation as the next implementation thread.
  • Add new business, security, and performance review documents capturing the 2026-05-07 B1 closure trio and link them from roadmap and review indexes.
  • Document post-T-014 scheduler and idle-dispatch behaviour, audit-log amendments, and unsafe-audit status, including new verification notes from QEMU smoke runs.

Documentation:

  • Introduce detailed B1 closure business retrospective, security review, and performance baseline describing the T-014 idle-dispatch fix, verification results, and lessons learned.
  • Refresh roadmap, phase-B plan, task listings, and review READMEs to reflect B1’s true closure date, updated test counts, and the transition to B2 MMU work.

Summary by CodeRabbit

Release Notes

  • Documentation

    • Enhanced ADR writing guidelines with simulation requirements for complex decisions
    • Added comprehensive B1 closure documentation including security, performance, and business reviews
    • Updated roadmap and milestone tracking with verified closure metrics
  • Chores

    • Task T-014 (idle-dispatch fallback) marked complete with verified test results
    • Documented T-015 preparation task for next phase
    • Updated acceptance criteria for milestone closures with verification evidence requirements

…2 prep activated

Closes B1 — Drop to EL1 + exception infrastructure. The fresh
closure trio replaces the 2026-04-28 trio's load-bearing role:
that trio approved B1 implementation-complete based on host-test
+ miri + paper-review evidence; the maintainer-side QEMU smoke
(still `Pending QEMU smoke verification` on UNSAFE-2026-0019/0020/0021
at the time) had not run. When the maintainer ran it on 2026-05-06,
the smoke surfaced an idle-dispatch regression. T-014 fixed the
regression; the comprehensive multi-agent code review (also
2026-05-06) generated α/β/γ doc-polish PRs; today's trio records
what B1 actually is once smoke-verified end-to-end.

## Three new review artefacts

- docs/analysis/reviews/business-reviews/2026-05-07-B1-closure.md
  — Period 2026-04-28 → 2026-05-07. What landed (T-014 + ADR-0026 +
  PRs #12 / #13 / #14 / #15); what changed in the plan (B1
  reopen → T-014 fix → fresh closure; B2 prep reactivated; ADR-0026
  repurposed); what we learned (smoke is the project's only end-to-
  end liveness oracle; ADR analysis must simulate, not just argue;
  comprehensive review's blind spot was "did you actually run the
  program?"; bot-driven review-rounds are productive when findings
  are factual-mechanical, less so when stylistic). Adjustments
  include "no closure-trio without recorded smoke", write-adr
  skill simulation-table check, comprehensive-review Track K — Live
  execution.

- docs/analysis/reviews/security-reviews/2026-05-07-B1-closure.md
  — Eight axes, all OK. ADR-0026 / T-014 introduce no new attack
  surface, capability widening, memory-safety hazard, or threat-
  model shift. UNSAFE-2026-0014 third Amendment for register_idle;
  UNSAFE-2026-0019/0020 partial-verification + post-T-014 smoke
  Amendments; UNSAFE-2026-0021 no-verification Amendment. Eight
  inherited forward-flagged items unchanged at original severity.
  Verdict: Approve.

- docs/analysis/reviews/performance-optimization-reviews/2026-05-07-B1-closure.md
  — Re-baseline. Net footprint-neutral vs 2026-04-28: .text 21,792
  bytes (-116), .rodata 2,928 (+144), .bss 22,256 (+8). The +144
  .rodata is panic-message clarity strings; the +8 .bss is
  idle: Option<TaskHandle>. Smoke 5.5–6.5 ms boot-to-end, zero
  events. 11 P-numbered proposals from Track D remain queued (P3
  partially landed by γ; P1 / P10 / P4 highest-ROI near-term). No
  proposals to merge this cycle. Verdict: Merge.

## Status flips + index updates

- T-014 In Review → Done. T-014 user-story file's review-history
  gains row 4 recording the maintainer's independent verification
  and the closure trio's landing.
- docs/analysis/tasks/phase-b/README.md — T-014 row to Done.
- docs/roadmap/phases/phase-b.md — sub-breakdown item 7 (T-014)
  flipped to Done; B1 status block rewritten ("B1 closed 2026-05-07")
  with citations to the three new review artefacts.
- docs/roadmap/current.md — top callout rewritten to record B1
  truly closed (2026-05-07); active phase remains B; active
  milestone advances to B2 (MMU activation); active task
  cleared (B2 prep / ADR-0027 drafting opens next per ADR-0025
  §Rule 1); audit status footnote gains the 2026-05-07 update.
- The three review-folder README index tables (business / security /
  performance) gain 2026-05-07-B1-closure rows.

## Verification recap

- cargo fmt --check, cargo host-clippy -D warnings, cargo
  kernel-clippy -D warnings, cargo kernel-build — all clean.
- cargo host-test 25 + 93 + 34 = 152/152.
- cargo +nightly miri test 152/152 clean.
- QEMU smoke at HEAD e9fa019 reproduces the full demo trace + the
  boot-to-end elapsed = ... line; -d int,unimp,guest_errors
  empty for the entire ~5.8 ms run.

## What stays open for δ + B2 prep

- δ — write ADR-0023 placeholder file with Status: Deferred body
  (the README index gained the row in α; the file body is δ's job).
- δ — endpoint rollback / ipc_cancel_recv ADR before B2 lands the
  first userspace destroy path (Track A non-blocker; SchedError::Deadlock
  rollback leaves endpoint in RecvWaiting).
- B2 prep — ADR-0027 (kernel virtual memory layout) drafting +
  docs/architecture/memory-management.md design-first. The ADR's
  Dependency chain opens T-015 in the same commit per ADR-0025
  §Rule 1.

Refs: ADR-0026, ADR-0022, ADR-0025, T-014, B1 closure trio
Audit: UNSAFE-2026-0014, UNSAFE-2026-0019, UNSAFE-2026-0020, UNSAFE-2026-0021

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@qodo-code-review
Copy link
Copy Markdown

ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 7, 2026

Reviewer's Guide

Marks B1 milestone as truly closed after T-014 by updating roadmap/status docs and adding a fresh business/security/performance closure trio, while documenting the T-014 idle-dispatch refactor’s effects on tests, unsafe-audit status, and future B2/ADR-0027 work.

Sequence diagram for B1 closure verification and documentation workflow (sequence)

sequenceDiagram
  actor Maintainer
  participant HostTests as Host_test_suite
  participant Miri as Miri_runner
  participant Qemu as Qemu_smoke
  participant UnsafeLog as Unsafe_audit_log
  participant Roadmap as Roadmap_docs
  participant Reviews as Closure_trio_docs
  participant Tasks as Task_T014_doc

  Maintainer->>HostTests: run cargo host-test
  HostTests-->>Maintainer: 152/152 tests pass

  Maintainer->>Miri: run cargo +nightly miri test
  Miri-->>Maintainer: 152/152 tests pass

  Maintainer->>Qemu: run ./tools/run-qemu.sh
  Qemu-->>Maintainer: full demo trace\n"tyrne: all tasks complete"\n"boot-to-end elapsed = ... ns"\n-d int,unimp,guest_errors empty

  Maintainer->>UnsafeLog: append Amendments for\nUNSAFE-2026-0014/0019/0020/0021
  UnsafeLog-->>Maintainer: audit status updated

  Maintainer->>Tasks: flip T-014 status\nIn Review -> Done
  Tasks-->>Maintainer: T-014 documented as Done

  Maintainer->>Roadmap: update current.md and phase-b.md\nB1 status -> closed 2026-05-07\nActive milestone -> B2
  Roadmap-->>Maintainer: roadmap reflects B1 closure

  Maintainer->>Reviews: add 2026-05-07 B1 closure\nBusiness review
  Maintainer->>Reviews: add 2026-05-07 B1 closure\nSecurity review
  Maintainer->>Reviews: add 2026-05-07 B1 closure\nPerformance baseline
  Reviews-->>Maintainer: closure trio published

  Maintainer->>Roadmap: update next task / review trigger\nB2 prep (ADR-0027) now active
  Roadmap-->>Maintainer: roadmap points to B2 prep
Loading

Flow diagram for B1 lifecycle and transition to B2 (flow)

flowchart TD
  A_B0["B0 milestone closed\n2026-04-27 (PR #9)"]
  B_B1_impl_claim["B1 implementation marked complete\n2026-04-28 (PR #10; T-012 + T-013)"]
  C_Pending_smoke["UNSAFE-2019/20/21 carry\nPending QEMU smoke verification"]
  D_Smoke_regression["2026-05-06: maintainer runs QEMU smoke\nIdle-dispatch regression discovered"]
  E_B1_reopened["B1 milestone reopened\nper smoke-regression mini-retro"]
  F_ADR0026["ADR-0026 Accepted\nIdle dispatch via separate fallback slot"]
  G_T014_impl["T-014 implemented\nScheduler::idle + register_idle"]
  H_T014_in_review["T-014 In Review\nVerification green"]
  I_T014_done["2026-05-07: T-014 Done\nMaintainer smoke re-run matches"]
  J_B1_true_closed["B1 milestone truly closed\n2026-05-07"]
  K_Closure_trio["2026-05-07 closure trio landed\nBusiness + Security + Performance"]
  L_B2_prep_active["B2 prep reactivated\nADR-0027 (kernel virtual memory layout)"]

  A_B0 --> B_B1_impl_claim
  B_B1_impl_claim --> C_Pending_smoke
  C_Pending_smoke --> D_Smoke_regression
  D_Smoke_regression --> E_B1_reopened
  E_B1_reopened --> F_ADR0026
  F_ADR0026 --> G_T014_impl
  G_T014_impl --> H_T014_in_review
  H_T014_in_review --> I_T014_done
  I_T014_done --> J_B1_true_closed
  J_B1_true_closed --> K_Closure_trio
  K_Closure_trio --> L_B2_prep_active
Loading

Flow diagram for B1 closure trio documentation relationships (flow)

flowchart TD
  subgraph StatusDocs["Roadmap and task status docs"]
    A_current["docs/roadmap/current.md\nB1 closed 2026-05-07"]
    B_phaseB["docs/roadmap/phases/phase-b.md\nStatus: B1 closed"]
    C_T014["docs/analysis/tasks/phase-b/T-014-idle-dispatch-fallback.md\nStatus: Done"]
    D_TaskIndex["docs/analysis/tasks/phase-b/README.md\nT-014 row: Done"]
  end

  subgraph ClosureTrio["B1 closure trio (2026-05-07)"]
    E_Biz["Business review\n2026-05-07-B1-closure.md"]
    F_Sec["Security review\n2026-05-07-B1-closure.md"]
    G_Perf["Performance baseline\n2026-05-07-B1-closure.md"]
  end

  subgraph ReviewIndexes["Review index READMEs"]
    H_BizIndex["business-reviews/README.md\nadds 2026-05-07 row"]
    I_SecIndex["security-reviews/README.md\nadds 2026-05-07 row"]
    J_PerfIndex["performance-optimization-reviews/README.md\nadds 2026-05-07 row"]
  end

  K_OldTrio["2026-04-28 B1 closure trio\nmarked historical only"]

  A_current --> ClosureTrio
  B_phaseB --> ClosureTrio
  C_T014 --> ClosureTrio
  D_TaskIndex --> ClosureTrio

  E_Biz --> H_BizIndex
  F_Sec --> I_SecIndex
  G_Perf --> J_PerfIndex

  K_OldTrio --> E_Biz
  K_OldTrio --> F_Sec
  K_OldTrio --> G_Perf

  H_BizIndex --> A_current
  I_SecIndex --> A_current
  J_PerfIndex --> A_current
Loading

File-Level Changes

Change Details Files
Update high-level roadmap to reflect B1 closure, reactivation of B2 prep, and new review artefacts.
  • Replace 2026-05-06 'B1 implementation reopened' callout with 2026-05-07 'B1 truly closed' callout including smoke/test results and B2 prep activation.
  • Rewrite active phase/milestone/task/review sections to mark B1 closed, B2 as active milestone, no tasks in review/in progress, and to list the 2026-05-07 closure trio as latest reviews.
  • Update 'last completed milestone/tasks' text with post-T-014 metrics (152 tests, image size deltas, ADR-0026 superseding ADR-0022, unsafe-log amendments, review follow-ups) and mark 2026-04-28 trio as historical.
  • Adjust 'next task/review trigger' and ADR-0026 entry to describe ADR-0027 design-first B2 prep and future MMU work, plus audit-log verification conditions.
  • Extend unsafe-audit notes with 2026-05-07 amendments for register_idle and post-T-014 smoke, clarifying remaining pending-IRQ verification.
docs/roadmap/current.md
Clarify Phase B B1 section to show T-014 as Done and B1 milestone closure, and to set B2 prep as the next thread.
  • Mark T-014 entry in the B1 fix arc as Done 2026-05-07, including verification details, unsafe-log amendments, and promotion conditions.
  • Replace the old 'B1 implementation reopened' status text with a new 'B1 closed 2026-05-07' status paragraph that links the closure trio and clarifies remaining unsafe-log pending notes and B2 prep activation.
docs/roadmap/phases/phase-b.md
Mark task T-014 as Done and record its closure history.
  • Flip T-014 status from In Review to Done in the task metadata.
  • Add a new history row describing the 2026-05-07 maintainer verification, smoke run, and closure trio landing.
  • Update the phase-b tasks README row for T-014 to show status Done with the new date.
docs/analysis/tasks/phase-b/T-014-idle-dispatch-fallback.md
docs/analysis/tasks/phase-b/README.md
Add and index the new B1 closure business/security/performance review documents for 2026-05-07.
  • Append a 2026-05-07 B1 closure row to the business reviews README describing the post-T-014 closure trio and referencing α/β/γ follow-ups.
  • Append a 2026-05-07 re-baseline row to the performance reviews README summarizing footprint deltas and smoke timing.
  • Append a 2026-05-07 consolidated security review row to the security reviews README describing ADR-0026/T-014 impacts and unsafe-log amendments.
  • Add full business retrospective doc covering the B1 reopen → T-014 → comprehensive review → α/β/γ arc, with lessons and adjustments.
  • Add full performance baseline doc quantifying .text/.rodata/.bss deltas, boot-to-end timing, and regression checks.
  • Add full security review doc performing an eight-axis pass over ADR-0026/T-014 and documenting verdict and forward flags.
docs/analysis/reviews/business-reviews/README.md
docs/analysis/reviews/performance-optimization-reviews/README.md
docs/analysis/reviews/security-reviews/README.md
docs/analysis/reviews/business-reviews/2026-05-07-B1-closure.md
docs/analysis/reviews/performance-optimization-reviews/2026-05-07-B1-closure.md
docs/analysis/reviews/security-reviews/2026-05-07-B1-closure.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 79ffb447-b1ce-48b4-b37c-ca2241a1da10

📥 Commits

Reviewing files that changed from the base of the PR and between e9fa019 and 74a40c3.

📒 Files selected for processing (18)
  • .claude/skills/write-adr/SKILL.md
  • docs/analysis/reviews/business-reviews/2026-05-07-B1-closure.md
  • docs/analysis/reviews/business-reviews/README.md
  • docs/analysis/reviews/business-reviews/master-plan.md
  • docs/analysis/reviews/performance-optimization-reviews/2026-05-07-B1-closure.md
  • docs/analysis/reviews/performance-optimization-reviews/README.md
  • docs/analysis/reviews/security-reviews/2026-05-07-B1-closure.md
  • docs/analysis/reviews/security-reviews/README.md
  • docs/analysis/tasks/phase-b/README.md
  • docs/analysis/tasks/phase-b/T-014-idle-dispatch-fallback.md
  • docs/analysis/tasks/phase-b/T-015-endpoint-rollback-cancel-recv.md
  • docs/decisions/0023-cross-table-capability-revocation-policy.md
  • docs/decisions/0032-endpoint-rollback-and-cancel-recv.md
  • docs/decisions/README.md
  • docs/decisions/template.md
  • docs/glossary.md
  • docs/roadmap/current.md
  • docs/roadmap/phases/phase-b.md

📝 Walkthrough

Walkthrough

This PR adds comprehensive B1 milestone closure documentation, establishes mandatory ADR simulation requirements in the template and skill, defers cross-table capability revocation policy as ADR-0023, introduces endpoint-state rollback decision ADR-0032 with implementation task T-015, and updates status across roadmaps, task indexes, and business/security reviews. All changes are documentation-only with no code modifications.

Changes

ADR Governance & Template Updates

Layer / File(s) Summary
ADR Template & Skill Guidance
docs/decisions/template.md, .claude/skills/write-adr/SKILL.md
ADR template now requires a 3–5 row worst-case interaction simulation table for multi-step state-machine decisions; write-adr skill acceptance criteria aligned to enforce this requirement.
Deferred Cross-Table Capability Revocation (ADR-0023)
docs/decisions/0023-cross-table-capability-revocation-policy.md
ADR-0023 established as deferred placeholder reserving the slot for future cross-table capability derivation tree policy. Documents v1 per-table-only behavior, specifies reopening triggers, enumerates solution options A–D, and defines expected simulation discipline.
ADR Index & Glossary Alignment
docs/decisions/README.md, docs/glossary.md
ADR index updated: ADR-0023 added as "Deferred"; numbering and ledger spacing reconciled around entries 0020–0026. Glossary CDT entry updated to reference deferred placeholder status.

New Decisions & Implementation Tasks

Layer / File(s) Summary
ADR-0032: Endpoint State Rollback Fix
docs/decisions/0032-endpoint-rollback-and-cancel-recv.md, docs/decisions/README.md
New ADR-0032 proposes fixing asymmetry in ipc_recv_and_yield's Deadlock path where scheduler state is rolled back but endpoint remains in RecvWaiting. Solution (Option A) adds internal ipc_cancel_recv primitive called before returning Deadlock error. Includes step-by-step simulation table and dependency chain. Index entry added as "Proposed" (2026-05-07).
Task T-015: Implementation Plan
docs/analysis/tasks/phase-b/T-015-endpoint-rollback-cancel-recv.md
New task T-015 (B2 prep, Draft) defines acceptance criteria for ADR-0032 implementation: ipc_cancel_recv signature/semantics, Deadlock branch wiring, doc-comment updates, architecture note, ADR-0017 revision-notes rider, and two host tests.
Task T-014: Completion & Verification
docs/analysis/tasks/phase-b/T-014-idle-dispatch-fallback.md, docs/analysis/tasks/phase-b/README.md
T-014 status transitions from "In Review" (2026-05-06) to "Done" (2026-05-07). Review history entry documents independent QEMU smoke verification, clean host-test/miri/clippy/build/fmt results, and closure trio linkage.

B1 Milestone Closure & Roadmap Status

Layer / File(s) Summary
Business Review Retrospective
docs/analysis/reviews/business-reviews/2026-05-07-B1-closure.md
B1 closure retrospective documents "What landed" (T-014, ADR-0026 acceptance, ADR-0022 supersession, PRs #12#15), audit-log amendments, test counts, and 2026-05-06 comprehensive multi-agent review outcomes. Multiple "What we learned" sections emphasize QEMU smoke as end-to-end liveness oracle, ADR simulation discipline gaps, and review execution failures. Adjustments checklist includes smoke gating, extended write-adr simulation, and Track K addition.
Business Review Index
docs/analysis/reviews/business-reviews/README.md
Index table extended with new entry for 2026-05-07 B1 closure retrospective, pointing to closure artifact and describing T-014/ADR-0026 context.
Security Review & Closure Assessment
docs/analysis/reviews/security-reviews/2026-05-07-B1-closure.md
B1 security review performs eight-axis assessment: capability correctness, trust boundaries, memory safety (including UNSAFE audit cross-references), kernel-mode discipline, cryptography (N/A), secrets/logging, dependencies (zero-extern confirmed), and threat-model impact (no new claims). Records smoke/Miri verification and concludes with "Approve" verdict.
Security Review Index
docs/analysis/reviews/security-reviews/README.md
Index table extended with new entry for 2026-05-07, describing consolidated post-T-014 B1 closure security pass with approval verdict.
Performance Re-Baseline
docs/analysis/reviews/performance-optimization-reviews/2026-05-07-B1-closure.md, docs/analysis/reviews/performance-optimization-reviews/README.md
Performance baseline documents methodology and single-run metrics: kernel ELF section deltas (.text, .rodata, .bss) versus 2026-04-28 baseline, source LOC, test counts, boot-to-end timing from smoke, no new hotspot, and regression-check results. Index entry added; note unblocks first hypothesis-driven cycle via T-009/T-012 measurement primitives.
Master Plan: Smoke Evidence Gating
docs/analysis/reviews/business-reviews/master-plan.md
New acceptance criterion requires QEMU smoke-trace evidence in "What landed" for milestone-completion and phase-closure triggers. Codifies explicit gating: milestones cannot move from In Review to Done without recorded smoke evidence.
Roadmap & Task Status Advancement
docs/roadmap/current.md, docs/roadmap/phases/phase-b.md, docs/analysis/tasks/phase-b/README.md
Current roadmap updated: B1 truly closed 2026-05-07 (replacing prior "implementation reopened" state), B2 set as next active milestone (ADR-0027 drafting), unsafe audit amendments recorded. Phase-B README updated with T-014 Done and T-015 Draft entries. Phase-B roadmap expanded with B1 closure metrics, B2–B6 future milestones, ADR-0032 as B2-prep proposed item, and complete idle-dispatch regression narrative.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • cemililik/Tyrne#13: Modifies the ADR template concurrently with this PR's simulation subsection addition.
  • cemililik/Tyrne#8: Extends ADR guidance (Dependency chain) alongside this PR's Simulation subsection updates.
  • cemililik/Tyrne#9: Updates ADR template and write-adr skill guidance, overlapping with simulation subsection changes in this PR.

Poem

🐰 Smoke hath spoken, truth refined,
B1 closes, bright and kind.
ADR tables dance in rows,
where each decision's logic flows.
From idle slots to rollback dreams,
the kernel's heartbeat thrums and schemes!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch b1-closure-trio-2026-05-07

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • You now repeat fairly detailed B1 closure metadata (dates, commit hashes, test counts, smoke description) across current.md, phase-b.md, the T-014 task file, and the three closure reviews; consider centralizing these canonical numbers in a single source (or a small include-style snippet) and referencing them to reduce the risk of future drift.
  • The new process rules you articulate in the business review (e.g., 'no closure-trio without recorded smoke', ADR simulation tables) are only captured narratively; it might be worth promoting them immediately into the relevant standards/skills files as normative checklists so that future work doesn’t rely on readers extracting them from a long retrospective.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- You now repeat fairly detailed B1 closure metadata (dates, commit hashes, test counts, smoke description) across `current.md`, `phase-b.md`, the T-014 task file, and the three closure reviews; consider centralizing these canonical numbers in a single source (or a small include-style snippet) and referencing them to reduce the risk of future drift.
- The new process rules you articulate in the business review (e.g., 'no closure-trio without recorded smoke', ADR simulation tables) are only captured narratively; it might be worth promoting them immediately into the relevant standards/skills files as normative checklists so that future work doesn’t rely on readers extracting them from a long retrospective.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

cemililik and others added 3 commits May 7, 2026 14:31
…on table" rules

Promote the two process learnings the 2026-05-07 B1 closure
retrospective identified into normative checklists at the standards /
skills layer, so future work doesn't rely on readers extracting them
from a long retrospective.

## Closure-trio acceptance: smoke trace required

`docs/analysis/reviews/business-reviews/master-plan.md` §Acceptance
criteria gains a new rule: for milestone-completion and phase-closure
triggers only, the *What landed* section must include a verbatim copy
of the most recent QEMU smoke trace + an `-d int,unimp,guest_errors`
event count. A milestone cannot promote past `In Review` to `Done`
without this evidence; *narrative* claims of smoke-pass are
insufficient. Codified after the 2026-05-06 B1 smoke-regression
mini-retro and the 2026-05-07 B1 closure retro §"What we learned"
demonstrated that 152 host tests + 152 miri tests + paper-review
approval can pass a kernel that hangs at runtime; the smoke is the
project's only end-to-end liveness oracle.

Maintainer-initiated mini-retros and adhoc reviews are exempt (no
closure semantics).

## ADR Simulation section for state-machine ADRs

`docs/decisions/template.md` and `.claude/skills/write-adr/SKILL.md`
gain a new *Simulation* sub-section under *Decision outcome* + an
acceptance-criterion bullet. For multi-step state-machine ADRs
(capability flows, IPC handshakes, scheduler dispatch, exception
entry, MMU/TLB transitions, syscall ABI handshakes), the body must
include a 3-5 row table walking the worst-case interaction through
the proposed shape — `(state-pre, action, state-post, switch target /
observable effect)`. For non-state-machine subjects (process,
governance, dependency policy, single-decision shape), the section is
omitted with a one-line "Not applicable" note.

Codified after ADR-0026's table caught what ADR-0022's prose-only
reasoning had missed; the 2026-05-07 B1 closure retro §"What we
learned" is the source. The discipline is what would have surfaced
the demo's three-task moment (B unblocked + A yielding + idle in
FIFO) before ADR-0022 Accepted, instead of the kernel hang surfacing
it 14 days later.

Refs: 2026-05-07 B1 closure retrospective, ADR-0022, ADR-0026,
sourcery-ai PR #16 review feedback (process-rules-into-checklists)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…e-b.md trim

Address sourcery-ai PR #16 review feedback: B1 closure metadata
(test counts, ELF section sizes, smoke trace, audit Amendments)
appears across current.md, phase-b.md, T-014 review-history, and
the three closure reviews; centralize the source of truth in the
closure trio and trim the most verbose downstream restatement.

## Closure-trio canonical-source callouts (3 files)

Each of the three 2026-05-07 closure reviews (business / security /
performance) gains a callout at the top of its body explicitly
naming the trio as the source of truth for B1's closing metrics.
Other locations referencing B1 metrics (current.md, phase-b.md,
T-014 review-history, unsafe-log Amendments) are documented as
*summaries at their layer of abstraction*; corrections start at
the trio. Reduces drift risk: when a number changes (e.g., a
post-closure follow-up adds a test), the trio is what gets
corrected first; downstream summaries follow.

## phase-b.md Status block trim

The B1 milestone Status block in phase-b.md previously restated
the closure trio's headline numbers verbatim (T-013 + T-012 +
T-014 commit references, audit-log Amendment list, B5+ caller
trigger). Trimmed to a kompakt pointer at the closure trio entry
point (the business retro), preserving the *trigger* for the
Pending audit notes' clearance but dropping the duplication.
Reduces the same-fact-three-places drift risk the sourcery
review flagged.

current.md and the T-014 review-history are intentionally not
trimmed: each is at a different abstraction level (current.md is
the reader's pointer; T-014's history is task-level chronicle),
and brief restatements at those layers are useful navigation
markers, not pure duplication.

Refs: sourcery-ai PR #16 review feedback (centralize-canonical-numbers)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closes δ.1 of the post-B1-closure follow-up arc. ADR-0023's slot was
recorded as "accept-deferred" at the B0 closure (2026-04-27), but the
file did not exist; the README index gained a no-link row in α (PR
#13), and the glossary's CDT entry pointed at the missing path. This
commit lands the placeholder body so:

- The in-tree references that mention ADR-0023 (glossary, phase-b.md
  ledger, decisions/README.md index, the B0 closure security review
  prose) resolve to a citable artefact instead of a 404.
- The deferral conditions are recorded at the slot itself rather
  than scattered across review prose; future agents recognise when
  the trigger fires (multi-task server arc; first userspace driver
  with sub-cap delegation; threat-model escalation).
- The four-option sketch (whole-system CDT, per-table + back-pointer,
  explicit revoke-token, indefinite defer to userspace) gives a
  future ADR author a starting analysis instead of a blank page.

Status remains `Deferred`. The body is a placeholder, not a load-
bearing decision; when a trigger fires, the body gets rewritten in
place with a Status flip from `Deferred` to `Proposed` (then
`Accepted`). The append-only rule that protects original Accepted
bodies does not apply to Deferred placeholders.

## Files changed

- docs/decisions/0023-cross-table-capability-revocation-policy.md
  (new) — placeholder body with deferral conditions, options sketch,
  references.
- docs/decisions/README.md — index row gains the file link (was a
  prose-only no-link row from α).
- docs/glossary.md — CDT entry's "no file at HEAD" qualification
  removed; clean link to the placeholder.

Refs: ADR-0023, ADR-0014, ADR-0017, B0 closure security review
2026-04-27

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request formally closes the B1 milestone for the Tyrne project following the resolution of an idle-dispatch regression. It includes the implementation of T-014, the acceptance of ADR-0026, and a comprehensive suite of documentation and polish updates. The pull request also provides a complete B1 closure trio, including a business retrospective, security review, and performance baseline. Review feedback suggests minor terminology clarifications in the business retrospective to improve clarity regarding project phases.


The bug is exactly what a four-row table of `(queue-state-pre, action, queue-state-post)` walked through `unblock_receiver_on` + `yield_now` would have surfaced before the ADR Accept. ADR-0022 didn't write that table; ADR-0026 §Decision outcome does, as the central evidence for why Option B is the correct shape. **The same critique fits every multi-step state-machine ADR the project has shipped:** ADR-0014 cap-derivation tree (had its bug-discoveries via riders post-Accept rather than via simulation pre-Accept), ADR-0017 IPC primitive set (same), ADR-0019 scheduler shape (same), ADR-0022 idle-location (this one).

Adjustment: extend the [`write-adr` skill](../../../../.claude/skills/write-adr/SKILL.md) with a *Simulation* check item. For every multi-step state-machine ADR (capability flows, IPC handshakes, scheduler dispatch, exception entry, etc.), the body must include a 3-5 row table walking the worst-case interaction through. The simulation table is a *structural discipline* on the body, not a stylistic suggestion. Phase α adopts this for ADR-0027 onwards.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The term "Phase α" is confusing here, as "α" was previously used to label a specific documentation PR (#13) and the project follows a Phase A/B/C nomenclature. Since ADR-0027 is part of the B2 milestone preparation, it would be clearer to refer to "B2 prep" or "The project".

Suggested change
Adjustment: extend the [`write-adr` skill](../../../../.claude/skills/write-adr/SKILL.md) with a *Simulation* check item. For every multi-step state-machine ADR (capability flows, IPC handshakes, scheduler dispatch, exception entry, etc.), the body must include a 3-5 row table walking the worst-case interaction through. The simulation table is a *structural discipline* on the body, not a stylistic suggestion. Phase α adopts this for ADR-0027 onwards.
Adjustment: extend the [`write-adr` skill](../../../../.claude/skills/write-adr/SKILL.md) with a *Simulation* check item. For every multi-step state-machine ADR (capability flows, IPC handshakes, scheduler dispatch, exception entry, etc.), the body must include a 3-5 row table walking the worst-case interaction through. The simulation table is a *structural discipline* on the body, not a stylistic suggestion. B2 prep adopts this for ADR-0027 onwards.

- [ ] **Extend `write-adr` skill with a Simulation check.** For every multi-step state-machine ADR, the body must include a 3-5 row queue-state / handshake-state / dispatch-state simulation table. Trigger: drafted alongside ADR-0027 (B2 prep) so the rule lands with its first user.
- [ ] **Add Track K — Live execution to the comprehensive-review template.** Promote Track F §F-1 to a standalone live-execution track that boots the kernel under QEMU and traces one demo flow end-to-end. Trigger: when the next full-tree review is commissioned (no scheduled trigger; maintainer-initiated).
- [ ] **B2 prep — ADR-0027 (kernel virtual memory layout) drafting.** Reactivated post-B1-closure; design-first applies (`docs/architecture/memory-management.md` lands alongside or before the implementation, mirroring T-008's `scheduler.md`/`ipc.md` and T-012's `exceptions.md` precedents). The ADR's *Dependency chain* section opens the implementation task (T-015, next free slot) per ADR-0025 §Rule 1.
- [ ] **δ — write ADR-0023 placeholder file with `Status: Deferred` body.** [`decisions/README.md`](../../../decisions/README.md)'s deferred-row was added in α; per ADR-0025 §Rule 1, every Deferred ADR should still have a file with a body that explains the deferral conditions. δ writes the body. Trigger: opens any time before B2 prep needs to cross-reference the Deferred state from a real task.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The phrase "δ writes the body" is redundant and confusingly uses the task label "δ" as a subject. It would be clearer to state that the task involves writing the body or simply remove the redundant sentence.

Suggested change
- [ ] **δ — write ADR-0023 placeholder file with `Status: Deferred` body.** [`decisions/README.md`](../../../decisions/README.md)'s deferred-row was added in α; per ADR-0025 §Rule 1, every Deferred ADR should still have a file with a body that explains the deferral conditions. δ writes the body. Trigger: opens any time before B2 prep needs to cross-reference the Deferred state from a real task.
- [ ] **δ — write ADR-0023 placeholder file with `Status: Deferred` body.** [`decisions/README.md`](../../../decisions/README.md)'s deferred-row was added in α; per ADR-0025 §Rule 1, every Deferred ADR should still have a file with a body that explains the deferral conditions. This task provides the body. Trigger: opens any time before B2 prep needs to cross-reference the Deferred state from a real task.

cemililik and others added 2 commits May 7, 2026 14:32
…ecv) + open T-015

Closes δ.2 of the post-B1-closure follow-up arc. The 2026-05-06
comprehensive code review (Track A non-blocker) and the 2026-05-07
B1 closure security review (forward-flagged item) both surfaced an
asymmetric rollback in `ipc_recv_and_yield`'s Deadlock path: Phase
1's `ipc_recv` transitions the endpoint from `Idle` to
`RecvWaiting`; Phase 2's Deadlock path rolls back the *scheduler*
state but does NOT reverse the *endpoint* transition. v1 hides the
asymmetry behind ADR-0026's `register_idle` (Deadlock is
structurally unreachable when idle is registered as the dispatcher
fallback), but the gap becomes a live bug under any of:

- userspace-driven endpoint destroy (B2+);
- multi-waiter wake-up (ADR-0019 §Open questions);
- preemption (B5+).

ADR-0032 settles on Option A — add `ipc_cancel_recv(...)`
primitive; Deadlock path calls it before returning
`Err(SchedError::Deadlock)`. The primitive becomes the single
canonical "reverse a recv registration" call site that all three
future arcs (destroy-drain, multi-waiter wake, preemption-rollback)
will reuse, replacing the per-site duplication Option B would have
created.

The ADR includes a *Simulation* table per the discipline introduced
by ADR-0026 and codified in `template.md` / write-adr skill in the
preceding commit — the table walks Phase 2 Deadlock path under v1 +
Option A through `(state-pre, action, state-post)` triples; row 3b
is what the new host test will mechanically replay.

## Files changed

- docs/decisions/0032-endpoint-rollback-and-cancel-recv.md (new) —
  ADR Proposed status; Decision outcome with Simulation table;
  Dependency chain naming T-015.
- docs/analysis/tasks/phase-b/T-015-endpoint-rollback-cancel-recv.md
  (new) — Draft user-story per ADR-0025 §Rule 1 (forward-reference
  contract). Will move to In Progress only after ADR-0032 is
  Accepted.
- docs/analysis/tasks/phase-b/README.md — index row for T-015 (B2
  prep, Draft).
- docs/decisions/README.md — index row for ADR-0032 (Proposed
  2026-05-07). [Updated in earlier δ.1 commit; this commit's
  diff covers only the entries directly attributable to this
  decision-pair landing.]
- docs/roadmap/phases/phase-b.md — ADR ledger gains the ADR-0032
  row; non-blocking for ADR-0027 but required before B-phase
  userspace-destroy work.

Status remains `Proposed` per the [write-adr skill's careful-
re-read rule](.claude/skills/write-adr/SKILL.md): Accept may
follow same-day after a careful re-read of the ADR end-to-end,
but never in the same commit as the initial draft.

Refs: ADR-0032, ADR-0017, ADR-0019, ADR-0021, ADR-0022, ADR-0026,
T-015, comprehensive review 2026-05-06 Track A, B1 closure security
review 2026-05-07

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ubject wording)

- line 110: "Phase α adopts" → "B2 prep adopts" (α is PR alias, not project phase)
- line 149: "δ writes the body" → "This task provides the body" (δ as subject of action was confusing)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cemililik cemililik merged commit 95b15aa into main May 7, 2026
5 of 6 checks passed
cemililik added a commit that referenced this pull request May 7, 2026
All five inline findings from coderabbitai's review of PR #18 verified
against current state and applied. (qodo + sourcery rate-limit / cap
prevented their input on this PR.)

- track-d-perf.md L147: append `#L733-L745` to the bsp-qemu-virt main.rs
  link so the URL fragment matches the link text.
- track-e-docs.md L229-233: remove accidental export artefacts (absolute
  local path + `Co-Authored-By:` trailer) — these belong in commit
  metadata, not the review body.
- track-f-tests.md L43-44 + L134-138: §F-1 RecvComplete coverage gap is
  now closed by PR #18 commit `25854a1`'s new
  `cancel_recv_on_recv_complete_does_not_drop_message_or_cap` test;
  matrix entry updated and Finding §F-1 moved to "Minor (closed)" with
  a note that the new test is *stronger* than originally recommended
  (pins cap-bearing-state property as well).
- track-g-process.md L41: fenced code block gains `text` language
  identifier to satisfy MD040.
- current.md L17: "closure trio that lands with this PR" → "closure trio
  that landed in PR #16 (`95b15aa`)" — the ambiguous "this PR" reading
  was load-bearing only at the moment PR #16 was open; now permanent
  history requires a fixed reference.

No code changes; no gate impact. fmt clean.

Refs: PR #18 review-round (coderabbitai)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cemililik cemililik deleted the b1-closure-trio-2026-05-07 branch May 25, 2026 12:49
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