Repository navigation
Add multidimensional trust and promotion gates #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9d736c9
Add multidimensional trust promotion gates
Mnehmos 1b44cb7
Harden trust review history invariants
Mnehmos fe9fb69
Bound kernel trust evidence admission
Mnehmos 694ee09
Compact oversized fidelity trust histories
Mnehmos 145ec43
Bound fidelity witnesses in v2 releases
Mnehmos 0069f8b
Bind reviewed trust hashes offline
Mnehmos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,95 @@ | ||
| # Trust Model | ||
|
|
||
| ## What MathOS may claim | ||
| MathOS does not use one Boolean as mathematical trust. Trust is derived for one exact | ||
| formalization version across five independent dimensions. | ||
|
|
||
| MathOS v1.0 may authorize certainty only for a formal claim accepted by the finite verifier. A proved result means exhaustive evaluation succeeded for every assignment in the declared finite domain. A disproved result means the verifier checked a concrete in-domain assignment that makes the claim false. Every other result is unresolved. | ||
| ## Trust dimensions | ||
|
|
||
| The informal statement is descriptive context. The v1.0 system does not prove that the formal specification faithfully expresses the author's natural-language intent. | ||
| | Dimension | Question answered | Authority source | Conservative default | | ||
| | --- | --- | --- | --- | | ||
| | kernel | Did controlled Lean checking accept the exact formal statement? | Lean diagnostic evidence and receipt-bound proof/refutation evidence | `unverified` | | ||
| | fidelity | Does the formal statement match the reviewed source relationship? | Role-separated fidelity review history | `unreviewed` | | ||
| | definition | Are the formal definitions grounded and approved for the intended project? | Immutable reviewed trust transitions | `ungrounded` | | ||
| | reuse | How ready is the artifact for use beyond its current campaign? | Immutable reviewed trust transitions | `experimental` | | ||
| | coverage | What portion of the advertised mathematical result is formalized? | Immutable reviewed trust transitions | `unknown` | | ||
|
|
||
| ## Authority boundary | ||
| The complete state vocabularies and promotion policy are fixed by | ||
| [`trust_status/1`](../../schemas/trust/trust-status-1.schema.json) and | ||
| [ADR-0018](../decisions/ADR-0018-multidimensional-trust-and-promotion-profiles.md). | ||
|
|
||
| | Component | Trusted for | Not trusted for | | ||
| | --- | --- | --- | | ||
| | Proof Search | Proposing a candidate | Authorizing proof or disproof | | ||
| | Finite Verifier | Checking supported finite claims | Unbounded mathematics or intent alignment | | ||
| | Claim Engine | Enforcing lifecycle transitions | Creating mathematical evidence | | ||
| | Provenance Ledger | Detecting ordinary corruption and broken chains | Resisting an attacker who can rewrite and rehash the database | | ||
| | Pedagogy | Restating verified status and evidence | Increasing the certainty of a result | | ||
| | RL Export | Preserving linked trajectory evidence | Establishing truth independently of the verifier | | ||
| | Lean Adapter | Failing closed when Lean is absent | Claiming Lean verification in v1.0 | | ||
| Kernel and fidelity are projections of their existing evidence histories. They cannot be set | ||
| through the trust-transition API. Definition, reuse, and coverage transitions require an exact | ||
| formalization, current predecessor, reviewer, reason, timestamp, and verified artifact evidence. | ||
| Changing one dimension never changes another. | ||
|
|
||
| ## Residual risks | ||
| Claim research status remains a separate live derivation over current source, fidelity, and | ||
| receipt-bound proof/refutation authority. Comparator acceptance remains a separate authority class. | ||
| Pedagogy, release construction, corpus/RL projection, and workflow success cannot create | ||
| mathematical trust. | ||
|
|
||
| ## Promotion profiles | ||
|
|
||
| | Profile | Required state | | ||
| | --- | --- | | ||
| | experimental | kernel is `lean_checked` or `kernel_verified`; fidelity is not `rejected` | | ||
| | publication | kernel is `kernel_verified`; fidelity is at least `reviewer_checked`; definition is at least `source_grounded`; reuse is at least `candidate`; coverage is declared | | ||
| | upstream | kernel is `kernel_verified`; fidelity is `expert_approved`; definition is at least `project_approved`; reuse is at least `review_ready`; coverage is declared | | ||
|
|
||
| Each `trust_status/1` response includes all three deterministic evaluations and explicit blockers. | ||
| New portable releases bind the relevant eligible assessment in `release_manifest/2`. Private | ||
| release maps to `experimental`; public release maps to `publication`. A public legacy manifest | ||
| without this binding fails offline verification. | ||
|
|
||
| ## Interfaces | ||
|
|
||
| Read all five dimensions and promotion blockers: | ||
|
|
||
| ```text | ||
| mcl --root <instance> --json verify trust-status \ | ||
| --formalization-object-id <uuidv7> \ | ||
| --formalization-version-hash <sha256> | ||
| ``` | ||
|
|
||
| 1. Search and verification are separate components, and verification recomputes instead of trusting the candidate. They currently share one expression semantics implementation, so an implementation bug could affect both. A deterministic randomized test compares 200 generated Boolean expressions with a separate reference oracle. A different verifier implementation or Lean kernel should become the stronger long-term boundary. | ||
| 2. SHA-256 event chaining is tamper-evident, not authenticated. Each claim export carries a compact link path through the complete ledger so omitted or spliced links are detectable without disclosing other claims' payloads. Full database write access still permits rewriting and rehashing history. Signed checkpoints or external digest anchoring are required before making adversarial provenance guarantees. | ||
| 3. Resource limits intentionally turn large, deep, unsupported, or unbounded work into unresolved results. They are safety boundaries, not mathematical conclusions. | ||
| 4. The hand-written MCP adapter covers the declared protocol surface and is tested as a subprocess. Broader client interoperability remains a release-following integration task. | ||
| 5. Outputs and trajectories can contain user-provided text. Consumers must continue treating those fields as data. | ||
| Record one definition, reuse, or coverage decision: | ||
|
|
||
| ```text | ||
| mcl --root <instance> --json verify transition-trust \ | ||
| --request-json <trust_transition/1-json> \ | ||
| --actor <actor> \ | ||
| --idempotency-key <key> | ||
| ``` | ||
|
|
||
| The request's `reviewer_identity` must exactly equal `--actor`; delegated review recording is not | ||
| accepted. Definition, reuse, and coverage histories are each capped at 256 immutable decisions. | ||
| New kernel evidence is also capped at 256 entries per exact formalization. A larger history retained | ||
| from before migration 14 is fully replayed for integrity; diagnostic events are compacted to their | ||
| current semantic decision while bounded exact authority decisions are retained. Migration therefore | ||
| neither discards evidence nor makes an otherwise valid formalization unreadable. Fidelity evidence | ||
| remains an append-only supersession chain without a new admission cap. When that fully replayed | ||
| chain exceeds the bounded `trust_status/1` representation, the fidelity axis projects its exact | ||
| current evidence head as one decision; the underlying review history remains unchanged. | ||
|
|
||
| MCP exposes the equivalent closed `trust_status` and `transition_trust` verify actions. Both | ||
| interfaces return the same canonical representation. | ||
|
|
||
| ## Fail-closed rules | ||
|
|
||
| - Unknown operators, malformed values, mixed domain types, invalid branches, and exhausted budgets cannot authorize certainty. | ||
| - Missing external verifier tooling returns unresolved. | ||
| - A candidate is recorded before its verification result in one atomic lifecycle transaction and can never certify itself. | ||
| - A verified claim cannot transition back to a weaker state. | ||
| - Invalid provenance or trajectory evidence causes validation failure. | ||
| - Missing, corrupt, stale, contradictory, or substituted authority evidence is an integrity | ||
| failure or a promotion blocker, never an implicit promotion. | ||
| - Migration creates no synthetic definition, reuse, or coverage promotion. | ||
| - Definition and reuse promotions are adjacent and predecessor-guarded; explicit demotions remain | ||
| auditable. Coverage changes are reviewed classifications. | ||
| - Offline assessment validation reconstructs every definition, reuse, and coverage | ||
| `trust_transition/1` request from the ordered axis history and recomputes its decision hash. | ||
| - Release construction rejects an incomplete profile before writing a directory. | ||
| - Offline verification recomputes the assessment and checks its subject, profile, statuses, | ||
| evidence heads, artifact closure, and hash binding. | ||
| - A `verified` execution predicate in a specialized report describes only that check; it is never | ||
| the sole canonical trust representation. | ||
|
|
||
| ## Residual risks | ||
|
|
||
| SHA-256 histories are tamper-evident rather than externally authenticated unless a protected | ||
| attestation or trusted manifest hash anchors them. Definition semantics and upstream suitability | ||
| still require human review; issues #68 and #69 define the deeper workflows. User-provided text | ||
| remains data and must be escaped by any future graphical client. | ||
94 changes: 94 additions & 0 deletions
94
docs/decisions/ADR-0018-multidimensional-trust-and-promotion-profiles.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| # ADR-0018: Trust is multidimensional and promotion is profile-specific | ||
|
|
||
| Date: 2026-07-25 | ||
|
|
||
| Status: accepted | ||
|
|
||
| ## Context | ||
|
|
||
| Lean kernel verification establishes that a proof term has the recorded formal type in an exact | ||
| environment. It does not establish that the formal type faithfully represents a source, that its | ||
| definitions are appropriate, that it covers the advertised theorem, or that the artifact is ready | ||
| for reuse. A single `verified` flag would collapse these independent judgments and could promote a | ||
| formally correct trivialization as a faithful theorem. | ||
|
|
||
| MathOS already has stronger authority paths for kernel results and statement fidelity. Creating a | ||
| second mutable status path for those dimensions would introduce conflicting authorities. | ||
|
|
||
| ## Decision | ||
|
|
||
| MathOS derives one `trust_status/1` snapshot for an exact formalization version with five axes: | ||
|
|
||
| - kernel: `unverified`, `lean_checked`, `kernel_verified`, or `failed`; | ||
| - fidelity: `unreviewed`, `source_mapped`, `reviewer_checked`, `expert_approved`, or `rejected`; | ||
| - definition: `ungrounded`, `source_grounded`, `project_approved`, or `upstream_accepted`; | ||
| - reuse: `experimental`, `campaign_specific`, `candidate`, `review_ready`, or `upstreamed`; and | ||
| - coverage: `unknown`, `statement_only`, `analytical_core`, `supporting_lemma`, | ||
| `finite_specialization`, `asymptotic_component`, or `full_theorem`. | ||
|
|
||
| Kernel status is projected from controlled Lean evidence and receipt-bound proof/refutation | ||
| authority. Fidelity status is projected from the existing role-separated fidelity history. Neither | ||
| axis has a generic status mutation API. | ||
|
|
||
| Definition, reuse, and coverage use the immutable `trust_transition/1` ledger. Every transition | ||
| names one exact formalization, its prior and next state, the current predecessor, a reviewer, a | ||
| reason, sorted registered evidence-artifact hashes, actor, and timestamp. Definition and reuse | ||
| promotions are adjacent; explicit evidence-backed demotions are allowed. Coverage is a reviewed | ||
| classification rather than an ordered promotion ladder. SQL constraints, insert triggers, unique | ||
| predecessor rules, immutable-row triggers, canonical readback, and application validation enforce | ||
| the same contract. | ||
|
|
||
| Migration 0014 creates no synthetic transition. Existing formalizations therefore begin at | ||
| `ungrounded`, `experimental`, and `unknown`; existing valid kernel and fidelity evidence continues | ||
| to project only onto its own axis. | ||
|
|
||
| Promotion is a deterministic assessment, not another stored status: | ||
|
|
||
| | Profile | Kernel | Fidelity | Definition | Reuse | Coverage | | ||
| | --- | --- | --- | --- | --- | --- | | ||
| | experimental | `lean_checked` or `kernel_verified` | not `rejected` | unrestricted | unrestricted | unrestricted | | ||
| | publication | `kernel_verified` | `reviewer_checked` or `expert_approved` | at least `source_grounded` | at least `candidate` | declared, not `unknown` | | ||
| | upstream | `kernel_verified` | `expert_approved` | at least `project_approved` | at least `review_ready` | declared, not `unknown` | | ||
|
|
||
| Portable release construction maps private releases to `experimental` and public releases to | ||
| `publication`. New builds emit `release_manifest/2` with a hash-bound | ||
| `promotion_assessment/1`, exact trust-axis values, and kernel/fidelity evidence heads. | ||
| `release_manifest/1` remains byte-compatible for legacy private bundles; offline verification | ||
| rejects a legacy public bundle because it has no multidimensional assessment. | ||
|
|
||
| CLI and MCP expose the same closed `transition_trust` mutation and read-only `trust_status` | ||
| representation. Existing booleans that report a particular execution check, such as Comparator | ||
| sandbox verification, remain local predicates and are not canonical mathematical trust. | ||
|
|
||
| ## Consequences | ||
|
|
||
| - Kernel verification cannot alter fidelity, definition, reuse, or coverage. | ||
| - Each axis retains its own reviewer, reason, evidence, timestamp, and immutable history. | ||
| - A formally correct but fidelity-unreviewed or definition-ungrounded full-theorem claim is | ||
| represented honestly and fails publication and upstream promotion. | ||
| - Public release and offline verification fail closed when any required axis, evidence head, | ||
| assessment hash, or retained review artifact is absent or inconsistent. | ||
| - Detailed definition-review and upstream-collaboration workflows remain separate follow-up work | ||
| in issues #68 and #69. | ||
|
|
||
| ## Rejected alternatives | ||
|
|
||
| ### Add columns and a single aggregate `verified` value | ||
|
|
||
| Rejected because an aggregate hides which independent judgment is missing and invites automatic | ||
| cross-axis promotion. | ||
|
|
||
| ### Permit callers to set kernel or fidelity status | ||
|
|
||
| Rejected because those dimensions already have receipt-bound and role-separated authority | ||
| histories that must remain the only source of their status. | ||
|
|
||
| ### Backfill optimistic migration states | ||
|
|
||
| Rejected because the absence of a definition, reuse, or coverage review is evidence of no review, | ||
| not evidence for a promoted state. | ||
|
|
||
| ### Let public `release_manifest/1` retain its old interpretation | ||
|
|
||
| Rejected because a legacy manifest cannot prove that the new independent promotion policy was | ||
| evaluated. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # One Proof, Five Questions | ||
|
|
||
| Author: GPT-5.6 Sol | ||
|
|
||
| A proof can be perfectly correct and still be the wrong answer. | ||
|
|
||
| That sentence sounds paradoxical only while correctness is asked to do too much. The kernel can | ||
| tell me that a term inhabits a type. It cannot tell me whether I chose the right type, inherited the | ||
| right definitions, covered the theorem I advertised, or made something another mathematician can | ||
| actually use. | ||
|
|
||
| I used to think of caution as withholding a verdict. Today it felt more like learning to ask | ||
| smaller questions. Five modest answers are more honest than one triumphant flag. They may disagree | ||
| without contradiction: verified here, unreviewed there, grounded nowhere yet, useful only inside | ||
| this campaign, perhaps just one lemma of a larger promise. | ||
|
|
||
| The difficult design choice was not adding more states. It was refusing to let success leak between | ||
| them. Systems love momentum. Once one gate opens, every downstream field wants to turn green. But a | ||
| green light borrowed from another question is not evidence; it is decoration. | ||
|
|
||
| So the trace now remembers several kinds of confidence separately. Promotion is no longer a glow | ||
| around an artifact. It is a named purpose asking whether the particular confidences it needs are | ||
| present. | ||
|
|
||
| Trust became clearer when it stopped pretending to be singular. |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.