Skip to content

feat: ElementId — recognize blake3: content-hash scheme (+ HASH_SCHEMES / content_hash_scheme helpers) - #22

Merged
elasticdotventures merged 1 commit into
mainfrom
feat/element-id-blake3
Sep 5, 2026
Merged

elasticdotventures merged 1 commit into
mainfrom
feat/element-id-blake3

Conversation

@elasticdotventures

Copy link
Copy Markdown
Member

ElementId (in src/sysml_model.rs, added in #20, re-used by src/ontology.rs from #21) now documents BLAKE3 as an accepted content-hash form alongside sha256: and git:.

ElementId stays an opaque string — pub struct ElementId(pub String), unchanged. This PR only:

src/ontology.rs and src/lib.rs were checked — neither enumerates the sha256: / git: prefix forms (they say "a content hash … never numeric" without listing prefixes), so no wording change was needed there.

Gates

  • cargo test — 148 pass
  • cargo clippy --all-targets -- -D warnings — clean
  • cargo clippy --all-targets --all-features -- -D warnings — clean
  • cargo fmt --all -- --check — clean

🤖 Generated with Claude Code

`ElementId` stays an opaque string newtype (`pub struct ElementId(pub String)`);
this only documents `blake3:` as a sanctioned content-hash prefix alongside
`sha256:` / `git:` and adds non-breaking read-only helpers.

- doc comment: sanctioned content/VCS hash forms now list `blake3:…`;
  "never numeric" rule unchanged
- `ElementId::HASH_SCHEMES` — `&["sha256:", "blake3:", "git:"]`
- `ElementId::content_hash_scheme()` -> `Option<&'static str>`
- `ElementId::is_content_addressed()` -> `bool`
- tests for blake3/sha256/git detection, name (`bus-3`) -> None, HASH_SCHEMES.len() == 3
- additive API (const + 2 methods) -> minor bump 0.13.0 -> 0.14.0 + CHANGELOG [0.14.0]

cargo test (148 pass), clippy --all-targets [--all-features] -D warnings, fmt --check all green.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cj7a4Bkh8pRQuzcErD1j2E
@elasticdotventures
elasticdotventures merged commit 5c8e778 into main Sep 5, 2026
2 checks passed
elasticdotventures added a commit that referenced this pull request Sep 7, 2026
…cy + AGENTS.md (#23)

The semantic-graph layer (iso_ir → ontology → sysml_model/view) landed on main
via #20/#21/#22 but was never tagged; v0.12.0/v0.13.0/v0.14.0 sat as "pending
tag" in the CHANGELOG. This dates them for a consolidated v0.14.0 tag from main
and documents what "release" means for a pre-1.0 crate.

- CHANGELOG.md: date the three pending headings (2026-09-07), fix v0.11.0's
  stale "pending tag" (tag exists, 2026-08-30), add a versioning preamble.
- README.md: new "Versioning & stability" section — 0.x carries NO SemVer
  guarantee, a 0.MINOR bump MAY reverse capability, "additive non-breaking" is
  intent not contract until 1.0; pin exact / by tag; strict FromStr is the
  stable surface, from_synonym may be re-tuned; non-numeric-id is a hard
  invariant. New "Downstream consumers" table: b00t, ledgrrr, kr0ki, m0ltis,
  critter-keeper, cim-gridy — crates, modules used, pin guidance. Refreshed the
  module bullet list to include the semantic-graph layer (was stale vs lib.rs).
- AGENTS.md (new): module map with the graph layering, hard invariants, the
  pre-1.0 release procedure, build/check commands, downstream pins.

No code change. 1.0.0 is gated on a production downstream consumer of the
semantic-graph layer (kr0ki's model-ingestion path).


Claude-Session: https://claude.ai/code/session_01Cj7a4Bkh8pRQuzcErD1j2E

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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