Skip to content

P0: Authenticate release dependencies before Runtime semantic resolution #808

Description

@wanghuan-520

Incident and baseline

Corrects trust-boundary defects merged by PR #802. Supersedes failed/refined #807 and implements the mandatory corrections tracked by #806/#800/#745.

Start from current dev@b50a81b16cf4d93ffc80cb2abf1c7f96f202e958 or a fresh descendant after preflight.

Use real immutable provenance inputs only:

  • repository source commit from committed package-release/testing-package-release.v1.source-commit, and require the Git object exists;
  • fkst-packages commit from .fkst/conformance/fkst-packages.pin;
  • fkst-substrate commit from .fkst/substrate-ref.

Do not use repeated-character pseudo commits as accepted source identities.

Objective

Fix two existing release-verifier defects without changing any committed signed release, authorization, bundle, manifest, source pin, schema-catalog, or schema-release bytes:

  1. authenticate DSSE and its exact release subject before reading dependent artifacts;
  2. treat publisher metadata as authenticated semantic claims only, then authorize execution through the existing Runtime-owned closed semantic mapping registry.

Authenticated read ordering

In scripts/verify_testing_package_release.mjs, enforce:

  1. validate complete CLI policy grammar with no artifact reads;
  2. read exact release bytes and enforce --expected-release-sha256;
  3. parse/canonical-check the same release buffer and enforce time/sequence/revocation policy;
  4. read and exact-pin authorization bytes;
  5. read only the DSSE envelope, verify canonical/profile/key ID/signature, parse its statement, and bind the exact release subject digest;
  6. only after successful step 5 read manifest, bundle, tool catalog, schema catalog, or schema release;
  7. only after all dependent bindings verify may materialization/module load/execution occur.

Remove the pre-DSSE Promise.all over dependent paths.

Causal regression: use an invalid signature with nonexistent dependent paths and assert signature failure wins over ENOENT, no dependent stages occur, and no extraction/executor/effect sentinel appears.

Runtime-owned semantic authorization

Publisher-authenticated module, function, and tool port strings are not executable authority. They may be canonical authenticated metadata, but must not select imports, functions, or host ports.

After release/artifact verification, return only authenticated semantic facts:

  • execution profile;
  • package ID and version;
  • entrypoint;
  • contract major;
  • ordered capabilities.

Pass those facts through the existing contract.testing_package_executor.semantic_mappings / testing_runtime.testing_package_executor resolution boundary. Require exactly one locally owned mapping. Zero, multiple, or unsupported mappings fail before module loading, executor invocation, or effects.

The Runtime-owned resolved invocation supplies the authorized executor ID and locally owned capability adapter. Only the Runtime-owned browser_read_title adapter may be exposed for the accepted browser.read-title.v1 capability. No publisher-controlled dynamic import, function lookup, or port exposure is permitted.

Causal tests:

  • positive authenticated semantic facts resolve exactly one local mapping and execute the existing executor;
  • zero/multiple mapping cases fail closed before load/effects;
  • re-signed publisher metadata with changed module/function/port cannot redirect execution or call a sentinel default;
  • complete passing ResultAuthority receipt validates through contract.testing_result_authority.validate_receipt.

Existing owners

Extend only existing owners where possible:

  • scripts/verify_testing_package_release.mjs
  • scripts/testing_package_release_test.py
  • existing contract.testing_package_executor.semantic_mappings
  • existing testing_runtime.testing_package_executor / package resolver
  • documentation only if needed

Do not create another release format, verifier, resolver, executor, Runner, reducer, ResultAuthority, Runtime state machine, or capability port registry.

Artifact and signing boundary

All successor generation in tests uses fresh temporary roots, the real committed source pin and dependency pins, and an explicit public test-only Ed25519 seed. Snapshot all current package-release/ and schema-release bytes before tests and prove exact identity afterward. Never access or introduce a production signing seed.

Acceptance criteria

Non-goals

Do not publish successor production artifacts, persist Runtime policy, implement trust-root distribution/rotation, revocation transport/history, Browser lifecycle, Talos/NyxID/PQL integration, or model execution.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions