Skip to content

test: verify comment-only configuration identity invariance - #134

Merged
ip332 merged 1 commit into
mainfrom
test/130-comment-only-identity
Nov 23, 2026
Merged

ip332 merged 1 commit into
mainfrom
test/130-comment-only-identity

Conversation

@ip332

@ip332 ip332 commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Closes #130

Adds SchemaCompilerToolTest.CommentOnlyEditsPreserveConfigurationIdentityAndQbsBytes using temporary copies of the existing small description fixture. The real compiler captures the full 128-bit --print-schema-id, complete --describe output with both pinned record IDs, and minimal/reflective QBS bytes. Standalone and inline comments are added before/between declarations in the configuration root and both imported files. Baseline, comment-only and wire-change phases are each compiled twice.

Comment-only results:

  • schema_id remains ef38354d6020a83018197caca9a2757a.
  • m.Alpha = 0x00010001, m.Zeta = 0x00010002 remain unchanged.
  • Minimal QBS (233 bytes) and reflective QBS (279 bytes) remain byte-identical, including repeated generation.

Negative control: changing only m.Alpha.value from u16 to u32 succeeds and changes schema_id to dd42edaaff5ce856f95d1c48de6615ce. Both QBS images change (249/295 bytes), while the record IDs remain unchanged. The changed configuration also regenerates deterministically.

Mutation check: temporarily corrupted one hex digit of the captured comment-only identity. The new test failed at actual.schema_id == expected.schema_id; restored the temporary mutation byte-for-byte and reran successfully. No mutation is committed.

Only the existing CLI test source changes. The configured clang-format commit hook also normalized existing formatting in that touched file; those surrounding edits are mechanical formatting. No new parser, identity algorithm, backend generation or runtime behavior is introduced.

Validation:

  • Focused regression passed (approximately 2.6–3.3 seconds locally).
  • Exact-HEAD native validation: 75/75 CTests passed on 5ed0ca6db9a0323c61ccd43aba721a0535cc3bc3 via scripts/quarry-validate.
  • GitHub CI run https://github.com/ip332/quarry/actions/runs/45083985478 passed: Linux GCC 75/75 CTests; coverage 70/70 and baseline guard; clang-tidy; Cortex-M Cross Build; Clang 18 interoperability and conformance (2/2 Debug and 2/2 ASan/UBSan); GCC LTO identity validation. Benchmarks retain their normal PR-policy skip.
  • Commit hooks and git diff --check passed.

Baseline: #133 squash-merged as 51f11d3243b41cdb4b31e7606f28f1a39b435e2b, #129 closed, all five post-merge CI jobs passed in run 45080145229 before implementation began. Published v0.1.31-rc.1 remains unchanged. Auto-merge is disabled; independent review required.

@ip332 ip332 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Independent technical review: GO / approved for squash merge at exact head 5ed0ca6db9a0323c61ccd43aba721a0535cc3bc3.

Reviewed tests/tools/schema_compiler_tool_test.cpp including the new CommentOnlyEditsPreserveConfigurationIdentityAndQbsBytes regression. It uses existing CLI/QBS helpers and temporary copies of the authoritative configuration fixture, exercises comments in the root and both imported units, checks full 128-bit schema_id, entire --describe output with pinned hierarchical record IDs, and both minimal and reflective QBS byte equality. All phases repeat deterministically. The u16→u32 valid wire-change control correctly changes schema_id and both QBS images without requiring record-ID changes. The reported corrupted-capture mutation failed the intended assertion and was restored. Other changes in this file are mechanical formatting. No production/format/epoch change is introduced.

Verified exact-head workflow 45083985478 completed successfully: Build and test 75/75 Linux CTests, coverage 70/70 with baseline guard, clang-tidy and Cortex-M. Benchmarks skipped by normal PR policy. No merge-blocking finding. Recommend squash merge with head-SHA check, confirm issue #130 closes, then verify post-merge CI. Published v0.1.31-rc.1 remains unchanged.

This is a technical-review COMMENT rather than formal APPROVE because the connected GitHub identity owns the PR. No merge performed.

@ip332
ip332 merged commit 35ccae1 into main Nov 23, 2026
5 checks passed
@ip332
ip332 deleted the test/130-comment-only-identity branch November 23, 2026 00:14
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.

Add a comment-only configuration identity regression

1 participant