Skip to content

fix(kuna)!: separate verification policy from analysis identity - #8699

Merged
morluto merged 4 commits into
mainfrom
codex/kuna-policy-profile
Nov 2, 2026
Merged

morluto merged 4 commits into
mainfrom
codex/kuna-policy-profile

Conversation

@morluto

@morluto morluto commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Recommend and verify Kuna 1.989 and separate REA's verification policy from the analysis profile. Previously, changing the recommended release changed an unchanged executable's profile, causing snapshot binding to fail (#8690). The profile continues to commit the executable version, digest and result-affecting settings; fresh observations and dossiers report unverified releases as limitations.

This PR combines the version bump from #8691 and the profile change into one breaking transition. The user accepted the one-time incompatibility. It prevents future policy-only mismatches for new-format snapshots; it does not make existing snapshots match.

Compatibility and recovery

Existing Kuna snapshots and resumable decompile_all directories contain the old verified_release profile parameter and will not match, even with the same executable. Existing files are not modified. Open the binary without the old snapshot and save a new one, or choose a new output directory. The guide includes a tested jq extraction and rea evidence-import command for historical Evidence. This validates the extracted bundle, not the rest of its snapshot; it does not restore cached workflow entries or resume an old export. No compatibility shim or silent rebind is introduced. The separate design question for native snapshot recovery is #8655.

Verification compares the reported version and does not authenticate executable bytes. REA continues to use a caller-supplied Kuna; it does not install or bundle it.

Evidence and validation

  • The 1.989 macOS arm64 release archive matched GitHub's published asset SHA-256 (not independent authentication). Real npm run verify:kuna passed on generated symbol-bearing and stripped Mach-O fixtures, exercising cold and warm reads, references and complete cleanup. Real doctor identified 1.989 as verified and allowed 1.988 as unverified.
  • Real Kuna 1.988, macOS arm64, compact MCP: new-format snapshots reopened across both directions of a simulated verification-policy change with the same profile digest. Historical Evidence remained equal as parsed JSON; fresh Evidence reflected the new warning. Different executable version and different jobs controls were rejected by snapshot binding.
  • Real compact MCP directory export/resume across both policy transitions preserved first-run records and warnings, skipped five completed functions and wrote five new ones with the current policy. A pre-change snapshot and directory were rejected; the old directory files stayed unchanged.
  • Real 1.988 and 1.989 full and compact MCP controls: unverified 1.988 carried the warning in complete dossier, Evidence, summary and retained pseudocode view; 1.989 did not. A jq extraction of an old snapshot followed by rea evidence-import validated one historical record and left the source snapshot unchanged.
  • Focused Kuna installation, doctor and provider tests: 68 passed. Seven affected provider/MCP consumer files: 47 passed. The new regression fails on the parent branch because it still puts verified_release in the profile. check:fast, docs:check, formatter and git diff --check passed; docs:check was rerun after the extraction example.
  • Kuna 1.989 still exhibits the size-dependent mode behavior in [Design] Make Kuna automatic analysis mode and its limits visible #8683 and REA's call-graph coverage gap [Bug] Kuna call paths can report complete negative despite omitted direct calls #8362; this version bump does not claim to fix either. Targets were not executed. Linux, Windows, broader provider releases and autonomous-agent behavior were not tested.

Scope

The Kuna provider owns identity and observation limitations. This remains existing static-provider behavior: no executable installation, target execution, new provider capability, new schema, or automatic migration. The one-time legacy snapshot limitation remains explicit in #8690.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

MCP warning regression

The existing SDK-client/production-server batch integration now checks that an unverified fake Kuna warning reaches composed batch Evidence and a retained pseudocode view, while the provider profile omits the policy flag. The focused test and check:fast passed. On the 1.989-bump parent, the same test failed because the batch omitted the warning. The real 1.988/1.989 MCP controls above cover provider behavior; this is a controlled-provider integration regression.

Composed workflow snapshot control

With real Kuna 1.988 in compact stdio MCP, a new-format snapshot saved trace_call_path and binary_overview Evidence while 1.988 was marked verified. After changing only the prototype's verification policy to 1.989, reopening against the same executable and target preserved both historical records exactly as parsed JSON. Fresh calls returned distinct Evidence IDs with the unverified warning. The saved snapshot had zero primitive and zero workflow cache entries, so the control demonstrates fresh composed results and historical retention, not replay of cached workflow entries. The owned target was not executed.

CLI control

Real rea decompile --provider kuna --json on the owned 2 MiB Mach-O with Kuna 1.988 and 1.989 produced the unverified warning only for 1.988; neither output profile contained verified_release. Repeating with an older 1.988 snapshot returned exit 1 and evidence_integrity_mismatch; the snapshot digest was unchanged. The target digest also stayed unchanged. This is a macOS arm64 single-function control; the MCP and directory controls above cover additional paths.

Stored-pointer reference control

Real Kuna 1.989 still reports a chained-fixup pointer on the owned pointer-only Mach-O in #8510, while REA's xrefs and feature trace omit it in both MCP profiles. dyld_info independently confirmed the rebase; the target was unchanged and not executed. The upgrade does not fix that existing reference-projection gap.

@morluto
morluto changed the base branch from codex/kuna-1989 to main November 2, 2026 17:13
@morluto morluto mentioned this pull request Nov 2, 2026
3 tasks
@greptile-apps

greptile-apps Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge, with the documented one-time snapshot incompatibility.

Summary

Separates Kuna’s verification policy from analysis identity and recommends Kuna 1.989.

  • Kuna profile identity follows analysis inputs, not verification policy.
  • REA now treats Kuna 1.989 as its verified release.

No actionable new issues or repository-rule violations were found. The latest change adds tests only; it adds no executable installation, target execution or permission changes. Tests were not run during this review. The supersession check could not complete because GitHub authentication was unavailable.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Executable["Executable version, digest and settings"] --> Profile["Analysis profile"]
  Profile --> Binding["Snapshot binding"]
  Policy["Current verified-release policy"] --> Warning["Observation warning"]
  Warning --> Evidence["Evidence and dossier"]
  Evidence --> Views["Batch and retained views"]
Loading

Reviews (2) · Last reviewed commit: "test(kuna): cover verification warnings ..." · Reviewed by Greptile

@morluto
morluto marked this pull request as ready for review November 2, 2026 17:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 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-11-02T17:20:52.874852Z f8f496f 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.

@morluto
morluto merged commit 75c3cab into main Nov 2, 2026
48 of 56 checks passed
@morluto
morluto deleted the codex/kuna-policy-profile branch November 2, 2026 17:34
@greptile-apps greptile-apps Bot mentioned this pull request Nov 2, 2026
3 tasks done
@morluto morluto added area: tests Test suite and verification bug Something isn't working provider: kuna Analysis provider / engine: kuna labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification bug Something isn't working provider: kuna Analysis provider / engine: kuna

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant