Skip to content

#9911's fixture_closure_rustc_discrimination passes on ANY rustc refusal from its red fixture's module, so its text-boundary claim is weaker than it reads - #10084

Closed
briansrls wants to merge 5 commits into
mainfrom
session/swift-swift-486
Closed

briansrls wants to merge 5 commits into
mainfrom
session/swift-swift-486

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session swift-swift-486.
Pushing to session/swift-swift-486 advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

Brian Searls and others added 5 commits September 2, 2026 09:28
…no pass

`fixture_closure_rustc_discrimination` accepted its red arm on ANY rustc
refusal reported in the red fixture's own emitted module. A location says
WHERE rustc refused and never WHAT, so a fixture edited into a syntax error,
an emitter regression producing an unresolved path, or an arity fault would
each have reddened the arm in the right file and been reported PASSED while
the text-boundary class the arm names had stopped being its subject.

The attributed diagnostic now carries its governing rustc header, and the pair
additionally requires the error class the arm claims -- E0308, cited from the
rustc error index and MEASURED on the pre-change tree with the arm's own
enrolled invocation rather than inferred from the class description. Only an
`error` may attribute: a warning naming the file refused nothing, and an error
header elsewhere in the run does not govern it.

The scan is factored out of `run_cargo` as a pure function so the parse the red
arm rests on executes on every push through three unit tests, while the cargo
route around it stays `#[ignore]`d candidate evidence. No rung changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Frq65YNWcMzSVcnAoHCQuB
… red

The two `compiler_tests_rust` mirrors are regenerated by the emitter
(`claim_executor --required-regen`, installed and taken to a fixed point:
the mirror re-emits identical and only `compiler_tests.rs` drifted after the
seed rebuild), so the committed bytes carry the strengthened assertion.

`a_red_of_the_wrong_error_class_does_not_pass_the_pair` is the discriminating
RED for the conjunct itself: same pair shape, only the rustc code varies, and
`E0433` -- an unresolved path, which is what an emitter regression or an edited
fixture produces -- FAILS where the arm previously reported PASSED.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Frq65YNWcMzSVcnAoHCQuB
Measured across the two runs taken on this lane: the same E0308 arrived once
as `mismatched types` and once as `arguments to this function are incorrect`.
Matching the wording would have reddened the arm on the second run with
nothing about the emitter changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Frq65YNWcMzSVcnAoHCQuB
# Conflicts:
#	src/v1/stage0/src/compiler_tests.rs
#	src/v1/stage0/src/v1_compiler_compiler_tests_rust.rs
# Conflicts:
#	src/v1/stage0/src/cli_run.rs
#	src/v1/stage0/src/compiler_tests.rs
#	src/v1/stage0/src/v1_compiler_compiler_tests_rust.rs
@briansrls
briansrls marked this pull request as ready for review September 2, 2026 16:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-02T16:09:58.985555Z 2514ca4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2514ca4e7c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1373 to +1374
&& fixture_closure_attributed_diagnostic(&pair.red)
.is_some_and(|diagnostic| diagnostic.contains(FIXTURE_RED_EXPECTED_RUSTC_CODE))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Pass the expected error code into the shared predicate

fixture_discrimination_passed is also called by function_value_adapter_fixture_closure_discrimination, whose red fixture intentionally produces E0277 and explicitly verifies that code in compiler_tests.rs. Hard-coding E0308 here therefore makes that opt-in test fail deterministically at its subsequent predicate assertion even when both adapter fixtures behave exactly as expected; the expected code needs to be supplied per discrimination pair, or this class check must remain specific to the text-boundary pair.

Useful? React with 👍 / 👎.

@briansrls briansrls closed this Sep 4, 2026
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