Skip to content

[AUTOMATED] ci: scope the workspace suite to fork PRs and to main - #274

Merged
mahaloz merged 3 commits into
mainfrom
ci/internal-pr-scope
Aug 8, 2026
Merged

mahaloz merged 3 commits into
mainfrom
ci/internal-pr-scope

Conversation

@mahaloz

@mahaloz mahaloz commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Why

One push to this repo fans out ~10 concurrent jobs: 2 from this workflow plus CodeQL default setup's 8 configured languages (actions, c-cpp, java-kotlin, javascript, javascript-typescript, python, rust, typescript).

On 2026-08-06 that exhausted the runner pool. Eight jobs were created inside a 33-second window and exactly four got runners. The other four — parity gates, Analyze (c-cpp), Analyze (python), Analyze (rust) — sat 98–101 minutes and were swept. The API record for the gates job:

"conclusion": "cancelled",
"runner_id":   0,
"runner_name": "",
"steps":       [],
"created_at":  "2026-08-06T17:17:41Z"   <- identical to started_at
"completed_at":"2026-08-06T18:56:17Z"

runner_id: 0 with started_at == created_at and zero step records is the signature of a job that was never dispatched. Not one of its nine steps ran. It presented PR #272 as red having executed no code at all, and the same commit passed in 3m31s on the next attempt.

