Skip to content

Add deterministic schema description and explicit release metadata - #125

Merged
ip332 merged 1 commit into
mainfrom
feat/101-schema-description
Nov 21, 2026
Merged

ip332 merged 1 commit into
mainfrom
feat/101-schema-description

Conversation

@ip332

@ip332 ip332 commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Closes #101

Adds quarry-schema-compiler --describe ROOT: deterministic, read-only text for the full resolved configuration, including its identity, formats, actual generated-code API epochs, canonical namespaces and assigned hierarchical IDs. It borrows the existing prepared layout/identity and Schema IR IDs; --generate, backend and output naming choices do not narrow the report. Conflicting query/QBS operations fail with usage errors. Absolute input paths display only a basename, and labels escape control bytes.

Adds separate release-tag metadata to --version and --describe. Exact annotated or lightweight HEAD tags for the current development line retain the full vX.Y.Z[-rc.N] spelling; ordinary commits report untagged. Existing numeric Git commit-counter versions, dirty semantics and archive fallback resolution stay intact. Explicit archive tags are preserved independently from numeric package versions; missing SHA metadata is reported explicitly. No timestamps are introduced.

Validation:

  • Full Linux GCC CI passes 69/69 CTest entries, plus the generated-identity GCC LTO validation step.
  • Linux coverage CI passes 64/64 selected CTest entries and the baseline guard. The coverage workflow intentionally excludes five build/package integration entries, which are covered by full native/Linux validation.
  • Truck golden pins 9200ca494f010801b830d0857cf66dde and all eight record IDs. CLI tests cover repeated execution, locales, import/declaration ordering, shared namespaces, standalone roots, configuration renaming, generation selections, backend/naming choices, malformed arguments, invalid schemas and no file writes.
  • Reported identity agrees with --print-schema-id and minimal/reflective QBS headers; epochs agree with the actual runtime declarations. Isolated Git tests cover annotated/lightweight tags, untagged descendants, dirty trees, invalid/foreign tags and valid/missing/invalid archive metadata. Existing Version-resolution tests can mutate linked-worktree Git metadata from pre-push hooks #94 environment-isolation regressions pass.
  • All 48 generated files across owning C++, C, C++ with C storage, Python and Go are byte-identical to main 9858a2f7e4872611654be030ba18ebf9bca55475. Minimal and reflective truck QBS files match the retained baseline byte for byte.
  • Real CLI builds from the exact tagged checkout and reconstructed source archive report 0.1.289 and 0.1.31 respectively, both with release tag v0.1.31-rc.1 and unchanged schema identity. Removing archive SHA metadata reports Git SHA unavailable explicitly without affecting identity. The tagged compiler also reproduces all 48 generated files byte for byte.
  • Cortex-M CI passes: main and candidate both use 11,756 B flash / 15,272 B RAM in the default smoke firmware (zero delta). In Default, MinSizeRel and Debug, all 10 common artifacts have identical allocatable bytes, relocations and defined symbols. Debug-only path metadata differs; two codec object paths differ between worktrees and are listed as unmatched by the existing report (the linked ELFs match). The equivalent storage-policy comparison also passes. Stack/heap high-water marks are not measured.
  • release/build-artifacts.sh and tools/validate_release_artifacts.py pass using a disposable clone and local test tag v0.1.31-rc.1; no tags or artifacts are published.

BRF/QBS/Schema IR formats, record-ID allocation, schema identity encoding, generated-code identity format 1, runtime APIs/epochs and generated bindings are unchanged. The release metadata macro adds no mandatory runtime objects, initialization, allocation or hashing. A4.5 naming isolation, #119 symbol renaming and A5 remain outside this PR.

Documentation covers CLI behavior, release/archive semantics, the configuration preparation path and the truck example. scripts/quarry-validate validate HEAD passed all 69 native CTest entries for 3d971a844088da5920a204e51f787bc0d0db3fab; hooked delivery uses scripts/quarry-validate push. All applicable checks pass in CI run 44861377300: Linux GCC build/test, clang-tidy, coverage and Cortex-M. Benchmarks are skipped by the existing pull-request policy. This PR is ready for independent review and must not be merged automatically.

Native Homebrew Abseil headers emit existing nullability-extension warnings. No new Quarry compiler diagnostics were introduced. Cortex-M stack/heap high-water marks and nonmatching codec object paths are not independently measured by the existing report; the linked firmware and common allocatable sections match as described above.

@ip332 ip332 added this to the v0.1.31-rc.1 milestone Nov 21, 2026
@ip332
ip332 marked this pull request as ready for review November 21, 2026 03:59

@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 merge from a code-review perspective at 3d971a844088da5920a204e51f787bc0d0db3fab.

Reviewed the --describe implementation (complete IR/layout/identity; domain and record ID ordering; read-only and --generate-independent behavior), version-resolution release tag changes, archive fallback, generated version metadata, and regression tests for ordering, locales, root types, schema/QBS identity equality, epochs, tag/archive/isolated Git cases. Verified GitHub Actions run 44861377300: Build and test (69/69), clang-tidy, Coverage baseline and Cortex-M all succeeded. PR documents successful disposable-tag release staging, identical generated bindings/QBS bytes and zero mandatory Cortex-M delta. No merge-blocking defect found.

Non-blocking future considerations: multiple well-formed release tags pointing to one commit should have an explicit deterministic precedence/rejection policy if such repository state becomes supported; current tests cover ordinary tagged/untagged states. Runtime used-memory/stack and physical-board measurements remain outside this metadata-only change. Do not infer a public release from a test tag.

GitHub does not allow the connected PR author's account to submit formal APPROVE on its own PR, so this is a positive technical-review COMMENT, not a GitHub approval. No merge performed.

@ip332
ip332 merged commit 85fd812 into main Nov 21, 2026
5 checks passed
@ip332
ip332 deleted the feat/101-schema-description branch November 21, 2026 04:02
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.

A4.4: Schema description (--describe) and release-tag version metadata

1 participant