Require explicit cadence profile assessment and correct contract pins
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a0e77d-47a4-7771-8e34-7339c7fac0e4
This commit is contained in:
parent
9383b94019
commit
36303d25a3
7 changed files with 281 additions and 20 deletions
|
|
@ -9,6 +9,56 @@ classes passed with `--load-bearing`, `--rare-load-bearing`, and
|
|||
`--attributive` come from the source's authoritative inventory; the checker
|
||||
does not infer them from names, payloads, or observed traffic.
|
||||
|
||||
## Assessment modes and results
|
||||
|
||||
A security-profile assessment requires at least one source-owned class
|
||||
assertion. For example, to check local-identity's documented rare classes:
|
||||
|
||||
```bash
|
||||
python3 tools/emission-cadence-profile/emission_cadence_profile.py \
|
||||
--contract-schema ../info-tech-canon/infospace/schemas/emission-cadence.schema.yaml \
|
||||
--rare-load-bearing serve/token.token_issued \
|
||||
--rare-load-bearing revoke-token \
|
||||
local-identity/emission-cadence.yaml
|
||||
```
|
||||
|
||||
This declaration currently fails both heartbeat obligations. To intentionally
|
||||
check only its structure against the imported JSON Schema:
|
||||
|
||||
```bash
|
||||
python3 tools/emission-cadence-profile/emission_cadence_profile.py \
|
||||
--contract-schema ../info-tech-canon/infospace/schemas/emission-cadence.schema.yaml \
|
||||
--schema-only local-identity/emission-cadence.yaml
|
||||
```
|
||||
|
||||
| Invocation/result | `contract_valid` | `profile_assessed` | `conformant` | Exit |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Valid schema, no inventory, default mode | true | false | null | 2 |
|
||||
| Valid schema, explicit `--schema-only` | true | false | null | 0 |
|
||||
| Invalid schema/declaration, either mode | false | false | null | 1 |
|
||||
| Supplied inventory, profile passes | true | true | true | 0 |
|
||||
| Supplied inventory, profile fails | true | true | false | 1 |
|
||||
|
||||
`assessment_scope` is `schema-only`, `inventory-missing`, or
|
||||
`supplied-inventory`. The report includes the exact sorted `inventory`
|
||||
assertions. Profile results cover only those assertions: the checker cannot
|
||||
prove that the caller supplied a complete inventory or that events are emitted
|
||||
and observed. `contract_valid` means JSON Schema validity, not every semantic
|
||||
rule in the generic standard; duplicate source IDs are checked during profile
|
||||
assessment.
|
||||
|
||||
`--schema-only` cannot be combined with class assertions or `--fail-on-should`.
|
||||
Blank class arguments are rejected. Invalid CLI options and unreadable input
|
||||
also exit 2. SHOULD findings remain advisory unless `--fail-on-should` is used.
|
||||
|
||||
**Compatibility:** callers that previously omitted class arguments must now
|
||||
choose schema-only validation or supply an inventory. `conformant` can be null;
|
||||
automation claiming profile success must require `profile_assessed == true`
|
||||
and `conformant == true`, rather than merely checking for no findings or an
|
||||
exit code of zero. No evidence classification is inferred from the document.
|
||||
|
||||
## Verification
|
||||
|
||||
Run its tests with:
|
||||
|
||||
```bash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue