Skip to main content

trusty_code/prompt/
version.rs

1//! Version identifier for the BASE protocol preamble.
2//!
3//! Why: The parity report (spec ยง6/D5) must record, per run, the exact BASE
4//! version that was assembled so any parity claim is auditable. Pinning the
5//! version to a constant โ€” rather than deriving it from the crate version โ€”
6//! lets the preamble text and its identity evolve independently of crate
7//! releases, and gives the report a stable, byte-comparable token.
8//! What: A single `&str` constant naming the current BASE preamble revision.
9//! Bump it whenever `BASE_PREAMBLE` (in `preamble.rs`) changes in a way that
10//! affects assembled bytes.
11//! Test: `prompt::tests::base_preamble_version_is_semver_shaped`.
12
13/// Semantic version of the [`crate::prompt::BASE_PREAMBLE`] constant.
14///
15/// Why: Disclosed in the parity report (spec D5) so a reader can tie a run's
16/// assembled prompt back to an exact, immutable preamble revision.
17/// What: A `MAJOR.MINOR.PATCH` string. Increment on any change to the
18/// `BASE_PREAMBLE` text so reports referencing an old run remain interpretable.
19/// Test: `prompt::tests::base_preamble_version_is_semver_shaped` asserts the
20/// three-component shape.
21pub const BASE_PREAMBLE_VERSION: &str = "1.1.0";