mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-12-01 09:24:46 +00:00
Make the OpenCreds conformance claim executable
The conformance page described a fixture suite and an `opencreds conformance` command that did not exist. A specification that documents a conformance surface it cannot run is a specification nobody can hold to, including us. `opencreds conformance` now runs the requirement list as code -- one check per C-number, carrying its own id and level -- and emits the report shape the spec publishes. It exits 2 when a MUST does not pass, so it can gate CI directly. The reference implementation reports 29 passed, 0 failed, 1 skipped; the skip is C19, because key management for the team profile lives in @logicsrc/plugin-credential-sharing rather than in this package, and a skipped MAY does not affect conformance. Fixtures are generated (`--emit-fixtures <dir>`) rather than hand-written. A vector produced by an implementation and then verified by it is worth more than a JSON file someone typed: the typed file drifts silently when the format moves, and the generated one cannot. Fourteen files, including an invalid/ set every conforming reader must reject -- a wrong field group, a weak KDF, an unregistered namespace, a short payload and a tampered manifest. The CLI requirements stay with the end-to-end tests that drive the real binary through a child process; a command cannot meaningfully check its own exit codes, and a masked value that is only masked in the library is not masked. conformance.md and cli.md now describe what ships. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QRQrfuwuYKKV5UB9kLHuX5
This commit is contained in:
parent
13519e631a
commit
8c65d98bdc
6 changed files with 802 additions and 30 deletions
|
|
@ -134,12 +134,18 @@ per failure with a JSON pointer into the document:
|
|||
## Conformance
|
||||
|
||||
```bash
|
||||
opencreds conformance [--fixtures <dir>] [--json]
|
||||
opencreds conformance # a table, one row per requirement
|
||||
opencreds conformance --json # the report, for CI
|
||||
opencreds conformance --emit-fixtures <dir> # generate the fixture set
|
||||
```
|
||||
|
||||
Runs the published fixture suite against this implementation and reports each
|
||||
requirement as pass or fail. An implementation claiming conformance SHOULD run
|
||||
this in CI.
|
||||
Runs the suite against this implementation and reports each requirement as pass,
|
||||
fail or skip. Exits 2 when a MUST does not pass, so it can gate CI directly. An
|
||||
implementation claiming conformance SHOULD run it there.
|
||||
|
||||
`--emit-fixtures` writes the generated fixture set, so another implementation
|
||||
can be tested against exactly what this one produces and accepts. See
|
||||
[conformance.md](./conformance.md).
|
||||
|
||||
## What the CLI never does
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue