feat: freeze local proof scope - #4
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33659ee7fd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return Object.freeze({ | ||
| ...input, |
There was a problem hiding this comment.
Reject undeclared fields from the proof manifest
When release/local-proof-scope.json gains an undeclared property such as a production password, private key, external URL, or absolute path, createLocalProofScope accepts and preserves it through this spread. The audit then omits that property from its output and still exits successfully, so it does not enforce the documented rule that production credentials and external endpoints cannot enter the local proof; reject unknown fields or validate all retained values.
Useful? React with 👍 / 👎.
| if (typeof input.releaseLabel !== 'string' || !LOCAL_PROOF_RELEASE_PATTERN.test(input.releaseLabel)) { | ||
| throw scopeError('LP0_RELEASE_LABEL_INVALID', 'LP0 releaseLabel must use the local-proof version pattern.'); |
There was a problem hiding this comment.
Require the frozen LP0 release label
When the manifest label is changed to another matching value such as v999.0.0-local-proof.2, this pattern check accepts it and test:lp0:audit passes even though LP0 freezes the identity as v0.1.0-local-proof.1 and exports that exact value as LOCAL_PROOF_RELEASE_LABEL. Compare against the frozen constant so an accidental label change cannot silently redefine this proof scope.
Useful? React with 👍 / 👎.
Summary\n- freeze the local-only LP0 proof boundary\n- add reserved names, synthetic-data and offline-runtime manifest\n- add deterministic validator, audit command, tests and CI inventory checks\n\n## Validation\n- npm test\n- npm run typecheck\n- npm run test:lp0:audit\n- GitHub commit checks are green\n\nThe external/public deployment phase remains explicitly deferred.