Skip to content

Make API extraction portable and snapshots self-identifying - #17

Open
geromet wants to merge 12 commits into
mainfrom
feat/extractor-explicit-snapshot-identity
Open

geromet wants to merge 12 commits into
mainfrom
feat/extractor-explicit-snapshot-identity

Conversation

@geromet

@geromet geromet commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Implements the coherent #13 extraction-portability, snapshot-identity, and reproducible comparison-harness package without touching #10/#16 LuaLS work.

  • replaces historical hard-coded Windows paths with required explicit --src-root, --output, and --build-id extractor inputs;
  • validates source/output/build identity and fails closed instead of probing or guessing;
  • embeds deterministic snapshot identity in generated lua_api.json;
  • preserves the existing normalized API model and comparator compatibility;
  • adds generate_change_report.py, which accepts two explicit source roots/build IDs and produces old/new snapshots, the canonical diff, and a deterministic count summary;
  • resolves caller-relative source roots before repository-owned subprocesses change working directory;
  • normalizes build IDs once so snapshots, diff, and summary carry identical identities;
  • reserves each output directory with a crash-recoverable OS advisory lock, stages the complete report, copies to destination-local temporary files, publishes only complete artifacts atomically without overwrite, and rolls back self-created partials on failure;
  • documents the exact two-real-build command without claiming unavailable external corpus evidence;
  • keeps hosted verification read-only with pinned javalang==0.13.0 and immutable checkout.

Effect / security boundary

Local read trees → explicit local JSON outputs only. Subprocesses use structured Python argument lists for repository-owned extractor/comparator entry points. No shell construction, network/game/runtime mutation, dynamic evaluation, credentials, path guessing, or overwrite mode. The report is structural evidence only and does not claim Java binary/runtime compatibility.

Exact-head verification

Head edc77d65e9e71579e950d60375bf846f88ef7092 against main@c64abd05ba5c1ce4efd54e2ee7e5e0e26db63589:

  • hosted Extractor tests run 34010042458: success;
  • existing portable extractor suite remains green;
  • report integration performs two real extractor invocations over temporary Java source trees, runs the canonical comparator, and verifies artifacts, normalized identities, class/global counts, and deterministic changes;
  • focused regression proves relative source roots work when invoked outside the repository;
  • negatives prove active advisory-lock rejection and automatic release, stale lock-file recovery, existing-artifact overwrite refusal, atomic reader visibility, and no partial report artifacts after failed extraction/publication;
  • local py_compile for the harness/tests: success;
  • PR is open, non-draft, and mergeable at this head/base.

The previous-head Codex scan findings on relative roots, inconsistent whitespace identities, concurrent overwrite, partial-reader visibility, and crash-persistent lock ownership are addressed by this head and corresponding regression tests. Current-head scan/review remains authoritative.

Remaining #13 acceptance

This PR uses Refs #13 and does not close the umbrella. Still required after default incorporation or from the accepted contract:

  • execute the documented command against two safely obtained real Project Zomboid source builds;
  • retain identities/counts/report size and spot-check representative structural records;
  • add the lightweight Changes viewer/report over the same canonical diff.

Synthetic fixtures prove orchestration and report contracts; they are not represented as empirical Project Zomboid build evidence.

Refs #13

Authority boundary: this PR targets the repository default branch for Codex final review only. Fleet agents must never merge it into main.

geromet commented Sep 6, 2026

Copy link
Copy Markdown
Owner Author

@codex Please perform final review of this PR at head a7e48463c985a8283d6c08deb115e3046733d073 targeting main@c64abd05ba5c1ce4efd54e2ee7e5e0e26db63589. Gerome designates Codex as the final reviewer/merger. Scope: explicit portable extraction and deterministic snapshot identity plus the reproducible two-source extraction/comparison/report-summary harness; #10/#16 LuaLS work, empirical Project Zomboid build evidence, and the Changes viewer remain outside this review unit. Recheck the current head/base, repository guidance, required checks, review threads, dependencies, acceptance semantics, and protections. If ready and permissions permit, merge using repository policy and expected-head protection; never bypass protections. If blocked, report the concrete reason and do not assume success. Evidence: hosted Extractor tests https://github.com/geromet/PZJavaDocs/actions/runs/34004998861; LOCK handoff #14 (comment). Marker: codex-final-merge:geromet/PZJavaDocs:17:a7e48463c985a8283d6c08deb115e3046733d073

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7e48463c9

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

Comment thread generate_change_report.py Resolved
Comment thread generate_change_report.py Resolved
Comment thread generate_change_report.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b793c8a9dc

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

Comment thread generate_change_report.py Resolved
Comment thread generate_change_report.py Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

This branch has not been deployed

No deployments
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