Skip to content

spec: formalize Kest v0.3.0 specification in versioned spec/ folder#4

Merged
eterna2 merged 5 commits intomainfrom
spec/v0.3.0-formalization
Apr 9, 2026
Merged

spec: formalize Kest v0.3.0 specification in versioned spec/ folder#4
eterna2 merged 5 commits intomainfrom
spec/v0.3.0-formalization

Conversation

@eterna2
Copy link
Copy Markdown
Owner

@eterna2 eterna2 commented Apr 8, 2026

Summary

Formalizes the Kest v0.3.0 specification as a language-agnostic, normative document and moves it to a dedicated versioned spec/ folder.

Changes

Repository structure

  • SPEC.md (root) → spec/SPEC-v0.3.0.md (versioned; future revisions get their own files)
  • spec/README.md — version index table
  • website/scripts/sync-spec.sh — automates sync to website docs on every build
  • website/moon.yml — build input updated to track spec/SPEC-v0.3.0.md
  • README.md — prominent spec link added below badges

Specification updates (this session)

Requirement Change
F-TS-02 ORIGIN_TRUST_MAP defaults are mandatory; deployments MAY add custom mappings
F-AE-13 (new) policy_context MUST be present in every signed KestEntry; deviations[] always required
F-CP-02/03 Interceptor and Propagator are deployment-agnostic: in-process OR sidecar
F-CP-04 Claim-check TTL risk noted; OTel collector rehydration processor recommended
F-TE-04 Lineage visualiser demoted to SHOULD; output format left to implementer
§5.1 Mechanism descriptions added for SPIREProvider, AWSWorkloadIdentity, OIDCIdentity, BedrockAgentIdentity

- Move SPEC.md → spec/SPEC-v0.3.0.md (versioned filename for future revisions)
- Add spec/README.md as a version index table
- Add website/scripts/sync-spec.sh to automate sync to website content
- Update website/moon.yml build input to track spec/SPEC-v0.3.0.md
- Update website/content/design/07_kest_spec_v0.3.0.md (regenerated)
- Add prominent spec link in README.md (badges section)

Spec changes in this session:
- F-TS-02: ORIGIN_TRUST_MAP defaults are mandatory; custom mappings are allowed
- F-AE-13: policy_context MUST be present in every KestEntry (deviations auditable)
- F-CP-02/03: interceptor and propagator are deployment-agnostic (in-process or sidecar)
- F-CP-04: claim-check TTL risk noted; OTel collector rehydration processor recommended
- F-TE-04: lineage visualiser demoted to SHOULD; output format left to implementer
- §5.1: added mechanism descriptions for SPIREProvider, AWSWorkloadIdentity,
         OIDCIdentity, and BedrockAgentIdentity with authoritative references
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

🔍 Site Preview Deployed

Deployment URL
This PR https://eterna2.github.io/kest/preview/spec-v030-formalization/
stable (current main) https://eterna2.github.io/kest/stable/
All versions https://eterna2.github.io/kest/
Branch spec/v0.3.0-formalization
Commit fc4047d04ec2ef9089995a6e6edc992735c9917e

Preview updates automatically on every push to this branch. It will be removed when this PR is closed.

…e, policy_context

Rust layer (models.rs, lib.rs):
- Add schema_version, KestRuntime, PolicyContext, PolicyDeviation to KestEntry
- Expose policy_context getter via PyO3 bridge (accepts dict, returns dict)
- All serialized entries now carry runtime + policy_context (F-AE-05/06/13)

Python layer (models.py):
- MAX_BAGGAGE_SIZE set to 4096 (F-CP-04)
- Remove silent .mock-sig. / .pending. bypass in PassportVerifier
- Add register_origin_trust() with protection of mandatory defaults (F-TS-02)
- Export register_origin_trust from kest.core public API

Python layer (decorators.py):
- Add _uuid7() — spec-compliant UUID v7 generator (F-AE-04)
- Both sync and async wrappers now use _uuid7() for entry_id
- self_score now correctly sourced from ORIGIN_TRUST_MAP for non-root nodes (F-TS-03)
- policy_context (with tier lists + deviations=[]) passed to every KestEntry
- Remove debug print() calls from both wrappers

Tests:
- models_test.py: 29 new normative tests (all green)
- local_test.py: assert proper base64url signature structure, not .mock-sig.
- logic_test.py: assert valid JWS compact structure, not mock-sig string count

All 120 unit tests passing.
Root causes and fixes:
- OPA policy: revert trust_score thresholds to 0-100 integer scale
  matching ORIGIN_TRUST_MAP (was incorrectly changed to 0.0-1.0 float)
- Lab audit file path: /app/ → /workspace/app/ to match docker-compose
  bind-mount working directory
- Security halt test: capture passport from inside decorated function
  scope (decorator detaches context in finally block)
- JWS parsing: use split('.', maxsplit=2) to handle EdDSA signatures
  containing dots in the signature segment
- Keycloak/Gateway skip markers: add requires_keycloak/requires_gateway
  for graceful degradation when services are unavailable
- Cedar policy path: use /workspace/app/cedar/policies in containers
- moon.yml: add health checks for hop1, kest-agent, kest-gateway before
  running test suite
- Promoted Spec v0.3.0 to standalone sidebar section
- Implemented mobile-first responsive design with expandable code/image blocks
- Fixed duplicate headers and description extraction in MDX templates
- Updated trust degradation diagram with mathematically accurate visual
- Enhanced code blocks with full-screen expand and responsive copy buttons
- Replaced hero image with cyberpunk-themed asset
@eterna2 eterna2 merged commit 72c7bae into main Apr 9, 2026
4 checks passed
@eterna2 eterna2 deleted the spec/v0.3.0-formalization branch April 9, 2026 00:37
eterna2 added a commit that referenced this pull request Apr 25, 2026
…endencies (#103)

This commit updates several dependencies to address known security vulnerabilities:
- aiohttp: 3.13.3 -> 3.13.4 (Fixes #19-28)
- cryptography: 46.0.5 -> 46.0.7 (Fixes #17, #29)
- requests: 2.32.5 -> 2.33.0 (Fixes #16)
- Pygments: 2.19.2 -> 2.20.0 (Fixes #4, #18)
- PyJWT: 2.11.0 -> 2.12.1 (Fixes #1)
- postcss: 8.4.31 -> 8.5.10 (Fixes #40)
- uuid: 11.1.0 -> 14.0.0 (Fixes #39)

Verified with moon run kest-core-python:test and moon run website:build.
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