Skip to content

P0: Prepare successor Testing Packages release policy tooling #800

Description

@wanghuan-520

Lineage

Implements the non-secret production tooling portion of #789/#799 and parent #745.
Starts after merged release PRs #787 and #797 and merged rejection-matrix conflict resolution PR #798.
Readiness tracker: #665.

#799 correctly refused to modify signed production artifacts without the authorized private signing seed. This leaf must not access, infer, replace, or counterfeit that key. It prepares the production release profile and tests using ephemeral test-only artifacts while keeping current committed signed artifacts byte-identical.

Objective

Extend the existing release contract, schema, generator capability, verifier, and tests for complete package-side production policy without changing any current committed release descriptor, DSSE envelope, authorization record, bundle, manifest, source pin, or their digests.

The supported successor-release generation path must accept explicit authority/tool/policy inputs plus an external signing seed, but this PR must test it only against deterministic temporary output directories and ephemeral keys.

Required production profile capability

Extend existing code paths to support a successor release descriptor containing:

  • authority issuer, key id, dsse-ed25519.v1 signature profile;
  • canonical valid_from / valid_until UTC window;
  • immutable revocation-authority HTTPS identity;
  • positive safe-integer release sequence;
  • deterministic exact-byte-bound tool catalog containing only browser.read-title.v1 -> browser_read_title under browser-deterministic.v1;
  • explicit existing Runner identity (testing-runner, testing-runner.v1, testing-runner.run);
  • existing executor identity (testing-package-executor.browser-title.v1, testing_package_executor.executor.execute);
  • existing AssertionReducer identity and canonical digest;
  • existing public testing-result-authority-receipt.v1 identity/validator.

Do not create a second release format, verifier, generator, Runner, reducer, result authority, executor, resolver, or Runtime state machine.

Independent consumer-policy verification

Extend the verifier CLI for temporary successor releases with explicit:

  • --verification-time <canonical UTC RFC3339>;
  • --minimum-release-sequence <positive safe decimal integer>;
  • repeatable unique --revoked-keyid <bounded key id>;
  • existing mandatory --expected-release-sha256 and --trusted-authorization-sha256.

Validate complete policy grammar before artifact use. Preserve the exact release-byte gate as the first artifact gate. After release digest match, validate authority window/revocation/sequence before DSSE or code loading where applicable. Runtime owns durable policy state and transport; this package verifier only consumes explicit policy values.

Zero-activity regression from #797

The review gap left by #797 must be fixed here. Add a causal poisoned-input proof for expected-release mismatch:

  • deliberately invalid release JSON bytes;
  • nonexistent authorization/envelope/bundle/manifest/tool-catalog/schema-catalog/schema-release paths;
  • fake engine executable that writes a sentinel if invoked;
  • controlled empty TMPDIR;
  • exact digest-mismatch diagnostic;
  • no parse/ENOENT diagnostic;
  • absent engine sentinel;
  • unchanged empty TMPDIR;
  • empty stage log as supplemental evidence only.

This proves no parse, dependent artifact read, extraction, module load, executor, or effect.

Temporary successor generation tests

Add output-directory support or an equivalent isolated generation API so tests can create a complete successor release in a temporary directory with:

  • explicit source commit and dependency commits;
  • explicit authority metadata and release sequence;
  • explicit fixed creation and verification times;
  • deterministic tool catalog;
  • ephemeral deterministic test seed clearly marked test-only.

Test byte reproducibility, schema/Lua validation, DSSE binding, external trust-pin verification, tool catalog binding, and verified existing-executor ResultAuthorityReceipt smoke. The generated temporary release must not overwrite committed production artifacts.

Negative matrix

Using temporary re-signed/rebound artifacts, cover:

  • not-yet-valid, expired, malformed/reversed/equal window;
  • revoked key and malformed/duplicate revoked inputs;
  • release sequence below floor and malformed/overflow sequence;
  • wrong issuer/key/profile/revocation identity, missing/unknown authority fields;
  • tool catalog path/digest/size/schema/profile/capability/port/execution-profile mismatch, duplicate/extra/prohibited fields;
  • Runner/entrypoint/executor/reducer/result-authority identity mismatch;
  • same-version/different-content expected-release rejection;
  • existing authorization/keyid substitution, source/dependency/catalog/schema/manifest/bundle mutation cases remain green.

All rejection tests assert no forbidden extraction/load/executor/effect after their owning boundary.

Committed artifact immutability

At test start and end, assert exact SHA-256 for all current committed package-release/ artifacts and current schema-release bindings. This PR may update schema/catalog publication only if doing so does not require changing the existing signed release's bound schema bytes; otherwise test the new schema contract as an unreferenced next-release capability and leave the current signed release/catalog bytes unchanged.

If extending the shared schema catalog necessarily changes bytes bound by the current signed release, do not mutate the committed catalog in this leaf. Keep the successor schema fixture/test-local until the authorized signing publication operation can atomically regenerate all bound artifacts.

Acceptance criteria

Follow-up publication boundary

After this tooling PR merges, #745 remains open for one authorized release-publication operation running in a named Hosted environment where FKST_TESTING_PACKAGE_RELEASE_SIGNING_SEED is provisioned out-of-band. That operation regenerates the successor committed artifacts atomically and passes the same verifier/CI. Do not claim #745 completed in this tooling leaf.

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