Add read-only compatibility preflight - #597
Conversation
* Check raw-source coverage, explicit failures, semantic round trips, canonical stability, and output encoding. * Distinguish permitted formatting changes from exact source byte identity. * Keep the checker independent of other open changes.
* Add text and JSON reports with distinct compatible, incompatible, and I/O exit statuses. * Offer privacy-safe, reviewable issue drafts without submitting or exposing bibliography content. * Report exact source bytes separately from semantic compatibility.
* Explain the named checks, exit statuses, and exact-byte distinction. * Describe the privacy-safe issue draft and the limits of same-parser validation.
* Extract bounded exact failed blocks without arbitrary truncation. * Keep source-bearing drafts separate from the privacy-safe default link. * Warn that source URLs may persist in logs, browser history, and GitHub drafts.
* Explain the explicit disclosure option and its privacy risks. * Describe bounded failed-block and duplicate-key reproductions without truncation.
* Verify reread bytes against the checked source hash before embedding a failed block. * Refuse source-bearing drafts when the file changes or cannot be reread.
|
Hi @claell — same note across all of your July 16 issues and PRs (#567–#597), apologies for the repetition. Closing this. Passing CI isn't evidence the underlying claim is real — it just means generated tests match generated code. The batch's timing, structure, and forward-referenced numbers point to this being AI-generated rather than manually found and checked, and reviewing it properly would take more effort than a targeted pass over the parser myself. If this fixes something you actually hit: open a small, human-verified PR against a reopened issue with a real repro, and I'll review it in good faith. Any nontrivial design or API choice needs to be discussed and agreed first, not decided inside a PR. Please disclose and verify AI-assisted work before submitting going forward. |
Summary
bibtexparser check FILEandpython -m bibtexparser check FILEwith text/JSON output and distinct exit statuses.Closes #596.
Scope and commit structure
This additive feature is deliberately split into six commits: core report API, CLI, initial documentation, opt-in reproduction extraction, disclosure documentation, and stale-file protection. Normal parsing and writing behavior is unchanged; the extra parse/write cycles only occur when the preflight is explicitly invoked.
The branch starts directly at upstream
mainand does not require the other open parser, writer, failed-block-policy, Biber-comment, or round-trip-contract PRs. In particular, malformed brace-delimited input is used for failure fixtures so this PR does not depend on #571.PR #595 currently has a test-local semantic signature. If both proposals proceed, it should be rebased to use the production inventory introduced here so the runtime checker and regression contract have one implementation; that integration is not hidden in this standalone branch.
Privacy and limits
The default issue URL contains no path or bibliography source and performs no network request. Source inclusion requires
--include-source-in-issue-link, prints an explicit warning, refuses truncation and overlong URLs, uses a safe Markdown fence, and verifies the reread file hash before constructing the draft.A passing report means the named checks passed with this parser version. It is not formal verification or an independent oracle for interpretation correctness.
Validation
pytest -p no:cacheprovider -W error tests/test_compatibility.py tests/test_cli.py: 19 passed.tests/test_entrypoint.py.-W errorreaches only the same four pre-existing warning assertions addressed separately by draft PR Capture expected deprecation warnings in entry-point tests #582.AI assistance and review note
This pull request was prepared with ChatGPT Codex using GPT-5.6 Sol with high reasoning effort. Codex assisted with contract design, implementation, dependency reduction, privacy review, fixture adaptation, and validation. The work was developed in a concentrated session and has not been field-tested over a long period; automated validation is not a substitute for careful maintainer review.