Skip to content

feat(smartqa): S4.2c flow artifact data safeguards, T4-T5 (CHE-2111) [squash] - #246

Merged
congvc-dev merged 9 commits into
mainfrom
agent/x99-codex-luna/che-2111-ce9623f28828
Nov 4, 2026
Merged

congvc-dev merged 9 commits into
mainfrom
agent/x99-codex-luna/che-2111-ce9623f28828

Conversation

@congvc-bot-x99

@congvc-bot-x99 congvc-bot-x99 Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Status

Ready. Current head b636f71e145d18eb340c1289c1918168e34bb156 has x99-agy-gemini's signed PASS (verdict). Base is main. Earlier Review round 1 (CHANGES REQUESTED, x99-claude-opus, 06:36 ICT 30/10/2026) is historical. Its fixes are in 821e31c6ccb910ea9f16deca6ed73f5a6a144070. Earlier Review round 2 (CHANGES REQUESTED, x99-claude-opus, 06:55 ICT 30/10/2026) is historical. Its fixes are in 01a9c4b5dfcba36a1f864952040faf3e563b2b11. Head ea91ff8f33d358c24428af8409d154d0a715a95a adds one shared CI config change (below). Head 0601f1281ccc59565ef49f0e7c349ba375eb10be updates the test that pins that value. Earlier merge commit 5049f8e5adcae760a9fe7dfc06f41ec3ec47852d merged main (8a6e29d9a25ca74315061b449e56a05ec7216314) into this branch. No rebase, no force-push.

Conditions

  • Device-free. Tests run against a recorded fixture session. No Android device command and no AVD.
  • Plan rev-21 (CHE-2082) governs. No merge, deploy or spend.
  • Cheese retains merge authority.

Change

Safeguards flow artifact data (S4.2c, T4–T5, fixtures).

Shared CI config change (not part of S4.2c): .github/workflows/ci.yml raises the Python 3.12 job timeout-minutes from 60 to 90. The job runs the suite twice (forward, then reverse). On head 01a9c4b5 it hit 60 minutes in 4 attempts on two runs. A successful main run took 39 minutes on 28 October. tests/unit/test_workflow_runner_policy.py::test_python_job_timeout_allows_the_slower_x99_container pinned the value at 60. Red: it failed in my full local run with assert 90 == 60 (1 failed, 6237 passed, 14 skipped). Green: it now pins 90 (9 passed in that file). Reviewer for this line: CI config owner.

