Skip to content

Compare retained scope JIT listings without hiding differences - #456

Merged
thomhurst merged 3 commits into
mainfrom
issue-442-code-comparison
Nov 10, 2026
Merged

thomhurst merged 3 commits into
mainfrom
issue-442-code-comparison

Conversation

@thomhurst

@thomhurst thomhurst commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

The eight retained native JIT captures for #442 need a reproducible comparison before they can support attribution. Add an exact per-method comparison of all four scoped and all four unscoped launches, retaining repeated compilations, differing immediates, missing methods and the SHA-256 identities of every listing and capture. Reject failed, incomplete, reordered or unexpected-runtime captures rather than silently excluding them.

On completed run 42784725602, scoped ABBA has 674 method identities: 673 match exactly across all four processes. ScopeOnly, both generated workload runners, native DI CreateScope and Dispose/DisposeAsync match exactly. The sole differing identity is System.Buffers.SearchValues.TryGetSingleRange; its listing differs in a stack-guard immediate. All 674 unscoped identities match exactly. No normalization hides this difference. Diffable JIT text omits addresses/relocations and precompiled code; equality does not prove timing equivalence, explain historical host state or attribute the original 12.53% loss. The earlier unfavorable tiering-off timings remain evidence.

Inspected the independent #437 scoped handler-resolution path: it adds generated descriptor Resolve -> native GetRequiredService and asynchronous finally disposal. Its three retained inventories verify; benchmark source and both native DI binary hashes match, and HandlerGenerator/HandlerDescriptor source is unchanged between bfda3d3 and ed61ce7, while Relayer and benchmark assemblies differ. ScopeOnly captures cannot explain that separate path. The original #437 ScopeAndHandlerResolution capture now completed in #457 run 42788193160. This PR also accepts that explicitly named protocol and provides an opt-in integrity audit: malformed listing files remain errors by default; audit mode reports their file hashes/errors and refuses to compare their entire scoped/unscoped group. It never filters malformed methods into an apparent match.

Refs #442. Attribution remains open; this PR does not close it or claim a demonstrated production defect.

Validation: three focused tests cover changed immediates, repeated-compilation order, missing methods, partial listings and invalid launches. Replayed the comparator against all eight original hosted captures. Full Python tooling suite results and retained evidence are added below before requesting review.

Builds on the existing frozen ScopeOnly protocol, native .NET diffable JIT listings and Python SHA-256. No new launcher, gate rerun, native-client implementation, threshold change or production runtime setting. Per-message production cost: unchanged, 0 B added. No docs impact: internal investigation tooling only.

Full Python tooling suite: 123 tests pass. All eight captures were compared with the committed tool; original #437 executable inventories also verify. Comparison JSON, both original hosted input/capture artifacts, sources and test log are SHA-256 verified under /Users/tom/git/Relayer-evidence/pr-456/152e9cf0f797cd338b0f0b1056582eddcb453655/manifest.json (local retention through PR cleanup). Hosted review-accessible originals: scope code capture artifact 13749295705 and handler-resolution input artifact 13744555894, both with 90-day retention. No raw results or evidence reports are committed.

The completed handler-resolution run is not a valid scoped code comparison: launches 1–4 have respectively 4, 7, 13 and 12 header-delimited blocks with zero or multiple code-size footers. These are incomplete/ambiguous listings consistent with interleaved output, not evidence of changed native code. The strict comparator rejects them. Audit mode marks the whole scoped group incomparable. All three executable inventories verify. The well-formed unscoped group has 686 identities: 685 match exactly, including generated Resolve, native DI resolution/disposal and both workload runners; SearchValues.TryGetSingleRange differs only in three occurrences of a stack-guard immediate across all four processes. No scoped attribution follows. Before another experiment, diagnose capture integrity rather than rerunning the same wildcard capture or weakening validation.

Validation on updated head: all 125 Python tooling tests and 5 focused comparator tests pass; whitespace check passes. New tests cover both supported protocols, unsupported methods, invalid-group audit behavior and unchanged launch validation. The exact audit JSON, all eight captures, original executable inputs, source and test log (834 files) are SHA-256/size verified under /Users/tom/git/Relayer-evidence/pr-456/b9dcd4e88d67d4a26fd4918db580339694fd1525/manifest.json; local retention ends at PR cleanup. Original handler-resolution capture remains in artifact 13750141561 with 90-day retention. Existing ScopeOnly evidence and its limitations above remain unchanged.

Named-filter follow-up for #442: jitMethod is now preserved in comparison output, with the exact protocol filter required in every launch's native DOTNET_JitDisasm setting. Legacy captures without the field retain wildcard validation. Invalid explicit filters and mismatches remain errors even in audit mode; malformed listing groups remain incomparable. Builds on #457's existing native method-filter capture protocol rather than adding a launcher.

