feat(session-12): lifecycle corpus and shrink scaffolding - #543
Merged
Conversation
…scaffolding Co-authored-by: Cursor <cursoragent@cursor.com>
…nt-policy Three CI failures, one commit: 1. policy/source_integrity: 'UnitTests/tst_lifecycletest.cpp: direct application identity mutation' - initTestCase() called QCoreApplication::setApplicationName directly, which the Loop identity contract (scripts/ci/check_loop_identity.py) forbids outside LoopLibCore/sources/pdfapplicationidentity.cpp. Use the sanctioned pdf::initializeApplicationIdentity(PDFApplicationSurface::LoopEditor) entry point instead, matching tst_applicationidentitytest.cpp. 2. agent-fast clang_tidy: 'tst_lifecycletest.moc file not found' - the new test file matched no module_boundaries paths glob, so check-change.py never built UnitTestsLifecycle and AUTOMOC never generated the .moc. Add UnitTests/tst_lifecycletest.cpp to the core module's paths (target already registered in core tests and the architecture catalog). 3. agent-fast format: clang-format violations in the new ctor initializer list and ternary; reformatted with the repo .clang-format (v18).
PR 541's async rework replaced the QtConcurrent include in pdfdiff.cpp with QUuid, losing the transitive QXmlStreamWriter definition (pdfdiff.h only forward-declares it), so LoopLibCore fails to compile on dev: pdfdiff.cpp:1245/...: error: invalid use of incomplete type 'class QXmlStreamWriter' pdfdiff.cpp:1572/1578/1584: variable has initializer but incomplete type This was invisible to dev CI because agent-fast never selected the core module on merged PRs (PR 541 merged with agent-fast red; dev CI #490 is red on the same error). Enrolling UnitTestsLifecycle in the agent-policy core module on PR 543 surfaced it. Add the direct include and reformat both files (dev's CI also flags format violations for pdfdiff.cpp/.h from the same merge).
mberrys
marked this pull request as draft
September 7, 2026 02:44
mberrys
marked this pull request as ready for review
September 7, 2026 02:44
Second transitive-include casualty of PR 541's pdfdiff rework: the new finalizeGraphicsPieces() page-hash code uses QCryptographicHash (lines 905-933) but no header in the TU provides its definition - pdfdiff.cpp only transitively included it via the removed QtConcurrent include. Both the agent-fast Linux build (gcc) and the fuzz harness build (clang, stricter include semantics) fail identically: pdfdiff.cpp:905:5: error: 'QCryptographicHash' was not declared pdfdiff.cpp:932:14: error: 'QCryptographicHash' is not a class Add the direct include (matches sibling sources such as pdfartifactidentity.cpp).
…ct on read-only artifacts UnitTestsLifecycle failed 4 of 13 slots on Linux agent-fast (Windows-local authoring never exercised the committed manifest or Unix permissions): 1. qualificationCorpusSchemasAreValid: manifest key mismatch - test read 'seeds' but manifest/checker/generator define 'passing_traces'. 2. promotedFailureTracesMatchExpectedViolations + crossPlatformCorpusReport: test read 'file'/'first_violated_invariant' but the manifest schema (scripts/ci/check_lifecycle_corpus.py) uses 'trace_file'/'expected_violation'; empty filenames produced 'unable to open .../testdata/lifecycle/'. 3. deltaDebugShrinkPreservesFailure: the InjectSourceOverwrite injection appended to an artifact that importBytes publishes read-only; the append silently failed on Linux, the defect never reproduced, and the shrink had nothing to minimize. Re-enable the owner write bit (mirroring PDFArtifactStore::remove's permission handling) before corrupting. Manifest, checker, generator, and test now share one schema.
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.
Session 12 lane (Issues 37-39). L-01 partial until hosted UnitTestsLifecycle on merged SHA.
Made with Cursor
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.