(Two independent confirmations that this was supply, not workload: the sibling cargo workspace suite job in the same run got a runner in 37s and passed; and Analyze (python) — which a Rust change cannot touch — starved identically. The uniform ~100-minute death across two workflows with different timeout-minutes (90 here, CodeQL's default 360) also rules out a per-job timeout as the trigger.)

What this does

Halve this workflow's share of that demand.

cargo workspace suite — a debug build of the whole workspace plus ~4300 tests, the long pole at 6–9 min — no longer runs on a pull request from a branch in this repo. Those are the automated agent PRs, where AGENTS.md already requires make rust-test green locally before the commit, so the job re-derives an answer we already have.

It still runs, unchanged, on:

Trigger Why
every push to main the safety net — the suite always runs on the merge commit, so nothing reaches main without it; the answer just arrives at merge rather than before it
a PR from a fork the case nobody ran locally
any PR labelled full-ci per-PR escape hatch, no workflow edit needed
workflow_dispatch manual
if: >-
  github.event_name != 'pull_request'
  || github.event.pull_request.head.repo.fork
  || contains(github.event.pull_request.labels.*.name, 'full-ci')

parity gates is untouched and still runs on every event — 2.3–3.2 min, and it is the cheap net that catches the common regression (make test, make test-stages, make check-spec, kuna catalog --check, and the browser Worker boundary).

Trade-off, stated plainly

An internal PR no longer proves make rust-test before merge — the author does. If an agent skips it locally, the failure now surfaces on main instead of on the PR. That is the deal being made; docs/agents.md is updated to say so explicitly, so the obligation is written down where the four gates are listed rather than assumed.

full-ci is the escape hatch when a particular internal PR warrants the pre-merge proof anyway.

Verification

  • .github/workflows/tests.yml parses (PyYAML); gates carries no if:; the rust-test condition retains all three clauses.
  • Both jobs' step lists are unchanged.

One assertion pulled forward

Skipping the suite defers everything in it to the push to main. One of those is worth keeping pre-merge: kuna-decomp/tests/options_md_fresh.rs, which asserts docs/options.md is the catalog generator's exact bytes. Forgetting to regenerate it after touching option metadata is a routine miss — AGENTS.md calls it out by name — and it should land on the PR, not on main.

kuna catalog --check (already in this job) proves options.md documents the same option set; it does not prove the bytes match. A new gates step does, by diffing against kuna catalog --markdown. It reuses the release binary the job already built, so it costs nothing. Verified both directions locally: byte-identical tree passes; a one-line append to docs/options.md fails with the ::error annotation.

Not included

CodeQL owns 8 of the ~10 jobs, so it is the larger half of the problem — but it is default setup (repo Settings), not a file in this repo, and its REST API does not accept rust as a language value, so trimming it from here would silently drop Rust scanning. Left alone deliberately; it needs a Settings-UI edit.

🤖 Generated with Claude Code

https://claude.ai/code/session_014ZfprhsXxBXEM1sMP1XX8d

mahaloz and others added 3 commits August 8, 2026 07:04
One push to this repo fans out ~10 concurrent jobs: 2 here plus CodeQL
default setup's 8 configured languages. On 2026-08-06 that exhausted the
runner pool -- four of them (parity gates, Analyze c-cpp/python/rust) sat
98-101 minutes with runner_id 0 and zero steps recorded, were swept, and
presented PR #272 as red having executed no code at all.

Halve this workflow's share of that demand. The `cargo workspace suite`
job -- a debug build of the whole workspace plus ~4300 tests, the long
pole at 6-9 min -- no longer runs on a pull request from a branch in this
repo. Those are the automated agent PRs, where AGENTS.md already requires
`make rust-test` green locally before the commit, so the job re-derives an
answer we already have.

It still runs, unchanged, on:
  - every push to main (the safety net: the suite always runs on the merge
    commit, so nothing reaches main without it -- the answer just arrives
    at merge rather than before it),
  - a pull request from a FORK (the case nobody ran locally),
  - any PR labelled `full-ci` (the per-PR escape hatch, no workflow edit),
  - workflow_dispatch.

The parity gates are untouched and still run on every event: 2.3-3.2 min,
and they are the cheap net that catches the common regression.

docs/agents.md records that the author, not CI, is the pre-merge gate for
`make rust-test` on an internal PR.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_014ZfprhsXxBXEM1sMP1XX8d
…ity gates

Skipping the workspace suite on internal PRs defers every assertion in it to
the push to main. One of those is worth keeping pre-merge:
kuna-decomp/tests/options_md_fresh.rs, which asserts docs/options.md is the
catalog generator's exact bytes. Forgetting to regenerate it after touching
option metadata is a routine miss -- AGENTS.md calls it out by name -- and it
is the kind of failure that should land on the PR, not on main.

`kuna catalog --check` (already in this job) proves options.md documents the
same option SET; it does not prove the bytes match. The new step does, by
diffing against `kuna catalog --markdown`. It reuses the release binary the
job already built, so it costs nothing.

Verified both directions locally: byte-identical tree passes; a one-line
append to docs/options.md fails with the ::error annotation.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_014ZfprhsXxBXEM1sMP1XX8d
The escape hatch as written could not be used the way it was documented.
`pull_request` defaults to types opened/synchronize/reopened, so adding a
label fires nothing -- and re-running a finished run REPLAYS ITS ORIGINAL
PAYLOAD, so a label added after the fact is invisible to the `if:` too.
The only way to be believed was to push a commit, which is not an escape
hatch.

Add `labeled` to the trigger. The label alone now starts a run whose payload
carries it, `contains(github.event.pull_request.labels.*.name, 'full-ci')`
sees it, and the suite runs. `unlabeled` is deliberately omitted so removing
a label re-runs nothing; the cost is one extra run per label added to a PR,
which is rare here.

Comments and docs/agents.md corrected to match.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_014ZfprhsXxBXEM1sMP1XX8d
@mahaloz mahaloz added full-ci Run the full cargo workspace suite on this PR before merge (internal PRs skip it by default) and removed full-ci Run the full cargo workspace suite on this PR before merge (internal PRs skip it by default) labels Aug 8, 2026
@mahaloz
mahaloz merged commit 82dd39a into main Aug 8, 2026
11 checks passed
@mahaloz
mahaloz deleted the ci/internal-pr-scope branch August 8, 2026 07:21
mahaloz added a commit that referenced this pull request Aug 12, 2026
…hile the catalog is 103

`main` is red on the cargo workspace suite at 80f8f29:

    thread 'fixture_has_all_102_settables' panicked at
    crates/kuna-decomp/tests/catalog_bytecompat.rs:82:5:
    assertion `left == right` failed
      left: 103
     right: 102

Nothing is wrong with the catalog. `phases.toml` has 103 settable rows, the fixture
`tests/fixtures/phase_catalog.json` carries 103, and `kuna_phases/tests.rs` correctly
asserts 103. Only this one test's three hard-coded copies of the same number were left
behind: #287 regenerated the fixture and bumped `kuna_phases/tests.rs`, but did not touch
`catalog_bytecompat.rs`, which #290 had last set to 102.

This is the fourth time this class of counter has broken in two days -- three of the four
during the round-4 merge train, where `main` and a branch had made the identical
`N -> N+1` edit and git auto-merged them silently at the wrong value with no conflict
marker. It reaches `main` because the workspace suite is skipped for internal PRs
(#274), so nothing runs it until after the merge.

Exactly one test failed in the whole CI run and the spec-tree guards never fired, so this
assert is the entire breakage.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01C8UQbPqALzdUQ3cLLjUeKH
mahaloz added a commit that referenced this pull request Aug 12, 2026
…hile the catalog is 103 (#292)

`main` is red on the cargo workspace suite at 80f8f29:

    thread 'fixture_has_all_102_settables' panicked at
    crates/kuna-decomp/tests/catalog_bytecompat.rs:82:5:
    assertion `left == right` failed
      left: 103
     right: 102

Nothing is wrong with the catalog. `phases.toml` has 103 settable rows, the fixture
`tests/fixtures/phase_catalog.json` carries 103, and `kuna_phases/tests.rs` correctly
asserts 103. Only this one test's three hard-coded copies of the same number were left
behind: #287 regenerated the fixture and bumped `kuna_phases/tests.rs`, but did not touch
`catalog_bytecompat.rs`, which #290 had last set to 102.

This is the fourth time this class of counter has broken in two days -- three of the four
during the round-4 merge train, where `main` and a branch had made the identical
`N -> N+1` edit and git auto-merged them silently at the wrong value with no conflict
marker. It reaches `main` because the workspace suite is skipped for internal PRs
(#274), so nothing runs it until after the merge.

Exactly one test failed in the whole CI run and the spec-tree guards never fired, so this
assert is the entire breakage.


Claude-Session: https://claude.ai/code/session_01C8UQbPqALzdUQ3cLLjUeKH

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
mahaloz added a commit that referenced this pull request Aug 13, 2026
…inst a 103-row table (#291)

PR #287 (ifuncfpret) added the 103rd settableTable row and bumped both
`phases.toml` and `kuna_phases/tests.rs`, but not the third counter in
`tests/catalog_bytecompat.rs`, so `make rust-test` has been red on main
since that merge:

    fixture_has_all_102_settables ... FAILED
    assertion `left == right` failed
      left: 103
     right: 102

CI did not catch it because internal pull requests skip the workspace
suite (#274), which leaves the author as that gate.

Also renames `surface_count_is_101`, which has asserted 102 since the
surface table last grew, so the test name stops contradicting its body.
No production code changes; counts only.


Claude-Session: https://claude.ai/code/session_01XTrU5w3qoWMyu38FprpfXZ

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
mahaloz added a commit that referenced this pull request Aug 17, 2026
… arg

[AUTOMATED] Base breakage ridden in with #310 (decompile-all source
provenance): `decompile_targets` gained `want_provenance` and every
production caller was updated, but this kuna-console integration test was
not — and internal-PR CI skips the workspace suite (#274), so main's
`make rust-test` is red.  One-line call-site fix, no behavior change.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC
mahaloz added a commit that referenced this pull request Aug 18, 2026
… arg

[AUTOMATED] Base breakage ridden in with #310 (decompile-all source
provenance): `decompile_targets` gained `want_provenance` and every
production caller was updated, but this kuna-console integration test was
not — and internal-PR CI skips the workspace suite (#274), so main's
`make rust-test` is red.  One-line call-site fix, no behavior change.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC
mahaloz added a commit that referenced this pull request Aug 18, 2026
…ent providers (real names in the GUI) (#318)

* feat(p0/infra): Phase-3 lazy wire-backed provider seams in the engine

[AUTOMATED] The kuna-decomp half of ghidra-mode Phase 3 (the ScopeGhidra /
TypeFactoryGhidra / CommentDatabaseGhidra port, relocated to the seams the
kuna pipeline actually reads):

- infra/remote_provider.rs (new): RemoteScope — getMappedSymbols
  query-through at the GlobalQuery boundary with <hole> negative caching,
  decoded-entry positive caching, readonly/volatile property paints over a
  lockDefaultProperties snapshot, getNamespacePath scope paths, wire
  symbol-id capture; the <doc>/<mapsym>/symbol-family decoder
  (<symbol>/<function>+<prototype>+<localdb> cat-0 params/<functionshell>/
  <labelsym>/<externrefsymbol>/<equatesymbol>/<facetsymbol>); the
  RemoteProviderFetch wire seam trait; fill_comments (getComments,
  printer-filtered, fill-once-per-flush).  Upstream-numbered wire ids
  (69-81, 161, 169, 172, 228 + attribute set).
- substrate/context.rs: ArchContext.remote_scope +
  effective_global_query — every global read (properties, names, types,
  containers, query_callee_proto, query_function) queries through the
  provider when installed; callee_proto_pieces returns owned (single call
  site adapted).
- infra/decompile_drive.rs: ArchFlowEnv query_call / query_call_no_return
  remote arms (callee names + noreturn flow truncation from mapsym facts).
- substrate/dtype.rs: the wire type decode (decode_core_types /
  decode_type / decode_type_no_ref with incomplete-stub recursion
  protection for composites), the RemoteTypeFetch getDataType miss-hook in
  find_by_id_or_remote, clear_noncore (the flushNative eviction).
- infra/architecture.rs: install_remote_provider / flush_remote_caches /
  printer_comment_filter / set_coretypes_xml (buildCoreTypes decodes the
  wire <coretypes> when present, so kuna's core-type ids match the host);
  decode_ghidra_tracked_sets — the pspec <tracked_set> (x86-64 DF=0)
  decodes into the trackbase in ghidra mode too, resolving registers
  through the query-backed translator, so ActionConstbase plants the
  string-op direction seed.
- p0_knowledge/options.rs: OptionDatabase::decode_lenient — the DIV-76
  setOptions divergence (apply known options, skip unknown elements whole
  with a "Warning:" line instead of failing the list).
- p0_knowledge/database.rs + fspec/printc/flow/outline: the KunaNameStyle
  enum (Func|Angr|Ghidra) threaded through the address-derived fallback
  naming sites (FUN_/DAT_/LAB_ under ghidra mode, DIV-77); behavior-
  neutral on the standalone path (name_style_ghidra never set).

Unit tests: the mapsym/hole/namespace decoders over hand-built packed
docs, a VENDORED real Ghidra 12.1.2 DecompileDebug capture of fmt main's
getMappedSymbols answer, the coretypes XML-mirror equivalence, and the
lenient optionslist decode.

Standalone parity: make test 675/675 PARITY OK, make test-stages PARITY
OK (no provider installed => every seam takes its frozen-snapshot branch
byte-identically).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC

* feat(ghidra): activate the Phase-3 providers + sim mapsym answers + pin flips

[AUTOMATED] The kuna-ghidra half of Phase 3:

- provider.rs: GhidraRemoteFetch — RemoteProviderFetch + RemoteTypeFetch
  over the SharedClient (getMappedSymbols / getNamespacePath / getComments
  / getDataType as re-entrant nested queries).
- translate.rs: GhidraRegisterLookup — the query-backed register resolver
  installed on the ghidra-mode AddrSpaceManager (the mirror of
  Sleigh::install_register_lookup).  Without it the naming pass's
  is-register test (manage().register_lookup()) fails open and every
  register-storage high misclassifies as global data, rendering raw
  EAX/RBX tokens — the single largest GUI-quality defect.  GhidraTranslate
  delegates its RegisterLookup to the shared adapter; the adapter's Weak
  manager back-pointer wires lazily so init-time manager_mut stays sound.
- process.rs: registerProgram decodes the wire <coretypes>, applies the
  aggressive ENGINE-TIER preset + FUN_/DAT_/LAB_ fallback naming (DIV-77),
  and installs the providers; decompileAt resolves the current function's
  identity (name + locked prototype pieces) through getMappedSymbols with
  getCodeLabel demoted to fallback, and fills the per-function comment
  cache; setOptions decodes and applies for real via decode_lenient
  (DIV-76); flushNative clears the provider caches in the upstream order.
- ghidra-sim: the oracle answers getMappedSymbols/getExternalRef with real
  <doc><mapsym>/<hole> documents built from its committed program facts
  (functions + locked libproto prototypes + noreturn, data symbols,
  section mutability), getDataType from its own factory, and sends the
  default-mirroring full <coretypes>; a new flushNative cache-clearing
  test proves a changed host answer lands after a flush.

Faillog pins re-measured (the Phase-2 GUI gap -> Phase 3), same base:
  register leaks   106 / 64 / 60  -> 0 / 0 / 0
  Unique tokens     32 /  2 /  8  -> 0 / 0 / 0
  resolvable ph.    24 / 18 / 14  -> 0 / 0 / 0
  placeholders      49 / 25 / 17  -> 27 / 4 / 3  (only oracle-unnamed left)
  diff-vs-CLI     .643/.898/.811 -> .175/.220/.264 (style-normalized)
  getPcode total  1477 -> 1314, decoded insts 1003 -> 801 (noreturn
  truncation stops the flow overrun), getMappedSymbols 0 -> 1448.
  Mangled tokens 21/13/7 -> 57/12/24 (ctypes preset spells more multi-word
  types; PR-C's declarator-token split drives these to 0).

[AUTOMATED] Rebasing onto origin/main picked up ~14 engine-changing
commits (#303-#316 + #310 provenance); re-measured, only base drift moved:
c_lines 274/41/91 -> 282/38/91, mangled 57/12/24 -> 57/10/24, ratios
0.175/0.220/0.264 -> 0.170/0.184/0.264 (inside the pinned band).  Every
Phase-3 zero (registers/Unique/resolvable) and every traffic pin
(getPcode 1314, decoded 801, getMappedSymbols 1448) is unchanged.  The
harness module docs updated from the Phase-2 framing to the shipped
Phase-3 state.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC

* docs(ghidra): Phase-3 spec prose, integration-doc state, DIV-76/DIV-77

[AUTOMATED] The spec-live half of Phase 3: the lazy-provider walk in
docs/spec/00-overview.md (RemoteScope seams, type/comment/tracked-set
decode, flushNative order, setOptions leniency, the ghidra naming style),
the third-style naming note in docs/spec/09-emission.md,
docs/ghidra-integration.md sections 5/9/12 flipped to the shipped state,
and the two DIV rows in docs/history.md: DIV-76 (setOptions skip-unknown
per element) and DIV-77 (ghidra-mode aggressive engine-tier preset +
FUN_/DAT_/LAB_ fallback naming).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC

* fix(test): verify_relocrebase missed the decompile_targets provenance arg

[AUTOMATED] Base breakage ridden in with #310 (decompile-all source
provenance): `decompile_targets` gained `want_provenance` and every
production caller was updated, but this kuna-console integration test was
not — and internal-PR CI skips the workspace suite (#274), so main's
`make rust-test` is red.  One-line call-site fix, no behavior change.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC

* fix(ghidra): review round — name/label split, setOptions reset, callee
model, externref resolution, wired tracked registers + the Kuna banner

[AUTOMATED] The adversarial review of PR #318 confirmed six defects; all
fixed, plus the user-requested version banner:

1. name/label conflation (HIGH): a <function name= label=> answer collapsed
   into one field preferring the LABEL, so fd.encode echoed the label and
   Java's HighFunction.decode would throw "Function name mismatch" whenever
   the default-on TemplateSimplifier sent one.  RemoteFunctionFacts now
   carries BOTH (raw `name` = the Funcdata identity/echo, `display_name` =
   what prints); decompileAt passes the raw name to decompile_func_full and
   sets the display form via the new Funcdata::set_display_name — the
   upstream name/displayName split.
2. setOptions reset-then-apply (HIGH): upstream calls resetDefaults()
   before decoding (ghidra_process.cc:435-445) because Java DELTA-encodes
   options — a previously-sent non-default value must revert when set back
   to default.  New Architecture::reset_wire_defaults (engine defaults +
   printer PrintContext reset) + the DIV-77 preset layer re-applied
   (apply_ghidra_mode_defaults) at the top of every SetOptions.
3. locked callee model dropped (MED): <prototype model=…> decoded but
   flattened away.  The parked TypeCode now builds under the host-declared
   model (TypeFactoryImpl::get_type_code_proto_model) and
   ActionDefaultParams seeds seed_locked_from_pieces with it
   (ArchContext::callee_proto_model; standalone returns None, byte-
   identical) — a __fastcall-style callee gets the right storage.
4. external refs never resolved (MED): the <externrefsymbol> resolve
   <addr> was discarded and getExternalRef never fired.  The decode keeps
   the refaddr, the pointer symbol types as pointer-to-code, and
   ensure_queried runs the upstream two-step (resolveExternalRefFunction,
   database_ghidra.cc:327-353): getExternalRef at the POINTER address,
   the answered function materialized at its own entry.
5. tracked registers pspec-static only (MED): ContextGhidra is wired for
   real — decompileAt issues getTrackedRegisters at the entry
   (RemoteScope::tracked_at, cached until flushNative) and merges the
   host's values OVER the pspec defaults before the decompile, so
   per-address host context (MIPS gp, PPC TOC, user 'Set Register Value')
   reaches ActionConstbase.  The sim serves its real context db + a
   tracked_overrides hook; a new e2e proves a host-side tracked RSI value
   changes the output.
6. LOW trio: a wire/JavaError inside a lazy query now negative-caches the
   address for the flush epoch and surfaces ONE "Warning:" 16/17 line
   (RemoteScope::cache_failure/drain_warnings) instead of re-querying
   unboundedly; a <type> with no size attribute errors instead of
   interning a 0-sized datatype (WireTypeAttribs Default size -1); the
   readonly/volatile paint of a symbol ending at the top of its space uses
   the open-range end instead of wrapping to 0 and painting nothing.

NEW (user request): ghidra-mode stamps a `Kuna v<version>` plate comment
at the top of EVERY decompiled function (visible in the GUI that kuna is
the active core).  Cache-only HEADER comment (never written back, never
on the 16/17 frame); version baked like the kuna CLI (KUNA_VERSION from
the release matrix, workspace version on dev).  The printer's
emit_comment_func_header grows the upstream plate arm (renders HEADER
comments — also the host's getComments PLATE fills; the standalone
pipeline never inserts HEADER comments, so it is inert there).  Verified
LIVE in Ghidra 12.1.2: `/* Kuna v0.1.0 */` opens fmt/main.

Harness: banner presence asserted per function; the CLI differential
strips the banner line; c_lines pins +1 (283/39/92); new unit tests for
the externref two-step + name/label split, tracked caching, and failure
negative-caching over a canned wire fetcher.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC

* fix(ghidra): delta-review round — tracked-register revert over a pristine
base, full printer reset coverage, failure-channel separation

[AUTOMATED] The five residual findings from the delta review of b9262c7:

F1 (MED): the decompileAt tracked merge wrote wire-over-CURRENT into the
persistent trackbase, so a value the host stopped reporting (user clears
'Set Register Value') survived every flush until deregisterProgram.  The
merge now applies wire-over-PRISTINE: RemoteScope::pristine_tracked_for
captures the pre-merge set the FIRST time an address is merged (stored
OUTSIDE the flush-cleared state — it is session-stable pspec truth) and
every epoch merges the wire answer over that base; the write also fires
for an EMPTY wire answer once an address was ever merged (the revert
case).  New e2e ghidra_sim_tracked_override_reverts_after_flush: override
-> decompile -> flush -> remove override -> decompile reverts to the
never-overridden baseline byte-for-byte (the flush-epoch session helper
generalized to pre + at-arm oracle mutators; the label-override test now
rides the same helper).

F2 (LOW): reset_wire_defaults also resets the PrintC-proper state the
wire options mutate — PrintC::reset_wire_option_defaults restores the
PrintCOptions block (nullprinting, inplaceops, conventionprinting,
nocastprinting, hideimpliedexts, the four brace formats + the kuna
rendering toggles, whose construction defaults ARE the shipped defaults)
and the emitter indent increment (Java default 2).  The doc comment now
states the exact coverage: engine defaults + PrintContext + PrintC
options + indent are covered; the action-database default-group reset
stays the shared STUB(W5), and maxlinewidth/commentstyle are recorded
no-op printer stubs with no state to reset.

F3 (LOW): tracked/externref failures no longer hole the getMappedSymbols
negative cache — note_failure warns without holing (their own caches
already bound re-asks: tracked_at caches even empty answers per address,
resolve_external_ref fires once per decoded answer); only a failing
SYMBOL query holes (cache_failure).

F4 (nit): the decompileAt tracked upper bound uses the
Range::get_last_addr_open open-end pattern instead of
offset.wrapping_add(1), so an entry at the very top of its space cannot
wrap the bound to 0.

F5 (nit): the callee_models field doc now states that defaultfp
fallbacks are recorded too (the consumer's unwrap_or(defaultfp) is
equivalent either way).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AfGYKwUWvPYYj1Aw7tcLhC

---------

Co-authored-by: Claude Fable 5 <[email protected]>
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