Skip to content

feat(session-12): lifecycle corpus and shrink scaffolding - #543

Merged
mberrys merged 8 commits into
devfrom
cursor/session-12-lifecycle-qualification
Sep 7, 2026
Merged

feat(session-12): lifecycle corpus and shrink scaffolding#543
mberrys merged 8 commits into
devfrom
cursor/session-12-lifecycle-qualification

Conversation

@mberrys

@mberrys mberrys commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Session 12 lane (Issues 37-39). L-01 partial until hosted UnitTestsLifecycle on merged SHA.

Made with Cursor


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

mberrys and others added 6 commits September 6, 2026 17:03
…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
mberrys marked this pull request as draft September 7, 2026 02:44
@mberrys
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.
@mberrys
mberrys merged commit 67d78ce into dev Sep 7, 2026
14 checks passed
@mberrys
mberrys deleted the cursor/session-12-lifecycle-qualification branch September 7, 2026 18:58
@cursor cursor Bot mentioned this pull request Sep 10, 2026
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