test(audit): prove ChatGPT lifecycle anchor census - #3835
Merged
Conversation
Problem: the polylogue-uqwd blocker required a fresh production-route check against the current quarantined ChatGPT population before any comparison-layer exception could be considered. What changed: add the read-only classifier evidence packet, index it in the generated docs surface, and add a moved-anchor red twin proving different lifecycle content remains a conflict. Compatibility/migration: no production behavior, archive database, Beads state, daemon state, or services changed. The packet records the current source/index identities, cohort coverage, historical cohort outcomes, and residual uncertainty.
Problem: the PR's current-corpus conclusion depended on an untracked report, and its direct ParsedSession test did not exercise the historical parser ordering defect. What changed: add a read-only production-route census command, a real SQLite archive regression, an end-to-end parser-to-classifier ordering test, generated command reference, and a packet that preserves graph gates pending a historical replay fixture. Compatibility/migration: no archive, blob, daemon, service, or Beads state is changed. Co-Authored-By: Claude <noreply@anthropic.com>
Problem: the current-corpus census needed a reviewable artifact tied to the committed production-route audit command. What changed: record the sanitized aggregate receipt with its SQL selection, predicate, denominators, source and index provenance, and explicit no-de-gating limit. Compatibility/migration: the receipt is evidence only. It performs no archive or service mutation. Co-Authored-By: Claude <noreply@anthropic.com>
Problem: The target predicate compared projection event identity that embeds the moved anchor, and the receipt did not identify the exact producer state or blob contents. The fixture also stopped before the parser-to-classifier historical conflict. What changed: Compare normalized event content with a lifecycle-only anchor exception, exercise the historical tiebreak through the production parser and classifier, and bind receipts to exact HEAD, worktree status, and read-only blob snapshot and integrity identities. Keep the checked-in receipt explicitly historical and retain all graph gates. Compatibility/migration: The receipt schema is v2 for newly generated audits. The checked-in v1 receipt remains historical evidence and is not treated as a rerun. Co-Authored-By: Claude <noreply@anthropic.com>
Problem: the lifecycle-anchor audit opened archive candidate data before validating the producer checkout, and its target predicate ignored attachment identity conflicts when attachment contents were equal.\n\nWhat changed: validate git provenance before constructing or opening candidate archive inputs, compare attachment identities in target matching, and add ordering and red-twin regressions.\n\nCompatibility/migration: audit-only behavior change; no archive schema or live archive writes.
Problem: the shared devtools dispatcher appends --json to every command, but the ChatGPT lifecycle audit rejected that flag. Its attachment red-twin regression also fabricated a projection after parsing an attachment-free payload, so equal attachment contents were only vacuously proven. What changed: accept the shared JSON flag, route ChatGPT attachment metadata through the shared parser normalizer, and replace the fabricated red-twin with parser-driven payloads covering equal known bytes with distinct identities and an id-less unresolved reference. Add a real devtools dispatch regression and parser coverage. Compatibility/migration: the audit already emits JSON by default, so --json is additive and preserves the existing output shape. Ref #3771 Co-Authored-By: Codex <noreply@openai.com>
…-anchor-audit-current
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make the ChatGPT lifecycle-anchor audit reproducible against current master and make its target predicate detect the historical moved-anchor conflict shape.
Problem
The earlier audit branch had diverged from current master and its target predicate could report zero when sessions contained other lifecycle events or when the only difference was the anchor message reference. That left the audit unable to prove the incident shape required by the reindex evidence gate.
Solution
The synchronized branch preserves the read-only audit route and current archive provenance checks. It requires exactly one generation_lifecycle event per session, permits unrelated lifecycle events, compares lifecycle content after removing the anchor reference, and adds a positive parser-to-classifier fixture that asserts one conflict pair and one target match. The branch also contains the current-master merge so the audit uses the same semantics as the reindex campaign.
Verification
devtools test tests/unit/devtools/test_chatgpt_lifecycle_anchor_audit.py tests/unit/sources/test_parsers_chatgpt.py tests/unit/archive/test_session_revision_membership.py: 179 passed.Ref polylogue-0qfy and Ref #3759.