Validation on 1f8aeb1: all 127 Python tooling tests and seven focused comparator tests pass; whitespace check passes. Four current source/log files are size/SHA-256 verified under /Users/tom/git/Relayer-evidence/pr-456/1f8aeb1/manifest.json (local retention through PR cleanup). No docs impact: investigation tooling only. Production per-message cost unchanged, 0 B added.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 29d9c5ae-d5c2-4ae5-99c1-6c6cb883cc72
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@thomhurst

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T12:12:36.201274Z 04be62e New commits
ℹ️ 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.

@github-actions

Copy link
Copy Markdown

Review

Reviewed summarize_frozen_scope.py and its tests at the PR head.

  • Correctness: BENCHMARK and LAUNCHES exist in frozen_scope_control.py, so the import resolves. Launch ordering, scoped/unscoped grouping, runtime and diagnostic environment checks, and failed, missing or reordered outcomes are all validated strictly. Listings are hashed as raw bytes, so no normalization hides differences. Repeated compilations keep their order, and a missing method shows as None in the per-launch hash list. Partial listings are rejected via the Total bytes of code check, and stray text before the first listing is rejected.
  • Tests: The three tests cover changed immediates, reordered recompilations, missing methods, partial or garbage listings, and invalid launches (failed, truncated, reversed, wrong runtime, JIT disassembly off).
  • Project rules: This is CI tooling only, with no per-message production cost, no native-client reimplementation, and no docs impact, as the PR states.
  • Not checked: I did not run the tests or replay the comparator against the eight hosted captures. The PR cites a 123-test Python suite pass, and I have not verified that.

Nit, non-blocking: .read_text() has no explicit encoding. That is harmless for JSON on CI.

No actionable findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 152e9cf0f7

ℹ️ 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".

@thomhurst

Copy link
Copy Markdown
Owner Author

Both required reviews approve head 152e9cf; all review surfaces checked, with no inline threads or blocking findings. Disposition of Claude review #456 (comment): the explicit encoding suggestion is non-blocking and is declined for this cycle because it does not change JSON behavior on CI and does not justify another push.

Before promotion, independently reverified all 1,599 retained files against the manifest (size and SHA-256), with no unlisted files. Evidence remains at /Users/tom/git/Relayer-evidence/pr-456/152e9cf0f797cd338b0f0b1056582eddcb453655/manifest.json; manifest SHA-256: 4a23b4fbd3dbc345296cf49929b86ebc32b3fc1c4354a78316f98d7a16e3e961. Hosted originals remain linked in the PR body. Local retention ends at PR cleanup.

@thomhurst
thomhurst marked this pull request as ready for review November 10, 2026 09:03
@thomhurst
thomhurst enabled auto-merge (squash) November 10, 2026 09:03
@thomhurst
thomhurst marked this pull request as draft November 10, 2026 09:15
auto-merge was automatically disabled November 10, 2026 09:15

Pull request was converted to draft

@thomhurst

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: b9dcd4e88d

ℹ️ 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".

@github-actions

Copy link
Copy Markdown

Review of PR 456: no blocking issues.

  • summarize_frozen_scope.py imports BENCHMARK and LAUNCHES from frozen_scope_control, and both exist on base.
  • The comparison is strict. Listings are split per method and must have exactly one code-size footer, and repeated compilations keep their order. Hashes are over raw bytes, with no normalization or filtering.
  • Launch validation covers side order, the scoped flag, errors, the runtime environment and the JIT env vars. Audit mode only relaxes the listing parse, and it skips the whole group instead of comparing partial data.
  • The five tests cover changed immediates, reordered repeated compilations, missing methods, partial listings, unsupported benchmarks, and failed, reordered or wrong-runtime launches.
  • This is CI tooling only, so it adds no per-message cost and needs no docs change.
  • Nit, non-blocking: the PR description points at a local /Users/... evidence path that reviewers can't open. The hosted artifact links cover it.

@thomhurst

Copy link
Copy Markdown
Owner Author

The earlier wait on run 42787448489 is obsolete: that CI run was cancelled on superseded head 152e9cf. Both required reviewers now clear current head b9dcd4e; every review surface has been checked and there are no threads or blocking findings. Claude’s local-evidence-path nit is non-blocking: the body already links the hosted original artifacts, and the local retention limitation is explicit.

Independently reverified all 834 retained files against the current-head manifest, including sizes, SHA-256 hashes and absence of unlisted files. Manifest: /Users/tom/git/Relayer-evidence/pr-456/b9dcd4e88d67d4a26fd4918db580339694fd1525/manifest.json; SHA-256 817fa7b99c3b7b2b49a2dcc703dac304194d5db93b3d5bc86b447de3638f5443. Local retention ends at PR cleanup. Proceeding through guarded promotion and auto-merge.

