9 Commits
Author SHA1 Message Date
kevinveenbirkenbach 7006699309 Merge remote-tracking branch 'origin/main' into fix/tests/codescan-test-hygiene 2026-11-12 09:46:24 +00:00
kevinveenbirkenbach 1df2496006 test(test-e2e-playwright): wait for the clear job instead of 0.6 s
test_an_onion_job_waits_while_tor_is_being_recreated slept a fixed
0.6 s and then expected the 0.1 s clear job to have ended; under the
load of quality-high pass 12 it had not (0 != 1). The failed assert
also left the tor lock held, so the runner thread outlived the test
and raised FileNotFoundError in the next one. The test now polls up to
ten seconds for the clear job's end stamp, then checks that the onion
job has not started, and releases the lock in a finally block. With
the clear job slowed to 0.8 s the old form fails with 0 != 1 and the
new one passes.

🎯 Fix: 93 %
💥 Break: 1 %
💸 Cost: 100 %
⏱️ Time: 100 %
🛡️ Security: 100 %
🏆 Score: 92
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit b2c3ba7e2d87b50c04b71b872de71e9c7ba7f5d5)
2026-11-11 22:34:13 +00:00
kevinveenbirkenbachandClaude Opus 5.5 c7403c4652 fix(tests): close the code-scanning findings in test helpers
- test_run_parallel.py: open the Tor lock with 0o600 instead of 0o644
  (alerts 1124, 1125); run_parallel.py already creates it 0o600 and
  every reader runs as the same user.
- litellm and wordpress design specs: escape token and sheet values
  with the shared escapeRegex from personas instead of partial local
  escapes (alerts 939, 940).
- hugo design spec: stub only requests whose parsed hostname is
  algolia.net or a subdomain of it, not every URL that contains
  "algolia.net/" (alert 944); the init script runs in the browser, so
  the check stays inline.

Accepted MEDUSA finding: PQC006 (low) on the unchanged first line of
the litellm spec, a post-quantum summary note triggered by
cookie.name === "token"; present on f55f207dbc, reviewed with
kvb-think-criticize as a false positive.

🎯 Fix: 95 %
💥 Break: 3 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 92
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:03:05 +00:00
kevinveenbirkenbachandClaude Opus 5.5 346d05faf1 test(test-e2e-playwright): make run_parallel rendezvous waits mutual
The concurrency tests proved overlap with a one-sided wait: only one job
waited for its partner's start line. Under load (core `make test` runs
about 80 workers) the partner could start and finish before the waiting
job's interpreter wrote its own start, so `_peak()` saw 1 and
test_onion_jobs_share_tor_with_each_other failed.

- a and b, onion-a and onion-b now wait for each other, so both
  intervals contain both start stamps and overlap whenever the scheduler
  runs them together; a serial scheduler still times out and fails.
- onion-b's timeout is checked like onion-a's.
- every onion job in the tor-cap test waits for clear, so the assertion
  holds whichever onion job takes the single tor slot first.

Evidence: the three tests 20x each across 8 xdist workers, 60 passed;
the whole file, 41 passed.

🎯 fix 92 % · 💥 break 1 % · 💸 cost – · ⏱️ time – · 🛡️ security 100 % · 🏆 score 91

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 08:08:28 +00:00
kevinveenbirkenbachandClaude Opus 5.5 40681927de test(test-e2e-playwright): prove run_parallel overlap without racing stub jobs
The concurrency tests of run_parallel read overlap from wall-clock stamps that include each stub job's python start-up, so under the 80 xdist workers of make test the jobs serialised by accident (quality-high on store-i18n 1f15f528b3: test_onion_jobs_share_tor_with_each_other 1 != 2; on 1c922d39f3: test_a_freed_slot_is_refilled_without_waiting_a_poll 0.6508 not < 0.6). A stub job can now wait until another job has started, so the overlap the tests claim holds by construction and a serialising scheduler times the waiting job out. The freed-slot test polls every 30 s and bounds the refill at 15 s: the green path never waits a poll, and a scheduler that does misses the bound by twice.

