-
Notifications
You must be signed in to change notification settings - Fork 0
docs(openspec): no demo findings, and the signature's version states its coverage #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
thecodedrift
merged 4 commits into
main
from
openspec/signature-coverage-and-no-findings
Sep 2, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
dae8b0a
docs(openspec): there are no findings, and the concern relocates
thecodedrift 6efdb8d
docs(openspec): the signature's version states what it covers
thecodedrift 585c131
docs(openspec): carry every scenario, because a delta replaces
thecodedrift 0b944c5
docs: a spec delta replaces a requirement, it does not patch it
thecodedrift File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| schema: spec-driven | ||
| created: 2026-09-02 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| ## Why | ||
|
|
||
| The signature envelope is self-describing about **how** a signature was | ||
| computed and silent about **what** it covers. `cli-rule-reconciliation`'s | ||
| `Canonical rule signature envelope` requirement says the algoVersion determines | ||
| "the normalization procedure and hash algorithm" and stops there. Which file a | ||
| rule's signature is over is agreed between the two teams and written down in | ||
| neither specification. | ||
|
|
||
| That gap surfaced when the generator team proposed moving `signature` from the | ||
| rule onto each file, on the grounds that "nothing in the payload says which file | ||
| the signature covers". The observation was right; the remedy was not. The | ||
| binding is a property of the signature scheme rather than of any particular | ||
| delivery, so it belongs in the envelope's definition, not distributed across the | ||
| collection. The proposal was declined and this statement is what we owe instead. | ||
|
|
||
| Stating it also answers the question the proposal was really reaching for: what | ||
| happens when an engine needs to sign more than one file. A new algoVersion is | ||
| the mechanism that already exists for changing what a signature means, so a | ||
| multi-file signature is a v2 signature rather than a new payload shape. | ||
|
|
||
| ## What Changes | ||
|
|
||
| **The envelope's version states its coverage, not only its computation.** A v1 | ||
| signature covers exactly one file, the engine's `ruleFile` from the layout table | ||
| — `check.ts` for runtime. An engine that needs to sign more than one file does | ||
| so under a later algoVersion. | ||
|
|
||
| This is a documentation-level change to a requirement, not a behavioural one. | ||
| No signature changes, no payload changes, and nothing recomputes. The CLI | ||
| already signs exactly the rule file and already reads the algoVersion before | ||
| parsing parameters; this says so where a reader looks for it. | ||
|
|
||
| ## Capabilities | ||
|
|
||
| ### Modified Capabilities | ||
|
|
||
| - `cli-rule-reconciliation`: The canonical signature envelope requirement gains | ||
| the coverage statement and the versioning rule for changing it. | ||
|
|
||
| ## Impact | ||
|
|
||
| - `openspec/specs/cli-rule-reconciliation/spec.md` — one requirement, amended. | ||
| - No source changes. `ALGO_VERSION` stays 1 and `signRuleFile` keeps signing the | ||
| rule file it already signs. | ||
| - Recorded with the generator team in the cross-team document (round thirteen), | ||
| where the per-file proposal was declined and this was offered in its place. |
42 changes: 42 additions & 0 deletions
42
...spec/changes/signature-coverage-statement/specs/cli-rule-reconciliation/spec.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| ## MODIFIED Requirements | ||
|
|
||
| ### Requirement: Canonical rule signature envelope | ||
|
|
||
| The CLI SHALL represent a rule file's canonical signature as a single self-describing | ||
| string of the form `<algoVersion>;h=<algo>;d=<digest>`. For algoVersion `1` this is | ||
| `1;h=sha-256;d=<hex>`, where `<hex>` is the digest as lowercase hexadecimal. The token | ||
| before the **first** `;` is the algoVersion and SHALL be read up to that one delimiter to | ||
| detect the version (and therefore the normalization procedure and hash algorithm) before | ||
| any `key=value` parameters are parsed. Signatures SHALL be compared as whole strings. | ||
|
|
||
| The algoVersion SHALL also determine **what the signature covers**. A signature at | ||
| algoVersion `1` covers exactly one file: the engine's `ruleFile` from the rule layout | ||
| table, which is `check.ts` for the runtime engine. An engine that requires more than one | ||
| file to be signed SHALL do so under a later algoVersion. | ||
|
|
||
| **Rationale.** Coverage is a property of the signature scheme, not of the delivery that | ||
| carries a signature. Stating it on the version keeps a payload from having to say which | ||
| of its files is the signed one, and gives a future multi-file scheme a mechanism that | ||
| already exists rather than a new payload shape. Leaving it unstated is what let both | ||
| teams hold the same binding as a private assumption. | ||
|
|
||
| #### Scenario: Envelope is emitted for algoVersion 1 | ||
|
|
||
| - **WHEN** the CLI computes a signature for a rule file's bytes using algoVersion 1 | ||
| - **THEN** the signature SHALL be the string `1;h=sha-256;d=<hex>` for that file's normalized bytes | ||
|
|
||
| #### Scenario: Version is read before parameters | ||
|
|
||
| - **WHEN** the CLI parses a signature string | ||
| - **THEN** it SHALL read the algoVersion as the substring before the first `;` | ||
| - **AND** SHALL NOT rely on the `key=value` parameter syntax to determine the version | ||
|
|
||
| #### Scenario: Signatures compare as whole strings | ||
|
|
||
| - **WHEN** the CLI compares two signatures for equality | ||
| - **THEN** it SHALL compare the full envelope strings, not the bare digests | ||
|
|
||
| #### Scenario: A v1 signature covers the engine's rule file | ||
|
|
||
| - **WHEN** a runtime rule carries a signature at algoVersion 1 | ||
| - **THEN** that signature SHALL be over `check.ts` and over no other file in the rule directory | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.