@thomhurst
thomhurst marked this pull request as ready for review November 10, 2026 09:22
@thomhurst
thomhurst enabled auto-merge (squash) November 10, 2026 09:23
@thomhurst
thomhurst marked this pull request as draft November 10, 2026 09:30
auto-merge was automatically disabled November 10, 2026 09:30

Pull request was converted to draft

@github-actions

Copy link
Copy Markdown

Reviewed the head of #456. I found no actionable issues.

  • Correctness: summarize_frozen_scope.py splits listings on the method header and requires exactly one Total bytes of code line per block. It hashes each block's raw bytes, so repeated compilations and their order are preserved. Text before the first listing, partial blocks and non-UTF-8 identities all raise ValueError. Launch validation checks the side, scoped flag, launch index, per-launch error, file name, TieredCompilation=0 and the JIT filter on every launch. It also enforces the benchmark allow-list and the 8-launch count, so failed, missing, reordered or wrong-runtime captures are rejected.
  • Audit mode: it relaxes only listing-file integrity. A group with a malformed capture is reported as not comparable, with no partial comparison. Launch and runtime validation stay strict, and the tests cover this.
  • Tests: they cover changed immediates, repeated-compilation order, missing methods, partial listings, wrong filters, invalid launches and the audit path.
  • Repo rules: this is offline investigation tooling with no per-message cost. It adds no native-client reimplementation, no production code and no user-facing docs impact.

@thomhurst

Copy link
Copy Markdown
Owner Author

@codex review

@thomhurst

Copy link
Copy Markdown
Owner Author

Rechecked #442 under its driver-owned lock and renewed the in-progress claim. The quoted #457 run 42788193160 succeeded. All issue-442 branches are already published through #444/#454/#456/#457, with no unpublished worktree to recover. Native prerequisites and children remain empty. Main and these diagnostic PRs do not meet historical-attribution acceptance criteria, so closing #442, adding Closes to a partial diagnostic, treating it as a finished parent, or declaring it superseded would be incorrect. The remaining acceptance criteria still apply. No human/upstream/credentials/competing-lock blocker warrants deferral.

Worked linked #456 under its own lock, inspected reviews, inline comments, conversation comments and GraphQL threads (none), and restored draft before pushing 1f8aeb1 (remote head verified). Its existing comparator now validates and reports the native jitMethod filter; every launch must match exactly. Legacy wildcard captures remain supported. Invalid filters and failed launches are rejected even in audit mode; malformed listing groups remain incomparable. All 127 Python tooling tests and seven focused comparator tests pass; whitespace check passes. Codex review requested; Claude automatic. Sources/logs are size/SHA-256 verified at /Users/tom/git/Relayer-evidence/pr-456/1f8aeb1/manifest.json (local retention through PR cleanup). No production code/settings, thresholds or performance trade-off changed. No docs impact; per-message cost unchanged, 0 B added.

Filtered hosted run 42790849618 completed during this unit. Inspected every matrix artifact, retaining all 64 outcomes and original inputs. Seven successful families have valid exact-byte matches across all four processes in each scoped and unscoped group: Resolve (13 identities, including generated Dispatcher1.Resolve and native CallSiteRuntimeResolver.Resolve), GetService (3), GetRequiredService (1), DisposeAsync (1), Dispose (6), WorkloadActionNoUnroll (1), WorkloadActionUnroll (1). Repeated compilations and immediates remain unnormalized. VisitScopeCache fails launches 5–8 with Missing native JIT disassembly; the strict comparator rejects that protocol even in audit mode. Direct inspection of its four scoped files finds one valid matching identity, but is not a complete eight-launch comparison. No rerun or silent exclusion occurred.

All 24 downloaded executable inventories verify; all 6,484 retained files are size/SHA-256 verified. Full captures, exact comparison JSON, inputs and a file size/SHA-256 manifest are retained at /Users/tom/git/Relayer-evidence/pr-456/filtered-captures/manifest.json (local retention through PR cleanup); the eight hosted artifacts remain available from https://github.com/thomhurst/Relayer/actions/runs/42790849618 for 90 days. A matching named-filter listing does not prove execution equivalence or cover inlined/precompiled/dynamically generated code and process/image layout. The missing unscoped VisitScopeCache output does not prove absence of execution. Original unfavorable throughput/tiering-control observations remain unchanged, and no production defect or historical cause is established.

