Skip to content

chore: stale doc drift in backend codegen — v2 path is production, audio wiring IS called - #506

Merged
apotema merged 1 commit into
mainfrom
feat/503-doc-drift
Jul 2, 2026
Merged

apotema merged 1 commit into
mainfrom
feat/503-doc-drift

Conversation

@apotema

@apotema apotema commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Doc-accuracy follow-up from the #386 audit — corrects comments in the codegen sources that now say the opposite of what the code does. Comment-only: no goldens or generated output move; zig build test passes unchanged.

Corrections

A. src/root.zig — detectV2ManifestName doc
Dropped the "PRODUCTION NO-OP TODAY … returns null on every real generate" paragraph. The #472 P2 cutover shipped: detection is live and driven solely by the resolved backend package shipping backend.manifest.v2.zon (in-tree sokol + v2 fixtures ship one; fetched providers opt in per-repo). Now points at the MANIFEST_V2_GENERATE_CUTOVER test and the §7 byte-identical anchor.

B. src/root.zig — generate call-site comment
Replaced the "production no-op today" sentence with a live-detection description (kept the load-bearing requireManifestIfExternal note untouched).

C. src/codegen/blocks/asset_wiring.zig — audio + font wiring
Replaced both "SCAFFOLDING (Phase 4) … NOT yet called" blocks with WIRED docs. Both helpers are called from buildSetupCode (loop.zig:107/108) and buildCallbackInitCode (callback.zig:95/96), gated on .sound/.font resources. Did not touch any w.print literal (bit-identical contract). Kept the still-accurate @hasDecl-guard paragraph on the font sibling.

D. src/deps_linker.zig — stagesSdlGamepad / stagesAndroidGamepad
Documented the switch (cfg.backend) enum arms as defensive dead code: post-#386 every Backend tag resolves to an external provider, so isExternal() is true for every config and the arms are unreachable — pinned by the "every built-in is now external" tests (cited by name, not line).

Verification

  • zig build → exit 0
  • zig build test → exit 0 (the failed command: lines are intentional negative-test logs)
  • git status shows only the 3 comment files changed — no golden moved

Closes #503

https://claude.ai/code/session_017pW3ifKf9wgxNg4viy6okw

…ion, audio/font wiring IS called)

Doc/comment-only follow-up from the #386 audit. Corrects comments that
now describe the opposite of what the code does — no behavior change,
no golden/generated output moves, `zig build test` passes unchanged.

- root.zig `detectV2ManifestName`: drop "PRODUCTION NO-OP TODAY" — the
  #472 P2 cutover shipped; detection is live and driven solely by the
  resolved backend package shipping `backend.manifest.v2.zon`.
- root.zig `generate` call-site: replace the "production no-op today"
  sentence with the live-detection description.
- codegen/blocks/asset_wiring.zig audio + font: replace the "SCAFFOLDING
  … NOT yet called" blocks with WIRED docs — both are called from
  buildSetupCode (loop.zig:107/108) and buildCallbackInitCode
  (callback.zig:95/96), gated on `.sound`/`.font` resources.
- deps_linker.zig `stagesSdlGamepad`/`stagesAndroidGamepad`: document the
  enum arms as defensive dead code (every Backend tag is now external
  post-#386), citing the pinning tests by name.

Refs #503

Claude-Session: https://claude.ai/code/session_017pW3ifKf9wgxNg4viy6okw

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates documentation comments across several files (asset_wiring.zig, deps_linker.zig, and root.zig) to reflect the completion of various scaffolding phases, including Phase 4 for audio and font wiring, Phase 6c for external providers, and Phase 2 for manifest v2 cutover. It also documents certain blocks of code as defensive dead code kept for future use. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 08f9e8da-7f06-442c-9741-285aa3a3c671

📥 Commits

Reviewing files that changed from the base of the PR and between 5c26395 and 2d98702.

📒 Files selected for processing (3)
  • src/codegen/blocks/asset_wiring.zig
  • src/deps_linker.zig
  • src/root.zig
👮 Files not reviewed due to content moderation or server errors (3)
  • src/codegen/blocks/asset_wiring.zig
  • src/root.zig
  • src/deps_linker.zig

📝 Walkthrough

[!WARNING]

Walkthrough skipped

File diffs could not be summarized.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/503-doc-drift

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

@apotema
apotema merged commit 33b3f2f into main Jul 2, 2026
4 checks passed
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.

chore: stale doc drift in backend codegen — v2 path is production, audio wiring IS called

1 participant