Repository navigation
ci(slow): find the Discord seam's engine line in the unit's log, not its answer (#1112) - #1116
Conversation
…its answer (#1112) Since #1064 (PR #1096) a failed channel listing answers only that the listing failed and logs the engine CLI's own line. The add-project job's seam case 1 still expected that line in the answer, so it went red. Check the exact fixed answer, and find the engine CLI's line for the unreadable token file in the seam unit's journal, which still proves the engine's own CLI ran. test/discord-seam-ci.test.ts runs the same seam script and decoys in the ordinary suite and runs the workflow's own checks of that case against what came back. Fixes #1112 Signed-off-by: Jayden Vasquez <jaydenvasquez1711@gmail.com>
|
Independent final check (R116a), posted by the coordinator. VERDICT: PASS @f0ae293b448b64a6358d17a2608ff2b0e39f493f (final check) Reviewer R116a, final check of PR #1116 (fixes #1112). Critical set: yes ( Findings
Weakening scan flags
What I ran
Follow-ups
|
|
Independent adversarial review (R116b), posted by the coordinator. VERDICT: PASS @f0ae293b448b64a6358d17a2608ff2b0e39f493f (adversarial) Head confirmed with Findings
Weakening scan flagsThe diff removes three lines from
The marks check is untouched and there are no Follow-ups (not FAILs)
|
|
Weakening scan decision for head The owner's instruction (verbatim): "Stp asking me quesgtions and just take recommended option each time". This PR is in the critical set (it changes a CI workflow). Both independent reviews of this exact head passed: the final check (R116a) and the adversarial review (R116b). Both classified each of the scan's flags as a strengthening or not a weakening; neither found a real weakening. The flags, as classified (measured, R116a and R116b):
The decoy-marks check is unchanged and there is no Decision: proceed (recommended option). This covers only this head; any new push needs a fresh scan and review. |
Fixes #1112
What broke
The slow job
add-project (real systemd)failed at step 19 ("credentials.sh intake-discord … the bot's channels as the coordinator; the Discord step through the hub"), in the Discord seam's case 1 (the engine's own listing, no stand-in, for a token file the coordinator can't read).gh api repos/jayden1711/worklane/actions/jobs/121388908413/logs, run 40266133187): the seam dashboard answered{"error":"the bot's channel listing failed; the detail is in the dashboard's log on the machine"}and the step'sjq -e '.error | test("^instance ci: can.t read its bot token file …")'printedfalse, thenProcess completed with exit code 1. (gh run view --log-failedreturned an empty log here; the logs API returned it.)gh pr diff 1096,src/intake/discord-setup.ts): fix(dashboard): first-run answers log git's, gh's and a child's text, never show it (#1064) #1096 (dashboard: the remaining raw git/gh stderr and paths in answers (follow-up to #882) #1064) madebotViewthrowchildFailed(...), which keeps the child's last line as the error'scause. The dashboard answers withrefusalText, which logs the cause throughlogDetailand shows only the fixed text.test/discord-setup.test.ts(added by fix(dashboard): first-run answers log git's, gh's and a child's text, never show it (#1064) #1096) asserts exactly that answer and that the detail is logged.Root cause
The job's expectation is stale, and #1096's behaviour is right (inferred, from #1064's intent and the #1096 test above). The answer must not quote the child's line, because it can name a path or quote Discord. Case 1 used that line in the answer as its proof that the engine's own CLI ran, not a decoy. The proof is still available, now in the dashboard's log.
What changed
.github/workflows/ci-slow.yml, seam case 1:. == {error: "the bot's channel listing failed; the detail is in the dashboard's log on the machine"}).journalctl -o cat -u ci-discord-seam-engine.service, with a short wait for journald) andgrep -qFs the engine CLI's own line:GET /api/first-run/discord/channels: instance ci: can't read its bot token file $seam/unreadable-token (EACCES). That still proves the engine's own CLI ran. The decoy-marks check is unchanged.test/discord-seam-ci.test.ts(new, ordinary suite): runsscripts/ci/discord-seam-dashboard.mjs engineas the current user, without systemd. It uses an instance whose token file is mode 000, plus the same decoys (a CLI and anodefirst onPATH, aNODE_OPTIONSpreload, the*_CLI/*_ENGINEvariables). It asserts the 502 answer, the logged line and that no decoy ran. Then it runs the workflow's own case-1 check lines ([ "$code" = … ], everyjq -eandgrep -q) against the answer and the dashboard's output. A stale expectation in the workflow now failsnpm test, not only the real-systemd job.changelog.d/1112-discord-seam-log-check.md(Guardrail changes).Nothing #1096 added is weakened: no
src/change, andtest/discord-setup.test.tsis untouched (measured,git show --stat HEAD: three files, none undersrc/).Fail-before / pass-after (measured)
Build:
nice -n 15 ionice -c3 npm run build. Test:node --import ./dist/test/isolate.js --test --test-timeout=180000 dist/test/discord-seam-ci.test.js.git show origin/main:.github/workflows/ci-slow.yml > .github/workflows/ci-slow.yml, same test):fail 1, with the messagethe workflow's check failed: jq -e '.error | test("^instance ci: can.t read its bot token file /var/tmp/ci-discord-seam/unreadable-token \\(EACCES\\)")' "$F/seam-engine.json"andfalse. That is CI's failure.pass 1, fail 0.Other checks (measured)
npm run typecheck: exit 0.npm run check:denylist:denylist: 1684 files clean.discord-seam-ci1/1,discord-setup13/13,changelog27/27,testrun-tmpdir7/7,ci-batch17/17.flock /var/tmp/wl-coord/fulltest.lock nice -n 15 ionice -c3 npm test): 5952 tests, 5838 pass, 19 fail, 69 skipped. The failures are inmachine-sudoers-closed(13),machine-sudoers-removal,machine-sudoers-narrow,coordinator,add-project-api-key,desktop-removedandbrowser-run.rgforci-slow|changelog.d|discord-seamin them: none).origin/main's files in place, they fail the same way, exceptbrowser-run, which passed (12/0) and so looks flaky (measured).desktop-removedfailure isyaml resolves to …/payload/worklane/node_modules/yaml/…, from the worktree's symlinkednode_modules(inferred: environment, not this change).Not done here
Slow job on this branch (measured)
gh workflow run ci-slow.yml --ref cw-1112-discord-seam -f job=add-project-real-systemdstarted run 40320282250 on f0ae293. It ended success:add-project (real systemd)passed, including step 19. Its log (gh api repos/jayden1711/worklane/actions/jobs/121563232114/logs) shows these for case 1:{"error":"the bot's channel listing failed; the detail is in the dashboard's log on the machine"};GET /api/first-run/discord/channels: instance ci: can't read its bot token file /var/tmp/ci-discord-seam/unreadable-token (EACCES); run this as the instance's user;marks:, so no decoy ran.Cases 2 and 3 passed unchanged.
Critical set
Yes. It changes
.github/workflows/ci-slow.yml("CI workflows" in docs/process.md's critical set;src/review.tslists.github/workflows/**), so it needs two independent reviews.