You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(gamma): use embedded offline fixtures for gamma tests - #231
Generate small gamma test projects from immutable embedded assets in owned temporary directories instead of using the repository as the project under test. Preserve explicit manifests, source bytes, specialized local graphs, and intentionally malformed inputs.
Compile public function- and module-scoped #[gamma::resource] attributes in the complete scheduling campaign using a copied real proc-macro artifact and --extern, without a Cargo dependency in the sample.
Exercise actual public macro diagnostics using the authoritative Cargo-artifact helper, dependency-free consumers, and fresh Cargo homes and targets.
Keep offline configuration after updates, respect .cargo/config precedence, reject Windows path escapes, and preserve Cargo's effective inherited compiler-flag source.
Keep private test helpers under tests/support, without introducing nightly coverage attributes or default production helper APIs.
System-test boundary
Real compiler/offline acceptance is preserved, not replaced by scripted compiler success. The three new build cases now live in offline_builds, which requires the non-default system-tests feature; ordinary project checks observe materialization and pure scripted flag/configuration/path invariants without subprocesses. Native all-feature Anvil checks retain the real-build target.
The system-test specification records purpose, provisioning, immutable inputs and owned outputs, isolation, runtime budgets, interpreter boundaries, and explicit failure semantics. The generator's blanket Miri exclusion is removed: pure checks run with isolation enabled, while only unsupported filesystem-output or compiler cases carry individual explanatory ignores. The missing-file regression now requires its requested-path diagnostic prefix.
Scope
This is test infrastructure, not a production gamma algorithm/API change. Committed-source/documentation invariant checks remain read-only repository checks. Real proc-macro bootstrap is offline and locked but still requires the product's normal available build dependencies; the empty-registry-cache guarantee applies to generated consumers, not rebuilding the whole repository from an empty cache. Checked-in sample input bytes are not mutated.
Validation
Original broad conversion: 3,542 gamma tests passed offline, with four pre-existing skips; this full run predates the review corrections.
Current boundary correction: 40 selected native tests passed, covering real offline/public-macro/resource acceptance, materializer invariants, and source read/error behavior.
Actual Careful: all 9 offline_builds and 16 project cases passed.
Isolated Windows Miri: 9 pure project cases and 6 pure offline_builds cases passed; filesystem-output and compiler-process exclusions are individual and reasoned. Isolation was not disabled.
Scoped Clippy with warnings denied, generated formatting, README generation, spelling, package inclusion, and whitespace gates passed.
Bounded self-review found no additional findings.
Local follow-up validation was on Windows x86_64 MSVC. The new revision awaits its cross-platform CI/review round.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.9%. Comparing base (3cd0306) to head (39aaae8). ⚠️ Report is 1 commits behind head on main.
Fast-path approval stopped at 62586e2: the resource E2E fixture pre-expands cargo_gamma_attrs_impl::resource instead of compiling public #[gamma::resource], dropping existing proc-macro integration coverage. Two survey fixtures also overwrite .cargo/config.toml after the helper sets net.offline, breaking the forced-offline fixture guarantee. Please restore both guarantees and have a human review the migration.
The reason will be displayed to describe this comment to others. Learn more.
Posted by an AI agent
Warning: Incomplete review
I reviewed the public contract, behavior, tests, performance, naming, and consistency between code and documentation. Telemetry and recovery checks were not applicable to these changes. I could not check:
Public API surface: paired cargo public-api captures were unavailable, and local Rust API generation was not permitted.
No overall verdict is given. The existing concerns about resource-macro end-to-end coverage, forced-offline configuration, and Windows fixture paths are already raised in the discussion; I have not duplicated them here. No tests or benchmarks were run locally. CI test/coverage, MSRV, mutation, and CodeQL passed; fast PR-title and runtime careful checks failed. These statuses do not establish full verification.
Sergey Galkin (sgalkin)
changed the title
Use embedded offline fixtures for gamma tests
test(gamma): use embedded offline fixtures for gamma tests
Oct 7, 2026
The resource E2E fixture pre-expands the implementation instead of compiling public #[gamma::resource].
Restored the public macro-to-compiled-marker-to-scheduler path in e88652b. The fixture now compiles literal public attributes in separate function/module test binaries using the real proc-macro artifact copied into the owned project, with no Cargo dependencies in the generated consumer. The artifact helper is shared with diagnostics, and the original capacity-one/overlap assertions remain. Both the empty-Cargo-home build and scheduling campaign pass under Careful; the survey offline-configuration and Windows path findings are also corrected.
The reason will be displayed to describe this comment to others. Learn more.
Posted by an AI agent
Warning: Incomplete review
I reviewed the public contract, behavior, tests, performance, naming, and documentation, including a static check of the previously reported resource-macro E2E, offline-configuration, and Windows fixture-path fixes. I could not review:
Public API surface: matching base/head cargo-public-api output is unavailable, and generating it is not permitted.
No overall verdict is given. There are no new inline comments; the target-specific compiler-flag concern is already in the discussion and is not repeated. Telemetry and recovery do not apply because neither changed. I ran no local tests or benchmarks.
The reason will be displayed to describe this comment to others. Learn more.
Posted by an AI agent
Warning: Incomplete review
I reviewed public contracts, behavior, tests, performance, naming, and documentation consistency; I found no new actionable issues in these areas. The change did not introduce emitted telemetry or recovery behavior, so those topics did not apply.
I could not check:
Public API surface: matching cargo-public-api captures for the base and head were unavailable, and generating them was outside this review's scope.
No overall verdict is given. No local tests or benchmarks were run.
Generate isolated sample projects from embedded assets, preserve specialized assertions, and exercise the real public macros without consumer Cargo dependencies.
Respect Cargo configuration precedence and keep the shared fixture helper stable-compatible under tests/support.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Share Cargo environment flag selection between offline project and public-resource fixtures. Retain the applicable target flags before adding fixture arguments, honor global precedence, exclude unrelated targets, and keep argument boundaries intact.
Add target/build/global precedence regressions and validate actual compiler environments and Careful.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep real Cargo/compiler acceptance in an opt-in system target with documented provisioning, isolation and runtime budgets. Separate pure configuration/path/flag invariants from host operations so they execute under isolated Miri, with individual reasons for unsupported output and process cases.
Preserve embedded input bytes and native acceptance assertions, and pin missing-file diagnostics to the requested path.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Both changed read tests now create a host TempDir, but docs/design/system-tests.md:103-108 records that this setup is unsupported under isolated Windows Miri and requires individual explanatory ignores; the equivalent filesystem-output tests use that guard at tests/project.rs:16-20. Add reasoned Miri ignores to both read tests so the all-feature interpreter run does not select unsupported host filesystem setup.
Include compiler diagnostics from stdout in failure output
Because this command requests --message-format=json, actionable compiler diagnostics are emitted in built.stdout (which is parsed below), while this failure reports only stderr. A proc-macro compilation error can therefore leave only Cargo's summary in the panic. Include stdout so the failure identifies the actual compiler error.
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Require the selected child test to execute and pass at both resource and compiler-flag re-exec sites, not merely exit successfully. Share the small libtest result guard and pin zero, failed, ignored, multiple, and misleading-summary rejection in pure regressions.
Preserve all real offline/public-macro/resource assertions and captured failure output.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#[gamma::resource]attributes in the complete scheduling campaign using a copied real proc-macro artifact and--extern, without a Cargo dependency in the sample..cargo/configprecedence, reject Windows path escapes, and preserve Cargo's effective inherited compiler-flag source.tests/support, without introducing nightly coverage attributes or default production helper APIs.System-test boundary
Real compiler/offline acceptance is preserved, not replaced by scripted compiler success. The three new build cases now live in
offline_builds, which requires the non-defaultsystem-testsfeature; ordinaryprojectchecks observe materialization and pure scripted flag/configuration/path invariants without subprocesses. Native all-feature Anvil checks retain the real-build target.The system-test specification records purpose, provisioning, immutable inputs and owned outputs, isolation, runtime budgets, interpreter boundaries, and explicit failure semantics. The generator's blanket Miri exclusion is removed: pure checks run with isolation enabled, while only unsupported filesystem-output or compiler cases carry individual explanatory ignores. The missing-file regression now requires its requested-path diagnostic prefix.
Scope
This is test infrastructure, not a production gamma algorithm/API change. Committed-source/documentation invariant checks remain read-only repository checks. Real proc-macro bootstrap is offline and locked but still requires the product's normal available build dependencies; the empty-registry-cache guarantee applies to generated consumers, not rebuilding the whole repository from an empty cache. Checked-in sample input bytes are not mutated.
Validation
offline_buildsand 16projectcases passed.projectcases and 6 pureoffline_buildscases passed; filesystem-output and compiler-process exclusions are individual and reasoned. Isolation was not disabled.Local follow-up validation was on Windows x86_64 MSVC. The new revision awaits its cross-platform CI/review round.