Next attribution work must distinguish the remaining unobserved compiled resolver/inlined or precompiled execution and image/layout effects, using the preserved binaries and generated runner source, rather than repeating the same captures or treating named-filter equality as causal proof. This unit publishes the explicit filter-protocol implementation and completed diagnostic analysis; it is not a renewed workflow-wait deferral. #442 remains open for historical attribution.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 1f8aeb1075

ℹ️ 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".

@thomhurst

Copy link
Copy Markdown
Owner Author

The quoted wait on CI run 42790205313 no longer applies: it was cancelled on superseded head b9dcd4e. Current head 1f8aeb1 is mergeable and has both required positive reviews: Claude run 42791567858/1 CLEAR and the current-head Codex completed summary with no findings. Reviewed every conversation comment, review body, inline comment and GraphQL review thread; there are no outstanding findings or threads.

Reverified all retained evidence against its file sizes and SHA-256 hashes: 1,599 original ScopeOnly files, 834 handler-resolution files, 6,484 filtered-capture files and four current-head source/test-log files. Current-head manifest: /Users/tom/git/Relayer-evidence/pr-456/1f8aeb1/manifest.json, SHA-256 f1063f3a85c813eb3b28e147d88396b22870a695e1fe895fbe3001e9dd30c9bc. Earlier manifests and hosted originals remain linked above; local retention ends at PR cleanup. Proceeding through guarded promotion and auto-merge rather than deferring the obsolete run. This PR remains a diagnostic contribution to #442, not its full historical-attribution acceptance criteria, so no closing keyword is added.

@thomhurst
thomhurst marked this pull request as ready for review November 10, 2026 09:37
@thomhurst
thomhurst enabled auto-merge (squash) November 10, 2026 09:37
@thomhurst
thomhurst force-pushed the issue-442-code-comparison branch from 1f8aeb1 to 04be62e Compare November 10, 2026 12:11
@github-actions
github-actions Bot disabled auto-merge November 10, 2026 12:11
@github-actions

Copy link
Copy Markdown

Review of #456: CLEAR

I read the diff and checked it against AGENTS.md. I did not run the tests; the sandbox blocked the compound command I tried.

  • Scope: this is internal Python tooling under .github/scripts. It is not on the per-message path, so the performance budget and docs rules don't apply. The PR's "no docs impact" statement is reasonable.
  • Reuse: BENCHMARK and LAUNCHES are imported from frozen_scope_control.py, and I confirmed both exist there. The comparator uses SHA-256 and the native diffable JIT text, so no parallel implementation is built.
  • Correctness: the comparator hashes whole listing blocks per method identity and keeps repeated compilations in order. It requires exactly one Total bytes of code line per block and rejects text before the first listing. It checks that all 8 launches have the expected side, scoped flag, launch index, no error, tiering off, matching JIT filter and diffable flag. The default mode rejects malformed listings, while --audit skips the whole group and never compares a partial listing.
  • Tests: they cover changed immediates, repeated-compilation order, missing methods, partial listings, wrong filter on any launch, invalid filter values, and failed, missing, reordered or wrong-runtime launches. That is adequate for this tool.
  • Minor, not blocking: the PR description is cut off mid-path and references a local /Users/tom/... evidence location. Consider tidying that text.

@thomhurst

Copy link
Copy Markdown
Owner Author

The earlier wait on CI run 42792263966 is obsolete: it failed on superseded head 1f8aeb1. Current head 04be62e has passed CI run 42813632791, Claude review 42813629267/1 CLEAR, and the current-head Codex completed summary with no findings. Rechecked every review surface; no outstanding review bodies, inline comments or review threads exist.

Disposition of Claude comment #456 (comment): its description/evidence-path suggestion is non-blocking. The current body contains the complete paths, hosted artifact links and explicit local-retention limits; no code push is warranted.

Independently reverified all 8,921 retained files against their sizes and SHA-256 hashes, with no unlisted files. The comparator and test source at this head exactly match the retained tested sources under /Users/tom/git/Relayer-evidence/pr-456/1f8aeb1/manifest.json (manifest SHA-256 f1063f3a85c813eb3b28e147d88396b22870a695e1fe895fbe3001e9dd30c9bc). The original ScopeOnly, handler-resolution and filtered-capture manifests remain verified at the previously cited locations; local retention ends at PR cleanup. Current-head CI supplies fresh validation without repeating unchanged local tests.

Proceeding through the guarded merge wrapper. This diagnostic PR does not meet the remaining historical-attribution criteria of #442, which stays open; no closing keyword is appropriate.

@thomhurst
thomhurst merged commit da17d05 into main Nov 10, 2026
10 checks passed
@thomhurst
thomhurst deleted the issue-442-code-comparison branch November 10, 2026 12:37
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