feat: resource ownership graph (petgraph) — Phase 1#52
Merged
Conversation
Adds ResourceGraph built from resolved_imports and parsed components. Provides O(1) queries: defines_resource(), resource_definer(), is_reexporter(). No behavior change — graph built alongside existing code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8c78709 to
3c0885c
Compare
3 tasks
avrabe
added a commit
that referenced
this pull request
May 19, 2026
Two related fixes for the LS-N verification gate's coverage of
LS-CP-4 ("DWARF passthrough emits address-incorrect debug info").
1. `meld-core/tests/dwarf_strip.rs` already had three tests pinning
Phase 1.5's Strip-default policy (the mitigation LS-CP-4 calls
for): `default_strips_dwarf`, `passthrough_preserves_dwarf`,
`default_is_strip`. The gate didn't see them because the names
don't match the `ls_cp_4_*` convention. Adds three convention
aliases that delegate to the existing test bodies — same pattern
as the five aliases in PR #161.
2. `tools/run_ls_verification.py` was invoking `cargo test --lib`,
which excludes integration tests under `<package>/tests/`. Drops
the `--lib` filter so both lib and integration-test binaries
participate. Each cargo target prints its own `test result:`
line; the parser already sums across multiple matches, so this
is a one-line change with no other plumbing impact.
Gate result moves from 16/19 verified (3 missing: LS-CP-4, LS-A-8,
LS-A-9) to 17/19 verified (2 missing: LS-A-8, LS-A-9). The
remaining two need net-new tests, not aliases — surveyed in task
#52, scoped at ~1-2h (LS-A-9) and ~2-4h (LS-A-8).
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
avrabe
added a commit
that referenced
this pull request
May 19, 2026
The async-callback adapter at lines 3992-3998 of `fact.rs` dispatches `[waitable-set-poll]` on `WAIT (2)` OR `POLL (3)` via an `I32Const(WAIT) + I32Eq + LocalGet + I32Const(POLL) + I32Eq + I32Or` instruction skeleton. A previous version of that branch matched only `WAIT`, silently treating `POLL` as YIELD which sent `(EVENT_NONE, 0, 0)` to `[callback]` and dropped any event the host had ready (LS-A-9). The fix landed without a regression test; the LS-N verification gate surfaced this gap as the next-to-last missing entry. Adds `ls_a_9_callback_adapter_dispatches_both_wait_and_poll`, which: 1. Builds a minimal `MergedModule` fixture with the prerequisites the callback emitter requires: - One `() -> i32` lift function - The `[callback]<export_name>` companion export - A `[waitable-set-poll]` host import 2. Drives `generate_async_callback_adapter` to produce the adapter 3. Scans the emitted function body for the byte sequence `0x41 0x02 0x46 0x20` (i32.const WAIT(2) / i32.eq / local.get) followed by `0x41 0x03 0x46 0x72` (i32.const POLL(3) / i32.eq / i32.or), in order Pin-by-substring is robust against unrelated body changes (locals layout, surrounding control flow); a regression that drops the POLL arm or reorders the comparisons would fail this test. Gate verdict moves from 17/19 verified to **18/19**; remaining missing entry is LS-A-8 (inner-list rep_func selection — surveyed in task #52 at ~2-4h scope). This is the **first PR to touch a Tier-5 source file** since the mythos-auto.yml plumbing fixes (#164), so it also serves as the auto-runner's first true end-to-end matrix-scan smoke test. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds ResourceGraph with O(1) ownership queries. No behavior change. 73/73 pass.