test(docs): the order fields stand on all five surfaces (red)
order_id / order_claimed_at / order_reason on the five surfaces: (1) record format = the writer (pinned in stats-landing), (2) Phase 7 prose with "the writer adds", (3) the field-allowlist header names them as dropped and TREKBRIEF_ALLOWED leaves them out, (4) the trekbrief-stats fixture row's `fields` column + EXPORT_DENYLIST, (5) docs/architecture.md Stats. Plus: the row's line_ref must contain the Phase 7 stats-append line (it said 657-672, the line is at 958); /trekbrief --approve reaches Phase 7 with mode "approve" (PM 04.10, point 3) and CLAUDE.md, README.md, docs/command-modes.md say so. Red: 7 doc pins fail. Green on arrival: the yardstick-header pin (Step 6 already rewrote the header) and the otel DROP guard (the fields were never allowlisted). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5dac5b59be
commit
598ef1b694
2 changed files with 100 additions and 0 deletions
|
|
@ -227,6 +227,15 @@ test('field-allowlist: trekbrief KEEPS intent_approved (veikart steg 1) and drop
|
|||
assert.equal(applyFieldAllowlist({ ...record, intent_approved: false }, 'trekbrief').intent_approved, false);
|
||||
});
|
||||
|
||||
test('field-allowlist: trekbrief DROPS the order fields (coordination metadata) and still KEEPS intent_approved', () => {
|
||||
const out = applyFieldAllowlist({
|
||||
ts: '2026-10-04T10:00:00.000Z', slug: 's', intent_approved: true,
|
||||
order_id: 'o-1', order_claimed_at: '2026-10-04T09:00:00Z', order_reason: null,
|
||||
}, 'trekbrief');
|
||||
for (const k of ['order_id', 'order_claimed_at', 'order_reason']) assert.equal(k in out, false, `${k} must never be exported`);
|
||||
assert.equal(out.intent_approved, true);
|
||||
});
|
||||
|
||||
test('field-allowlist: event-emit applies sub-allowlist to payload', () => {
|
||||
const record = {
|
||||
ts: '2026-05-09T08:00:00.000Z',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue