Repository navigation
Add deterministic schema description and explicit release metadata - #125
Conversation
ip332
left a comment
There was a problem hiding this comment.
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.
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
--versionand--describe. Exact annotated or lightweight HEAD tags for the current development line retain the fullvX.Y.Z[-rc.N]spelling; ordinary commits reportuntagged. 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:
9200ca494f010801b830d0857cf66ddeand 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.--print-schema-idand 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.9858a2f7e4872611654be030ba18ebf9bca55475. Minimal and reflective truck QBS files match the retained baseline byte for byte.0.1.289and0.1.31respectively, both withrelease tag v0.1.31-rc.1and unchanged schema identity. Removing archive SHA metadata reportsGit SHA unavailableexplicitly without affecting identity. The tagged compiler also reproduces all 48 generated files byte for byte.release/build-artifacts.shandtools/validate_release_artifacts.pypass using a disposable clone and local test tagv0.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 HEADpassed all 69 native CTest entries for3d971a844088da5920a204e51f787bc0d0db3fab; hooked delivery usesscripts/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.