=== derive_affected_globs: normalised, deduplicated, section-bounded
services/widgets-svc/**
services/*/src/routes/**
apps/web/src/app/(app)/widgets/**
packages/shared-ts/src/index.ts
db/migrations/*.sql
docs/**
rc=0
=== derive_affected_globs: no Affected systems section
rc=1
=== derive_affected_globs: missing file
rc=0
=== suite_map_add: no suite map
ERR   ! suite-map: harness/qa/suite-map.yaml missing — cannot register acceptance:story-001
rc=1
=== suite_map_add: append to an existing rule
rc=0
=== suite_map_add: already registered -> no-op
rc=1
=== suite_map_add: a new glob gets a new rule with smoke
rc=0
=== suite_map_add: single-quoted glob matches
rc=0
--- suite-map.yaml after the adds
# routing map
- glob: "services/widgets-svc/**"
  suites: [api-contract, smoke, acceptance:story-001]
- glob: 'db/migrations/*.sql'
  suites: [migration-validation, acceptance:story-002]
- glob: "apps/web/**"
  suites: [acceptance:story-001, smoke]
=== promote: an invalid story key
ERR promote-acceptance: story id must be a story key, e.g. STORY-001 or PROJ-123 (got 'story 1')
rc=2
=== promote: no story directory
ERR promote-acceptance: no story directory for STORY-404
rc=1
=== promote: pack copied, routes registered
LOG   promote-acceptance: STORY-001 — 2 pack file(s) → harness/stories/STORY-001/testing/acceptance
LOG   promote-acceptance: suite-map services/*/src/routes/** += acceptance:story-001
LOG   promote-acceptance: suite-map apps/web/src/app/(app)/widgets/** += acceptance:story-001
LOG   promote-acceptance: suite-map packages/shared-ts/src/index.ts += acceptance:story-001
LOG   promote-acceptance: suite-map db/migrations/*.sql += acceptance:story-001
LOG   promote-acceptance: suite-map docs/** += acceptance:story-001
METRIC {"event":"acceptance_pack_promoted","story_id":"STORY-001","pack_files":2,"suite_map_entries_added":5,"at":"2026-10-18T00:00:00+00:00"}
rc=0
--- testing/ after the promotion
./.gitkeep
./acceptance/api.http
./acceptance/journeys/widgets.spec.ts
./acceptance/old/kept.ts
./api.http
./artifacts/shot.png
./journeys/widgets.spec.ts
./story-qa.md
--- suite-map.yaml after the promotion
# routing map
- glob: "services/widgets-svc/**"
  suites: [api-contract, smoke, acceptance:story-001]
- glob: 'db/migrations/*.sql'
  suites: [migration-validation, acceptance:story-002, acceptance:story-001]
- glob: "apps/web/**"
  suites: [acceptance:story-001, smoke]
- glob: "services/*/src/routes/**"
  suites: [acceptance:story-001, smoke]
- glob: "apps/web/src/app/(app)/widgets/**"
  suites: [acceptance:story-001, smoke]
- glob: "packages/shared-ts/src/index.ts"
  suites: [acceptance:story-001, smoke]
- glob: "docs/**"
  suites: [acceptance:story-001, smoke]
=== promote: re-run is idempotent (no map change)
LOG   promote-acceptance: STORY-001 — 2 pack file(s) → harness/stories/STORY-001/testing/acceptance
LOG   promote-acceptance: suite-map already routes acceptance:story-001 (or no affected-systems globs derivable) — no map change
METRIC {"event":"acceptance_pack_promoted","story_id":"STORY-001","pack_files":2,"suite_map_entries_added":0,"at":"2026-10-18T00:00:00+00:00"}
rc=0
=== promote: no requirements file -> copied, not routed
LOG   promote-acceptance: STORY-002 — 1 pack file(s) → harness/stories/STORY-002/testing/acceptance
ERR   ! promote-acceptance: harness/stories/STORY-002/requirements/requirements.md missing — pack copied but NOT routed (nightly sweep is the only coverage)
METRIC {"event":"acceptance_pack_promoted","story_id":"STORY-002","pack_files":1,"suite_map_entries_added":0,"at":"2026-10-18T00:00:00+00:00"}
rc=0
=== promote: no testing dir, no derivable globs
LOG   promote-acceptance: STORY-003 — 0 pack file(s) → harness/stories/STORY-003/testing/acceptance
LOG   promote-acceptance: suite-map already routes acceptance:story-003 (or no affected-systems globs derivable) — no map change
METRIC {"event":"acceptance_pack_promoted","story_id":"STORY-003","pack_files":0,"suite_map_entries_added":0,"at":"2026-10-18T00:00:00+00:00"}
rc=0
=== promote: suite map missing -> copied, not routed, rc 3 (B-17)
LOG   promote-acceptance: STORY-001 — 2 pack file(s) → harness/stories/STORY-001/testing/acceptance
ERR   ! promote-acceptance: harness/qa/suite-map.yaml missing — pack copied but NOT routed (create it, then re-run --promote-acceptance STORY-001)
METRIC {"event":"acceptance_pack_promoted","story_id":"STORY-001","pack_files":2,"suite_map_entries_added":0,"at":"2026-10-18T00:00:00+00:00"}
rc=3
=== nightly: nothing configured but the default performance suite
LOG   nightly[tests]: SKIP (not configured)
LOG   nightly[e2e]: SKIP (not configured)
LOG   nightly[performance]: bash harness/qa/suites/performance/run.sh
LOG   nightly[performance]: PASS
LOG   nightly[security]: SKIP (not configured)
METRIC {"event":"nightly_run","suites_run":1,"findings_count":0,"duration_ms":0,"report":"logs/nightly-20261018-000000.md","at":"2026-10-18T00:00:00+00:00"}
LOG Nightly sweep complete: 1 suites, 0 finding(s) — report: logs/nightly-20261018-000000.md
rc=0
--- the report
# Nightly QA sweep — 2026-10-18T00:00:00+00:00

Invocation: orchestrate.sh --nightly (T-CDL-004). One line per category below;
FAIL lines carry the exit code and log path, and each FAIL filed a P2 bug.

- tests: SKIP (not configured)
- e2e: SKIP (not configured)
- performance: PASS
- security: SKIP (not configured)
--- the performance log
perf ok
=== nightly: two categories fail, one bug filing fails
LOG   nightly[tests]: echo all tests; exit 0
LOG   nightly[tests]: PASS
LOG   nightly[e2e]: echo e2e; exit 3
ERR   nightly[e2e]: FAIL (exit 3) — logs/nightly-e2e-20261018-000000.log
CALL file_qa_bug [] [P2] [nightly-sweep] [Nightly e2e sweep regression (20261018-000000)] [the nightly e2e suite passes] [exit 3 from: echo e2e; exit 3] [logs/nightly-e2e-20261018-000000.log, logs/nightly-20261018-000000.md]
LOG   nightly[performance]: bash harness/qa/suites/performance/run.sh
LOG   nightly[performance]: PASS
LOG   nightly[security]: echo sec; exit 1
ERR   nightly[security]: FAIL (exit 1) — logs/nightly-security-20261018-000000.log
CALL file_qa_bug [] [P2] [nightly-sweep] [Nightly security sweep regression (20261018-000000)] [the nightly security suite passes] [exit 1 from: echo sec; exit 1] [logs/nightly-security-20261018-000000.log, logs/nightly-20261018-000000.md]
ERR   ! nightly[security]: bug filing failed — finding recorded in the report only
METRIC {"event":"nightly_run","suites_run":4,"findings_count":2,"duration_ms":0,"report":"logs/nightly-20261018-000000.md","at":"2026-10-18T00:00:00+00:00"}
LOG Nightly sweep complete: 4 suites, 2 finding(s) — report: logs/nightly-20261018-000000.md
rc=1
--- the report
# Nightly QA sweep — 2026-10-18T00:00:00+00:00

Invocation: orchestrate.sh --nightly (T-CDL-004). One line per category below;
FAIL lines carry the exit code and log path, and each FAIL filed a P2 bug.

- tests: PASS
- e2e: FAIL (exit 3 — logs/nightly-e2e-20261018-000000.log)
- performance: PASS
- security: FAIL (exit 1 — logs/nightly-security-20261018-000000.log)
--- the e2e log
e2e
=== nightly: E2E_REAL_BASE_URL appends the real project
LOG   nightly[tests]: echo all tests; exit 0
LOG   nightly[tests]: PASS
LOG   nightly[e2e]: echo e2e mock && echo real e2e
LOG   nightly[e2e]: PASS
LOG   nightly[performance]: bash harness/qa/suites/performance/run.sh
LOG   nightly[performance]: PASS
LOG   nightly[security]: echo sec; exit 1
ERR   nightly[security]: FAIL (exit 1) — logs/nightly-security-20261018-000000.log
CALL file_qa_bug [] [P2] [nightly-sweep] [Nightly security sweep regression (20261018-000000)] [the nightly security suite passes] [exit 1 from: echo sec; exit 1] [logs/nightly-security-20261018-000000.log, logs/nightly-20261018-000000.md]
METRIC {"event":"nightly_run","suites_run":4,"findings_count":1,"duration_ms":0,"report":"logs/nightly-20261018-000000.md","at":"2026-10-18T00:00:00+00:00"}
LOG Nightly sweep complete: 4 suites, 1 finding(s) — report: logs/nightly-20261018-000000.md
rc=1
--- the e2e log
e2e mock
real e2e
=== nightly: every category from the env overrides (real project not appended)
LOG   nightly[tests]: echo env tests
LOG   nightly[tests]: PASS
LOG   nightly[e2e]: echo env e2e
LOG   nightly[e2e]: PASS
LOG   nightly[performance]: echo env perf
LOG   nightly[performance]: PASS
LOG   nightly[security]: echo env sec
LOG   nightly[security]: PASS
METRIC {"event":"nightly_run","suites_run":4,"findings_count":0,"duration_ms":0,"report":"logs/nightly-20261018-000000.md","at":"2026-10-18T00:00:00+00:00"}
LOG Nightly sweep complete: 4 suites, 0 finding(s) — report: logs/nightly-20261018-000000.md
rc=0
--- the e2e log
env e2e
