v0.8: docs/LIFE_TIER_SPEC.md + schemas/tier.schema.json + Schema D appendix + sanity tests (#104)#113
Merged
Merged
Conversation
…pendix + sanity tests (#104) Adds the per-topic normative spec for Topic 3 (Tier System) of the v0.8 architecture epic (#106). What this PR contains: - docs/LIFE_TIER_SPEC.md (new, normative): conformance language, six-dimension definition, weighted-score formula, score-to-level binding table, back-compat mapping from v0.7 verification_level, worked example, and cross-document interactions. - schemas/tier.schema.json (new): exports tier_block + tier_dimensions via $defs. 12 allOf/if-then rules bind score ranges to Roman-numeral levels. computed_by pattern '^[A-Za-z0-9_./-]+@[A-Za-z0-9_.+-]+$' requires builder@version separator so hand-rolled tier blocks fail validation. - docs/appendix/TIER_NAMING_SCHEMA_D.md (new): canonical Schema D Cosmic Evolution table (Quark / Atom / Molecule / Stardust / Nebula / Protostar / Main Sequence / Red Giant / White Dwarf / Neutron Star / Pulsar / Singularity) with glyphs and score ranges. Versioned separately so future naming schemes ship without a spec major bump. - tools/test_tier_schema.py (new): 81 sanity cases (26 happy + 55 negative). Boundary cases for every score-to-level range, every cross-boundary mismatch, every dimension off-enum, every required field, and the computed_by auto-compute guard. Wired into tools/batch_validate.py. Decisions encoded: - D1=C: closed enum on dimensions for v0.8 (no x- extension yet) - D2=B: all six dimensions required - D3=auto: auto-computation enforced via computed_by pattern - D4=public: tier lives in life-package.json (open root) - D5=replace: verification_level mapping into identity_verification Local validation: - python tools/test_tier_schema.py -> 81/81 cases pass - python tools/batch_validate.py -> 21/21 steps pass Out of scope (deferred to a follow-on integration PR): - Folding tier block into life-package.schema.json - Updating tools/build_life_package.py to auto-compute tier - Marking v0.7 verification_level as deprecated Followups: #105 (Runtime / Assembly 5-stage pipeline). Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Devin Review on PR #113 caught that the worked example shipped score: 55 while the formula in §4.1 deterministically produces 54 for those dimensions. The earlier prose hand-waved the discrepancy as ±1 rounding, but §4 explicitly says verifiers SHOULD recompute and reject mismatches — the example would have failed against any correct implementation. - Worked example: score 55 → 54. - §8 trailing prose: replace the rounding-tolerance hand-wave with a clear statement that the example matches the formula and that verifiers MUST reject mismatches. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes sub-issue #104 of the v0.8 Asset Architecture epic #106. Lands the per-topic normative spec for Topic 3 — Tier System, including schema, Schema D Cosmic Evolution naming appendix, and sanity tests.
What this PR contains
docs/LIFE_TIER_SPEC.md(new, normative): conformance language, six-dimension definition (identity_verification,asset_completeness,consent_completeness,detail_level,audit_chain_strength,jurisdiction_clarity), normative weighted-score formula (consent + identity ×2, others ×1), score → level binding table for all 12 tiers (I–XII), back-compat mapping from v0.7verification_leveltotier.dimensions.identity_verification, worked example, and cross-document interactions.schemas/tier.schema.json(new): exportstier_block+tier_dimensionsvia$defs. TwelveallOf/if-thenrules bindscoreranges to Roman-numerallevelvalues. Thecomputed_bypattern^[A-Za-z0-9_./-]+@[A-Za-z0-9_.+-]+$requires a<builder>@<version>separator so hand-rolled tier blocks fail validation (decision D3 = auto-compute).docs/appendix/TIER_NAMING_SCHEMA_D.md(new): canonical Schema D Cosmic Evolution table (Quark / Atom / Molecule / Stardust / Nebula / Protostar / Main Sequence / Red Giant / White Dwarf / Neutron Star / Pulsar / Singularity) with glyphs and score ranges. Versioned separately so future naming schemes can ship without a spec major bump.tools/test_tier_schema.py(new): 81 sanity cases (26 happy + 55 negative). Boundary cases for every score → level range, every cross-boundary mismatch, every dimension off-enum, every required-field removal, and thecomputed_byauto-compute guard. Wired intotools/batch_validate.py.CHANGELOG.md: tier entries added; also fixes the lifecycle test breakdown (9 happy-path + 33 negative for the 42 total) per #112 review finding.Decisions encoded
x-extension yetrequired: [identity_verification, ..., jurisdiction_clarity]computed_bypattern requires<path>@<semver>separatorlife-package.json(the open root), no separate "private tier"verification_leveltier.dimensions.identity_verificationenum + back-compat mapping table in spec §6Local validation
python tools/test_tier_schema.py→ 81/81 cases passpython tools/batch_validate.py→ 21/21 steps passOut of scope (deferred)
life-package.schema.json(follow-on integration PR).tools/build_life_package.pyto auto-compute tier (lands with the integration PR).verification_levelas deprecated (also lands with integration).Review & Testing Checklist for Human
Risk: green — pure spec/schema PR; no runtime code, no v0.7 schema changes.
python tools/test_tier_schema.pyreportsrun: 81 cases, failures: 0schemas/tier.schema.jsonagainst the table indocs/LIFE_TIER_SPEC.md§4.2Notes
Followup: PR for sub-issue #105 (Runtime / Assembly 5-stage pipeline).
Link to Devin session: https://app.devin.ai/sessions/ff7322e18fd94887875daa2c1c75f87d
Requested by: @LING71671