Skip to content

docs(phase-2): Sprint 4 plan — booting a real graphics microcode - #47

Merged
doublegate merged 3 commits into
mainfrom
docs/sprint-2-microcode-boot-plan
Jul 22, 2026
Merged

docs(phase-2): Sprint 4 plan — booting a real graphics microcode#47
doublegate merged 3 commits into
mainfrom
docs/sprint-2-microcode-boot-plan

Conversation

@doublegate

Copy link
Copy Markdown
Owner

Motivation

ADR 0008 (#46) settled how Phase 2's second exit criterion is discharged. This
turns that decision into a concrete, source-grounded sprint plan so the
implementation can start the moment the mips64-elf toolchain finishes building
— no design work left to do on the critical path.

What's here (docs-only)

Why now

The high-value implementation work (assemble, vendor closure, reproduce boot
state) is best done with the toolchain so it can be verified in one shot, not
guessed. This plan is the toolchain-independent part — it de-risks and sequences
the rest so Stage 1 is pure execution once mips64-elf-as/-ld/-objcopy are
on PATH.

markdownlint green. Docs-only; no code or behaviour change.

🤖 Generated with Claude Code

Breaks ADR 0008 into a concrete, source-grounded sprint plan for Phase 2's
second exit criterion, so implementation can start the moment the mips64-elf
toolchain is available.

- New `sprint-4-microcode-boot.md`: four tickets (T-24-001…004) — vendor +
  assemble the microcode; reproduce the rspq boot state in Rust + boot-to-idle
  witness; feed a fixture command list + capture the emitted RDP commands; the
  golden byte-compare (the criterion itself). Each cites the verified libdragon
  source (rsp_queue.inc _start/RSPQ_Loop/DMEM layout, rsp_rdpq.S RDPQ_Send), and
  defers exact byte offsets to the assembled symbol map rather than guessing.
- overview.md: Sprints 2–3 (the vector ISA + load/store) marked done — they
  landed via #41#44 without separate sprint docs — and Sprint 4 linked as the
  remaining criterion-2 work.

Docs-only, source-grounded. markdownlint green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Updated Phase 2 sprint tracking: marked Sprint 2 as completed and refined Sprint 3 scope/status based on current test coverage.
    • Added a comprehensive Sprint 4 plan for booting real graphics microcode, including the boot approach, validation steps, and acceptance criteria.
    • Clarified “done” gating across execution and documentation milestones; current progress remains blocked pending the required build toolchain.

Walkthrough

Phase 2 sprint statuses now record completed VU and load/store work. A new Sprint 4 plan defines libdragon rdpq microcode boot, reproducible assembly, Rust boot-state setup, DPC output capture, golden byte comparison, and completion gates.

Changes

Phase 2 RSP LLE

Layer / File(s) Summary
Sprint status updates
to-dos/phase-2-rsp-lle/overview.md
Sprint 2 and Sprint 3 include completion details, while Sprint 4 is recorded as planned and blocked on the mips64-elf toolchain.
Microcode boot foundation
to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md
The plan specifies the rdpq overlay structure, DMEM layout, reproducible assembly, and Rust boot ABI.
Command validation and phase gates
to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md
The plan defines fixed-command execution, exact DPC-range capture, provenance-backed golden byte comparison, documentation updates, and Phase 2 completion criteria.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 9 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title is related, but the subject is not imperative, so it misses the Conventional Commits requirement. Rewrite it as an imperative Conventional Commit, e.g. "docs(phase-2): add Sprint 4 microcode boot plan".
✅ Passed checks (9 passed)
Check name Status Explanation
Description check ✅ Passed The description is clearly related to the docs-only Sprint 4 planning change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Oracle Number Is Stated ✅ Passed PASS: The PR only edits docs/plans; no emulation behaviour changes were made, so the oracle-number rule is not triggered.
Docs-As-Spec Sync ✅ Passed Only docs files changed (to-dos/phase-2-rsp-lle/*.md); no rustyn64-* chip crate files were touched, and the PR is explicitly docs-only/no behaviour change.
Changelog Entry For User-Visible Changes ✅ Passed PASS: The diff is docs-only, and the rule only requires an Unreleased entry for user-visible changes; no such change is present.
Measured, Never Tuned ✅ Passed PASS: The only numeric DPC bounds are sourced via docs/rdp.md to N64brew Interface, and sprint 4 defers exact fixture addresses to T-24-001; no uncited measured constant found.
Unsafe Stays Out Of The Chip Crates ✅ Passed PASS: this PR is docs-only; no Rust sources changed, no unsafe was added outside rustyn64-frontend, and existing #![forbid(unsafe_code)] guards remain intact.

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md (1)

1-164: 📐 Maintainability & Code Quality | 🔵 Trivial

Run the pinned Markdown lint gate.
pre-commit run markdownlint --all-files

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md` around lines 1 - 164, Run
the repository’s pinned Markdown lint gate with pre-commit using `markdownlint
--all-files`, then resolve any reported violations in the sprint document and
rerun the gate until it passes.

Sources: Path instructions, Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@to-dos/phase-2-rsp-lle/overview.md`:
- Around line 102-105: Revise the Sprint 3 status in the phase-2 overview to
keep the dual-issue pipeline criterion open rather than marking it complete
based on absent timing assertions. Align the status with the pipeline timing
limitations documented in Lines 36–50, and retain only the load/store completion
as done.
- Around line 97-110: Run the pinned local markdownlint hook with `pre-commit
run markdownlint --all-files` and resolve any reported Markdown issues before
merging the changes to `overview.md`.

In `@to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md`:
- Around line 107-121: Expand T-24-003’s fixture contract to specify
deterministic initial DMEM, IMEM, RDRAM, and SP state; the microcode image/load
procedure and SP_PC entry point; the output-buffer base; and the exact DPC
capture comparison range and length. Define completion validation that proves
the RSP drained the fixture and produced the complete expected output, not
merely non-empty output or an advanced DPC_END, and carry ADR 0008’s
unreachable-baseline requirement into the fixture.

---

Outside diff comments:
In `@to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md`:
- Around line 1-164: Run the repository’s pinned Markdown lint gate with
pre-commit using `markdownlint --all-files`, then resolve any reported
violations in the sprint document and rerun the gate until it passes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f5bee3db-1099-4b1f-8419-3283484d134c

📥 Commits

Reviewing files that changed from the base of the PR and between bb2be02 and 9247623.

📒 Files selected for processing (2)
  • to-dos/phase-2-rsp-lle/overview.md
  • to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md

Comment thread to-dos/phase-2-rsp-lle/overview.md
Comment thread to-dos/phase-2-rsp-lle/overview.md Outdated
Comment thread to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md Outdated
Adopts CodeRabbit's comments on PR #47.

- Sprint 3 status no longer reads as "dual-issue done". It is out of scope for
  the v0.3.0 cut (the criterion is "observed depth zero", #40) but remains an
  open accuracy item deferred to a later phase, consistent with the unmeasured
  pipeline-timing note earlier in the overview.
- T-24-003/004 now pin the full deterministic fixture contract: fixed initial
  DMEM/IMEM/RDRAM/SP state with ADR 0008's unreachable baseline, a defined
  completion condition (queue drained AND kernel at its idle/BREAK site within a
  bounded budget), and an exact captured range (DPC_START..DPC_END) so a
  truncated or over-long emission fails rather than partially matching.

(The markdownlint reminder is satisfied: the pinned hook was run and is green.)

markdownlint green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md`:
- Around line 116-130: Complete the deterministic fixture contract by explicitly
pinning the RDRAM addresses and bytes for the command list and scratch area,
every command operand, and initial DPC_START, DPC_END, DPC_CURRENT, and
DPC_STATUS values. Document that DPC_START..DPC_END is half-open and define its
byte-length mapping, aligning the fixture wording with the DPC register
semantics in the referenced implementation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a2bcd860-bec1-48d9-af41-31f3b7cd8049

📥 Commits

Reviewing files that changed from the base of the PR and between 9247623 and d14ad01.

📒 Files selected for processing (2)
  • to-dos/phase-2-rsp-lle/overview.md
  • to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md

Comment thread to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md Outdated
Adopts (partially) CodeRabbit's follow-up on PR #47. Specifies the capture range
as half-open [DPC_START, DPC_END) — DPC_END is the exclusive end bound (N64brew
Interface, docs/rdp.md) — so the byte length is DPC_END - DPC_START, removing the
ambiguity about how the range maps to a length.

The literal command-list/scratch addresses, operand bytes, and initial DPC_*
values are deliberately NOT pinned in the plan: they follow from the assembled
rdpq encoding and are authored in T-24-003's fixture. Inventing byte values in a
planning doc before the fixture exists would violate the project's
never-invent-undocumented-values rule; the acceptance criteria already require
them fixed and documented when authored.

markdownlint green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md (1)

1-179: 📐 Maintainability & Code Quality | 🔵 Trivial

Run the pinned markdownlint hook locally before merge.
pre-commit run markdownlint --all-files

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md` around lines 1 - 179, Run
the repository’s pinned markdownlint pre-commit hook for all files using
`pre-commit run markdownlint --all-files`, then resolve any reported Markdown
issues in the sprint document before merging.

Sources: Coding guidelines, Path instructions, Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md`:
- Around line 1-179: Run the repository’s pinned markdownlint pre-commit hook
for all files using `pre-commit run markdownlint --all-files`, then resolve any
reported Markdown issues in the sprint document before merging.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 05f4af55-8e68-4611-8357-0e470810a2a7

📥 Commits

Reviewing files that changed from the base of the PR and between d14ad01 and d07d4aa.

📒 Files selected for processing (1)
  • to-dos/phase-2-rsp-lle/sprint-4-microcode-boot.md

@doublegate
doublegate merged commit c3e5291 into main Jul 22, 2026
9 checks passed
@doublegate
doublegate deleted the docs/sprint-2-microcode-boot-plan branch July 22, 2026 03:19
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