Files
TORCH/reports/test-audit/test-integrity-note-2025-02-14.yaml
T
google-labs-jules[bot]andPR0M3TH3AN 9d0d7d274e chore: test integrity enforcement and dashboard security fix
- Refactored `test/memory-scheduler.test.mjs` to use `mock.timers` for deterministic execution, replacing flaky `wait` logic.
- Strengthened `test/lock-ops.test.mjs` with edge case tests for `parseLockEvent` handling invalid JSON and missing fields.
- Fixed a security vulnerability in `src/dashboard.mjs` where sensitive configuration (e.g., rosters, auth) was exposed in `/torch-config.json`.
- Updated `src/prompts/daily/test-audit-agent.md` to comply with the canonical prompt contract.
- Added `reports/test-audit/test-integrity-note-2025-02-14.yaml` detailing test changes and anti-cheat measures.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 19:33:29 +00:00

28 lines
1.3 KiB
YAML

test_integrity_note:
change_type: ["refactor_tests", "new_tests", "spec_correction"]
scenarios:
- id: SCN-MEMORY-SCHEDULER-DETERMINISM
given: "A memory maintenance scheduler with retry logic"
when: "A job fails transiently and retries are scheduled"
then: "The scheduler waits exactly the retry delay without using real time sleep"
- id: SCN-LOCK-PARSE-MALFORMED
given: "A lock event with invalid JSON content or missing fields"
when: "The event is parsed"
then: "The parser returns a lock object with null content fields instead of throwing or returning partial data"
- id: SCN-DASHBOARD-CONFIG-SANITIZATION
given: "A dashboard configuration with sensitive fields (roster, auth)"
when: "The /torch-config.json endpoint is accessed"
then: "Sensitive fields are stripped from the response"
observable_outcomes:
- "Scheduler tests run deterministically using mock timers"
- "Lock parser handles garbage input gracefully"
- "Dashboard config endpoint does not leak sensitive roster data"
determinism_controls:
- "Replaced setTimeout/wait with node:test mock.timers"
anti_cheat_rationale:
prevents:
- "retry/sleep-based flake masking"
- "hard-coded return value (dashboard config fix)"
relaxation:
did_relax_any_assertion: false