Phase 1 — trust-tiered adapter registry, isolation, permissions, checkpoints - #35
Merged
Merged
Conversation
…, checkpoints - sapiens.registry: SYNTHETIC/CORE/UNTRUSTED trust tiers derived from manifest provenance facts, replacing the Phase-0 synthetic-only gate - sapiens.permissions: owner-permission/licence manifest (permissions.json, empty by default — zero third-party permissions, clean-room invariant enforced by code); UNTRUSTED adapters require an active matching entry - sapiens.isolation: subprocess execution with POSIX rlimits (CPU, address space, open files) + wall-clock timeout for UNTRUSTED adapters; every failure mode contained fail-closed - sapiens.checkpoints: HMAC-SHA256 signed ledger checkpoints (env-held key, never stored) + external anchor export/verify; ledger gains checkpoint event kind with continuity verification - kernel: UNTRUSTED-tier adapters validate only via isolation; L4 stays human-gated; no real-data adapter ships in this phase - models: AdapterManifest gains code_origin / data_sources / third_party_source with coherence checks - tests: 45 new (permissions, registry, isolation incl. CPU/memory-hog and timeout containment, checkpoints, kernel isolation); fixed stale module-level time-budgeted ExecutionContext in photometry tests - docs: README/ROADMAP/ARCHITECTURE/PROVENANCE truthful for Phase 1; version 0.2.0 Closes #12, closes #13, closes #14, closes #15, closes #16. Part of #7.
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.
Phase 1 — legal/licence gate and adapter hardening
Implements epic #7 (tasks #12–#16). Contract:
ROADMAP.mdPhase 1.What lands
sapiens/registry.pysapiens/permissions.py+permissions.jsonsapiens/isolation.pysapiens/checkpoints.py,sapiens/ledger.pycheckpointevent kind with continuity verification; optional HMAC-SHA256 signature (env-held key, never stored); external anchor export/verify.sapiens/kernel.pysapiens/models.pycode_origin/data_sources/third_party_sourcewith coherence validation.Honest limits (documented in code + ARCHITECTURE.md)
Invariants verified
scientific_discoveries_claimed: 0.permissions.jsonempty.Also fixed
Pre-existing fragility: module-level
ExecutionContext(10, 2)intest_photometry_adapter.pystarted its wall clock at collection time and expired once the suite grew past ~2s. Replaced with per-call fresh contexts.Closes #12, closes #13, closes #14, closes #15, closes #16. Part of #7.