Skip to content

Recover decompiled request fallbacks - #1

Open
suir1 wants to merge 4 commits into
mainfrom
agent/recover-decompiled-request-fallbacks
Open

suir1 wants to merge 4 commits into
mainfrom
agent/recover-decompiled-request-fallbacks

Conversation

@suir1

@suir1 suir1 commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • recover complete decompiled preference contracts and preserve them across AI repair rounds
  • recover page-request bypass behavior during Decompiled Analysis as typed PageRequestBypass facts in SourceIR v8
  • make RequestPolicy consume typed SourceIR facts only; it no longer scans JADX files or guesses URL joins from Rust variable names
  • exclude credential, cookie, API-key, device-identity, token, and JWT-shaped literal headers before they can enter SourceIR or generated packages
  • keep apply_generation_manifest as a pure materializer of the already-audited effective Generation Manifest
  • allow zero-repair resume and revalidation without requiring or constructing an AI provider
  • reject syntactically invalid normalized Rust generation and targeted repairs before compiler execution

Why

The Baozi APK regression exposed request behavior that was initially recovered too late and spread across compatibility rules. The final design keeps raw JADX interpretation in Decompiled Analysis, stores the recovered network policy in SourceIR, and leaves generation projection and materialization with explicit, auditable inputs. No source ID, site-domain, or Baozi endpoint dispatch was added.

Impact

The saved DeepSeek Baozi conversion resumes with no C2A_API_KEY, performs zero provider calls, excludes sensitive literal request headers, and reaches verified: listing, seven filters, details, chapters, cover, bypass page parsing, first image, WASM build, package, and aidoku verify all pass. Independent c2a validate also returns verified.

Current PR size relative to main:

  • production/docs: +802/-130 (net +672)
  • tests: +825/-21 (net +804)
  • total: +1627/-151 (net +1476)

This includes all three commits in the Draft PR, not only the final architecture repair.

Validation

  • uv run pytest -q — 599 passed, 9 explicitly skipped Rust integration tests
  • C2A_RUN_RUST_INTEGRATION=1 uv run pytest -q tests/test_rust_integration.py — 9 passed
  • uv run ruff check .
  • uv run ruff format --check .
  • uv build
  • API-key-free Baozi c2a convert --resume --max-repairs 0 — verified, zero provider calls
  • sensitive-header scan over generated Rust/resources — no Authorization, device ID, tsid, or JWT values
  • independent Baozi c2a validate through Mihomo — verified
  • dev-pipeline correctness and design reviews — pass, zero findings

Migration and risk

  • SourceIR schema is now v8. Resuming a v7 checkpoint re-analyzes the original Input Source, so that local path or remote reference must still be readable.
  • Page bypass projection still requires recognizable generated absolute_url and request helpers. More complex dynamic request flows remain outside deterministic projection and may require AI repair.
  • Rollback is the previous PR head e18af93; no persisted provider credentials or destructive data migration are involved.

The PR remains Draft and is not approved for merge automatically.

@suir1
suir1 marked this pull request as ready for review August 11, 2026 06:21
@suir1
suir1 marked this pull request as draft August 11, 2026 06:25
suir1 added 2 commits August 11, 2026 15:21
Handle free-function request helpers and keep projected bypass behavior through materialization. Reject invalid normalized Rust earlier and lock the repaired Baozi conversion path with regression coverage.
Move decompiled bypass recovery into SourceIR v8, exclude sensitive literal headers, and keep materialization limited to the audited effective manifest. Zero-repair resumes now avoid provider validation and construction.
@suir1
suir1 marked this pull request as ready for review August 11, 2026 08:44
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