🎯 Fix: 94 %
💥 Break: 1 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 93
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:39:23 +00:00
kevinveenbirkenbachandClaude Opus 5.5 c23f0f0d29 Merge five sidetrees into feature/store-i18n
- fix/web-app-docs/codeql-xss (6e045bced8, 92/3): redirect header splitting, DOM-text navigation
- fix/cli/codeql-file-modes (20fae00bdf, 95-97/1-3): owner-only lock and marker files, explicit legend strings, mirror shim import
- fix/roles/codeql-js-hygiene (787f8d9a6d, 92-97/2-3): crypto wrong password, log sanitizer shape, fillStyle save/restore
- fix/svc-ai-agent-broker/codeql-ssrf (eeb9b22ae4, 92/4): platform and relay path from server-side lists, named error paths
- fix/test-e2e-playwright/concurrency-test-load (eb6940a9ad, 95/1): concurrency proven from the trace (gate pass 2 failure)

CodeQL PR #625 alerts #1079 and #957 stay false positives for the operator to dismiss.

🎯 Fix: 92-99 %
💥 Break: 1-4 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: ~100 %
🏆 Score: 88-98
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 17:24:11 +00:00
kevinveenbirkenbachandClaude Opus 5.5 eb6940a9ad test(test-e2e-playwright): prove scheduler concurrency from the trace, not the wall clock
Gate pass 2 on store-i18n 9154a03fed failed test_jobs_run_concurrently_within_the_cap_and_keep_their_own_results at 2.7046 s against a 2.7 s bound: five interpreter starts under full host load. The peak of 2 read from the job trace already proves the overlap and the cap independent of load, and test_a_freed_slot_is_refilled_without_waiting_a_poll covers prompt refills, so the wall-clock bound goes.

🎯 Fix: 95 %
💥 Break: 1 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 94
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 17:23:36 +00:00
kevinveenbirkenbachandClaude Opus 5.5 ae9907df81 fix(test-e2e-playwright): create the tor reader lock owner-only
py/overly-permissive-file on PR #625 (run_parallel.py:287): tor.lock was created 0o644; the scheduler and wait_onion_reachable.sh both run as root under become. The new test sets umask 0 and fails at 0o644.

🎯 Fix: 95 %
💥 Break: 3 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: ~100 %
🏆 Score: 92
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 17:03:10 +00:00
kevinveenbirkenbachandClaude Opus 5.5 de40211272 perf(test-e2e-playwright): run independent Playwright suites in parallel under a pressure gate
WordPress#0 runs 18 Playwright suites one after another and exceeds its
CI time budget. A role that opts in through playwright.parallel in its
meta/tests.yml (WordPress: [3, 1, 1] per variant) now hands its suites to
an async scheduler, run_parallel.py, after staging:

- a suite starts only when its dependencies finished here (Keycloak first)
  and the host's CPU pressure, avg10 and avg60, stayed at or below 36 for
  30 s; the first container always starts and running ones are never
  killed
- onion suites share their own cap of 3 and a Tor lock with a
  recreate-pending marker; a probe that times out on the lock re-probes
  the current circuits and, failing that, leaves only that app to the
  serial path
- an app whose dependency was dropped is deferred, and every deferred app
  gets the serial first pass before the existing retry, in round order
- each job gets --oom-score-adj=1000 instead of a memory limit; crashed
  pages, closed browsers and killed workers are counted and named in the
  per-app timing line
- each job's result.json, stdout and stderr land in run-parallel/ and are
  archived with the reports
- the async ceiling is the serial worst case per app and reachable
  network, curl's per-attempt max time included (now
  TEST_E2E_PLAYWRIGHT_ONION_PROBE_MAX_TIME); it stays above the CI step
  timeout and never raises a budget

Roles without the opt-in run exactly as before; the onion probe script
with an empty lock behaves byte for byte like the previous one.

Tests: 126 role unit tests and 30 negative controls cover the gate
window, admission order, onion cap and lock, marker cleanup, the bounded
wait, dependency deferral, crash counting, artifact collection, the
ceiling for the real WordPress#0 app list, and serial equivalence. No CI
run has exercised it yet; the next push is its live proof.

🎯 Fix: 88 %
💥 Break: 6 %
🌱 Efficiency: –
⚡ Speed: –
🛡️ Security: ~100 %
🏆 Score: 83
🚦 Gate: ⛔ fix 88 % < 90, break 6 % > 5; committed and merged on the operator's word, CI is the live proof

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 15:10:54 +00:00