Traceability: move per-repo settings into traceability.toml
The shared extractor now takes its per-repo taxonomy from a config file rather than CLI flags, so the wrapper shrinks to the one thing it alone knows: the repo root, which the vendored gate cannot infer because its own default resolves inside the submodule. Coverage unchanged at 23/32; the gate reports the scan as '26 (.rs under src, tests)', which is the config being read rather than defaults being guessed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -360,6 +360,50 @@ tail.
|
||||
|
||||
The result is ~1.7 KB per manifest — negligible against a ~4.8 KiB manifest.
|
||||
|
||||
##### Normative v1 parameters
|
||||
|
||||
**The six steps above are not sufficient to reproduce a byte stream.** Each
|
||||
choice below was underspecified and is now pinned; two independent
|
||||
implementations that differ on any one of them produce signatures that never
|
||||
match, which silently defeats the entire mechanism.
|
||||
|
||||
| Parameter | v1 value |
|
||||
|---|---|
|
||||
| Hann window | **Periodic** (not symmetric) |
|
||||
| Band value | **Mean of linear magnitudes** in the band — not sum, not max, and taken before the log |
|
||||
| Peak tie-break | Lowest band index wins |
|
||||
| Energy class | `log10(frame band-energy / upper-median frame energy)`, quantised at **−0.6 / −0.2 / +0.2** |
|
||||
| Byte layout | `(band << 2) | class` — 5-bit band, 2-bit class |
|
||||
| Base64 | Standard alphabet, with padding |
|
||||
| Frame count | Whole frames only. Over 1 323 000 samples this yields **1288** frames, not "~1290" |
|
||||
|
||||
The energy class is normalised against the **upper-median frame energy** rather
|
||||
than an absolute level, which is what makes it invariant to gain and to trim
|
||||
differences between releases. The thresholds straddle the median rather than
|
||||
sitting on it, so a frame near the centre of the distribution does not flip class
|
||||
under small perturbations.
|
||||
|
||||
##### Conformance fixture
|
||||
|
||||
A golden fixture is the authoritative tiebreak, because prose cannot pin
|
||||
floating-point behaviour:
|
||||
`scene-actor-extraction/tests/fixtures/audio/jray_audio_v1_golden.json`.
|
||||
|
||||
It carries the expected signature, the decoded-window PCM checksum, the full
|
||||
32-entry band→FFT-bin table, and the parameter contract — **an implementation can
|
||||
be written from that file alone.** The PCM checksum is asserted separately from
|
||||
the signature so a codec-level divergence is distinguishable from a DSP one.
|
||||
|
||||
**Implementations should compute the FFT themselves** (radix-2, double
|
||||
precision) rather than depending on a library whose version could change the
|
||||
numerics. Verified decision margins on the fixture are 1.3% between the two
|
||||
strongest bands and 3.6e-3 in log10 to an energy-class edge — many orders above
|
||||
double-precision noise, so any two correct implementations agree.
|
||||
|
||||
Measured on that fixture: the peak-band sequence survives a stereo/44.1 kHz round
|
||||
trip and AAC 128 kbit/s re-encoding **exactly** (score 1.00), which is the
|
||||
codec-robustness this design claims.
|
||||
|
||||
This is deliberately a **peak-bin** signature rather than a full spectrum:
|
||||
peaks survive lossy re-encoding, loudness normalisation and channel-layout
|
||||
differences, whereas absolute magnitudes do not. It follows the same principle
|
||||
|
||||
Reference in New Issue
Block a user