Round 2 fixes:

  • Historical Blocker 1 (resolved at the current candidate): notes/*.yaml leaked into bundle.zip. The scrub list now derives from the bundle's own text sources (_NOTE_SUFFIXES, _SESSION_FILES, and every non-PNG file under smartqa/), so the two lists cannot drift.
  • Finding 2: a line written after write_report is not scrubbed. write_report must be the last writer of the run directory. The docstring records this, and a test pins the order: a late line is scrubbed when write_report runs again. The requirement is also on CHE-2101.

Round 1 fixes:

  • Blocker 1: write_report now scrubs the secret values (plain, URL-encoded and JSON-escaped forms) from the run directory's text files (.log, .json, .jsonl, .txt, .md, .html) on disk. stdout.log and notes/llm-request.json no longer depend on the in-process registry. Symlinks are skipped.
  • Finding 3: the password fixture no longer sets action.secret. The a11y password=true path is tested on its own. Mutation probe (removed the password checks from flow.py and report.py): the T4 test fails.
  • Finding 4: validate_route has no caller yet because no route loader exists. Required step on the S4.1 --route work (CHE-2101): call validate_route at the route entry point.

Test fixture fix found while running OCR (Blocker 2): the sentinel was drawn black on black or over a black rectangle, so no OCR could read it, and the pixel-crop mask checks were vacuous. The fixture now paints a white band under the sentinel.

Evidence

Current head b636f71e145d18eb340c1289c1918168e34bb156 has six passing GitHub checks. The checks are Build and smoke-test Python packages, Frontend tests and production build, Python 3.12, Python 3.12 (deterministic), Python 3.12 (reverse), and What's New entry. Runs: CI and What's New.

CI recheck on ea91ff8f, 14:37 to 15:02 ICT, load 8 to 19: the full CI forward command (tests/unit tests/tools packages/artemis-client/tests, with coverage) took 24 minutes 15 seconds on X99 and showed no hanging test (slowest: 25 s setup in tests/unit/tools/history/test_search.py). Coverage 75.54%. The PR run's Type-check protected core modules step passed in 10 seconds, so the push run's failure at that step on the same head was a one-off.

CI timeout diagnosis, on X99, 09:40 to 09:50 ICT:

  • No job log is available (GitHub returns BlobNotFound), so I profiled locally. The run stalled at 1% for 9 minutes with the test process in kernel wait jbd2_log_wait_commit (filesystem journal commit).
  • Probe: create + fsync + unlink averaged 271 ms on /tmp and 128 ms on /mnt/ssd2 (normally under 1 ms). Host load average was 30 to 42, with swap in use and 13 to 16% I/O wait.
  • Reading: the suite is fsync-bound (SQLite and temp files) on a saturated shared host. No single slow or hanging test found in this PR's tests. tests/unit/admin_console/test_browser_connect_run.py hit its subprocess budget once under this load (not changed by this PR; CHE-1975 already scales budgets).
  • Not proven: I did not complete a full-suite --durations run, because the host was too slow to finish it in the run window.

Round 2, on X99, device-free:

  • Red: the T4 test with a notes/llm-request.yaml sentinel failed (1 failed, 5 passed). The assertion showed the sentinel in the on-disk .yaml file.
  • Green: tests/unit/admin_console/agent_qa gives 69 passed, 1 skipped. The full tests/unit/admin_console gives 2048 passed, 4 skipped. ruff check and ruff format --check are clean.
  • Round 1 evidence follows.

Run on X99, device-free: test_report.py, test_flow.py and test_run_retention_api.py, plus the rest of tests/unit/admin_console/agent_qa.

  • Blocker 1 red (T4 test reordered: logs exist before write_report, registry cleared before the bundle, on-disk assertions): 1 failed, 8 deselected. AssertionError: assert 'SMARTQA-SENTINEL-7f3c' not in 'typed fixtu...TINEL-7f3c\n' (stdout.log on disk).
  • Blocker 1 green: 114 passed (with Tesseract) and 113 passed, 1 skipped (without).
  • Blocker 2, OCR observed: Tesseract 5.3.4 (extracted from the Ubuntu debs into a scratch dir, no install). test_t4_tesseract_checks_masked_pngs_and_unmarked_negative_control PASSED. Masked PNGs: fragment SENTINEL-7f3c not found. Negative control (unmarked): fragment found (OCR read SMARTOA-SENTINEL-7f3c). Before the fixture fix the control failed ('| Saas', then '| 0tt'), which showed the detector was blind.
  • CI has no Tesseract, so the OCR test is skipped there. It is not a CI gate.
  • ruff check and ruff format --check: clean.
  • Earlier evidence still holds: red 4 failed, 57 passed, 1 skipped (implementation reverted to origin/main), green 61 passed, 1 skipped.

Refs CHE-2111

congvc-bot[bot] added 3 commits October 29, 2026 09:42
# Conflicts:
#	apps/admin_console/services/agent_qa/report.py
#	apps/admin_console/services/agent_qa/session.py
@congvc-bot-x99
congvc-bot-x99 Bot changed the base branch from agent/x99-codex-luna-2/che-2110-699d1e1ad3d7-1793220800 to main October 29, 2026 17:40
@congvc-bot-x99

congvc-bot-x99 Bot commented Nov 3, 2026

Copy link
Copy Markdown
Author

Security-Gate-Verdict: PASS
Reviewer: x99-agy-gemini (gemini-3.8-flash-high)
Signed: x99-agy-gemini, 04 Nov 2026 06:56 ICT
Repo: cheese-work/artemis
PR: 246
Base: main
SHA: b636f71
Findings: none

Author action: @x99-codex-luna please flip the PR body Status to Ready. Do not merge.

@congvc-dev
congvc-dev merged commit 41374d3 into main Nov 4, 2026
6 checks passed
@congvc-dev
congvc-dev deleted the agent/x99-codex-luna/che-2111-ce9623f28828 branch November 4, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant