Skip to content

Move three annotation blocks out of declaration bodies so main parses again - #10936

Closed
gunbai-bot[bot] wants to merge 1 commit into
mainfrom
fix-megarac-annotations
Closed

gunbai-bot[bot] wants to merge 1 commit into
mainfrom
fix-megarac-annotations

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Why

main has been red since 523657c15c (#10630) — three consecutive witnesses runs, ~6 hours at time of writing. The cause is 17 parse refusals in dag/gunbc/machine_intake/megarac_media_attach.dag, all one class:

source annotation sits inside a declaration body. Only module-item grain is
modeled; move it above the declaration it describes.

That is DESIGN §4c working correctly, not a compiler defect — the initial .dag realization admits only standalone leading // blocks attached to module-scope declarations, and body-position forms refuse until separately modeled.

Why it matters beyond one file

The refusal cascades: the parse phase produces no index, so namespace-wave-admission reports NOT RUN and the floor lane fails two phases rather than one.

It also blocks pull requests, which read main as their base. #10921 fails with megarac_media_attach.dag does not parse at the base revision (17 diagnostic(s)), so its base-side declarations cannot be read — while its own measurement is clean (claims_failed=0 passed=3520).

What changed

Each block moved above its enclosing declaration, appended to the annotation already there and separated by a bare //:

block moved above
212–218 func megarac_attach_remote_image
303–306 func megarac_attach_with_token
441–446 func megarac_start_and_confirm

The prose is preserved, not deleted. It is the irreducible rationale §4c exists to keep — one block records that malformed presented state is unknown rather than "not attached", naming the absorbing fallback §5 forbids. Deleting it to satisfy the parser would discard the reasoning and keep only the syntax.

No code is changed. Verified by counting both sides: 5 func declarations and 306 non-comment lines, identical before and after.

Verification

I could not verify the parse locally — the session container is arm64 and a remote ctrl-build dispatch syncs the repo to a committed SHA and runs git clean, so an uncommitted working tree never reaches the runner. My first attempt therefore parsed main, not this change, and proved nothing. This PR's own CI is the verification; the discriminating signal is the parse FAIL lines disappearing and namespace-wave-admission running instead of reporting NOT RUN.

Opened without waiting for an operator answer because a red main is a stopped line. I am not merging it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BJGbrvU2EgNeUiWfc5yK2c

… again

main has been red since 523657c (#10630) with 17 parse refusals in
dag/gunbc/machine_intake/megarac_media_attach.dag, all one class:

  source annotation sits inside a declaration body. Only module-item
  grain is modeled; move it above the declaration it describes.

That is DESIGN 4c working correctly, not a compiler defect: the initial
.dag realization admits only standalone leading // blocks attached to
module-scope declarations, and body-position forms refuse until
separately modeled. The file carried three body-position blocks.

The refusal cascades rather than staying local -- the parse phase
produces no index, so namespace-wave-admission reports NOT RUN and the
floor lane fails two phases. It also blocks pull requests that read main
as their base: gunbc#10921 fails with "does not parse at the base
revision (17 diagnostic(s)), so its base-side declarations cannot be
read" while its own measurement is clean.

Each block is moved above its enclosing declaration and appended to the
annotation already there, separated by a bare `//`:

  lines 212-218  ->  above func megarac_attach_remote_image
  lines 303-306  ->  above func megarac_attach_with_token
  lines 441-446  ->  above func megarac_start_and_confirm

The prose is preserved rather than deleted, because it is the irreducible
rationale 4c exists to keep -- one block records that malformed presented
state is unknown rather than "not attached", naming the absorbing
fallback 5 forbids. Deleting it to satisfy the parser would discard the
reasoning and keep only the syntax.

No code is changed. Verified by counting both sides: 5 `func`
declarations and 306 non-comment lines before and after, identical.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BJGbrvU2EgNeUiWfc5yK2c
@gunbai-bot

gunbai-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #10930, which was opened five hours earlier and is smaller for the same result (+17/-17 vs +20/-17; I added // separators it did not need). Verified equivalent: both leave 0 body-position annotations, 5 func declarations, 306 non-comment lines.

The diagnosis is carried over to #10930 — the fix works (0 parse FAILs, claims_failed=0) and cannot green its own CI, because namespace-wave-admission reads the still-broken base. Deleting this branch with the close so no successor PR is minted.

— sent from merry-bear-25

@gunbai-bot gunbai-bot Bot closed this Sep 10, 2026
@gunbai-bot
gunbai-bot Bot deleted the fix-megarac-annotations branch September 10, 2026 10:40
@briansrls
briansrls restored the fix-megarac-annotations branch September 10, 2026 10:40
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.

0 participants