Skip to content

Testing plan: quiz only — standalone quizzes, and a code quiz every reviewer can see ​

Derived from requirements.md and design.md, before tasks.md. Authored at test-planning and completed at verification.

This file is executable content. It names commands an agent will run, so review it like code. No command here needs a credential.

The short version ​

Three rows carry the weight:

  • T8, security. One negative test per abuse case, because this change lets an unauthorized account cause a daemon action for the first time.
  • T2, integration. The reply and the reviewer changes are driven through both ingresses, the webhook and the poller, against a fake GitHub.
  • T10, upgrade. State written before the change is loaded and walked.

Everything runs in this repository with fakes. No live GitHub call is planned: the attribution of a tick was proved live in issue-488 and is not changed here. Performance and contract testing are n/a, with reasons below.

Check: that every abuse case in design.md § Security design has a row under T8.

Test matrix ​

#TypeApplies?Scope / what it provesWhere it runs
T1Unityesthe selection row and its alias; the rename table on state; old attestation sentences; the micro check; banner placement and rows; the taken record; the keyword parsecd cli && uv run python -m pytest -q
T2Integration (scenario)yesreply, reviewer changes, fallback and upgrade paths through the router, poller and dispatcher, Gherkin-documentedcd cli && uv run python -m pytest -q tests/test_quiz_integration.py tests/test_quiz_taken_integration.py
T3Contract (OpenAPI / GraphQL SDL)n/a — the change adds no endpoint to the control-plane API; the new keyword and events are covered by T6
T4End-to-endyesthe outer loop walked through both quiz gates, the micro bypass and the banner, by the scenario runnercd cli && uv run python -m pytest -q tests/test_pdlc_e2e_integration.py
T5UI / visualyestemplates/quiz.html in its four forms matches the prototype, light, dark and at 375 pxnode docs/specs/issue-557/evidence/ui/check.mjs
T6Snapshot / parityyesgolden checklists (GitHub, Jira, handoff), the event-type catalog, the config schema, the docs and graph parity testscd cli && uv run python -m pytest -q (the parity and fixture tests)
T7Performance / loadn/a — a reply costs a bounded number of API calls (one comment read, one pull request read, at most one write); T8 asserts the bound instead of measuring time
T8Security / abuse caseyesone negative test per abuse case 1–9cd cli && uv run python -m pytest -q -k "abuse or quiz_taken or banner"
T9Accessibilityyesaxe on the quiz page: no serious or critical violation; keyboard reaches every option and the Part 2 linknode docs/specs/issue-557/evidence/ui/check.mjs
T10Migration / upgradeyesstate frozen before the change loads and walks; a pre-change quiz comment is still answerable; finished items are not rewrittencd cli && uv run python -m pytest -q -k "legacy or renamed or pre_change"
T11Manual exploratoryyesthe banner markdown renders as a quote with a table, as design.md shows itprocedure under Verification activities
T12Static checksyeslint, format, types, config validation, markdown lintmake check and npx --yes markdownlint-cli2@0.18.1

Scenarios & requirement trace ​

RowRequirement(s)Scenario / case
T1R1.1–R1.8the checklist shows one quiz row and no experiment rows; unticked skips four nodes under quiz; explainer in a reply is read as quiz; experiment rows are ignored; no explainerExperiments is frozen
T1R2.1–R2.3the graph has the four nodes in place, no id, stage or token says explainer, and the writing nodes name the quiz command
T1R3.3, R3.4a micro record turns the preceding node's outcome into micro; an absent record changes nothing; a micro Part 2 with a Part 1 takes the ordinary path
T1R4.2, R5.6, R5.7, R5.9a record claiming carried over while the spec is newer blocks; a record with no committed location blocks
T1R6.6, R5.8the quiz comment mentions no explainer and gives the artifact URL and both one-liners
T1R8.3–R8.5, R8.7, NFR boundrow rules: author row, requested and reviewed people, repliers, one row per person, removal, the 20-row bound
T1R8.8, R8.9, R9.1the placement table: one pair, no markers with and without the heading, an unpaired marker, two pairs
T1R7.9, R7.10the keyword is anchored, ambiguous with a second keyword, configurable and disableable
T2R7.1–R7.6Scenario: A reviewer who is not authorized is recorded and gates nothing
T2R7.6, NFR idempotentScenario: A second reply from the same person writes nothing
T2R7.8Scenario: A reply on a pull request with no code quiz is refused
T2R8.1, R8.6Scenario: Posting the code quiz puts the banner in the description
T2R8.6, R6.2Scenario: The author's tick marks the author row taken
T2R8.6, R8.7, R8.12Scenario: A reviewer request and its removal update the table on the poller
T2R8.6, R8.12Scenario: A submitted review keeps the reviewer's row on the webhook
T2R8.10Scenario: A new quiz round resets the table
T2R9.1–R9.3Scenario: A description with malformed markers falls back to a comment
T2R9.4Scenario: A refused description write falls back and does not block the gate
T4R2, R3.3, R6.1–R6.4, R8.11happy-path: both gates with the new ids and records. quiz-gates: refused tick, stale spec, authorized pass, and a micro quiz that bypasses its gate with no comment and no banner
T5R2.4, R4.1, R4.3–R4.5the four page forms: spec quiz; code quiz without Part 1; Part 1 carried over, with the note and the link; Part 1 regenerated, with the other note and no link
T6R1.8, R11.1–R11.3golden checklists regenerated; graph.quiz_taken and the three other events in the catalog; quiz-taken in the config schema and the keyword docs; no doc describes an explainer page as current
T8abuse 1Scenario: A reply from a stranger leaves the work item at code-quiz
T8abuse 2the existing refused-tick case in quiz-gates
T8abuse 3Scenario: A reply carrying extra text writes only the login
T8abuse 430 distinct repliers give 20 rows and a summary line; a repeat reply causes no write
T8abuse 5a stranger's comment carrying the fallback marker is never edited; two marker pairs fall back
T8abuse 6a signal with a login outside the grammar records nothing
T8abuse 7T5's hostile-string probe: </script> and markup in every field render as text and run nothing
T8abuse 8Scenario: A reply on a pull request that delivers no work item does nothing
T8abuse 9the-loop's own marked comment records nothing; a webhook whose sender differs from the comment's author records nothing
T9NFR accessibilityaxe run on each form and theme; keyboard walk
T10R10.1–R10.3Scenario: A selection frozen with explainer unticked skips the four quiz nodes; Scenario: A work item parked at spec-explainer continues at spec-quiz-write; a frozen explainerExperiments loads
T10R10.4, R10.5a gate with only the old record name reads it; a pre-change quiz comment passes on an authorized tick
T10R10.6no committed file of a finished work item under docs/specs/ is changed by this pull request
T11R8.1, R8.2the rendered banner

Verification environment ​

  • Repositories: this repository only.
  • Services / containers: none. GitHub is faked by the test suite's existing fake client and scenario runner.
  • Fixtures & data: the golden checklists under cli/tests/fixtures/, the scenario folders under cli/tests/test_pdlc_e2e/scenarios/, and a new fixture state file written in the pre-change format for T10.
  • Credentials: none.
  • Bring-up: make install-dev, and for T5 and T9 npm i --prefix docs/specs/issue-557/evidence/ui playwright@1 axe-core@4 then npx --prefix docs/specs/issue-557/evidence/ui playwright install chromium. Tear-down: none; node_modules under evidence/ui/ is not committed.
  • If bring-up fails: record it under Verification results, leave the dependent activities unticked, and escalate. If only Playwright cannot be installed, T5 and T9 fall back to the system's headless Chromium for screenshots, and the axe run is reported as not executed.

Evidence plan ​

RowEvidencePath under evidence/
T1, T6, T8, T10test summary: counts, duration, and the names of the new testsunit.md
T2the scenario table from the-loop scenarios --format markdown, and the run outputintegration.md
T4the scenario runner's output for happy-path and quiz-gatese2e.md
T5, T9the check script, its output, and screenshots of each form in light, dark and 375 pxui/check.mjs, ui/check.md, ui/<form>-<theme>.png
T5an animated capture of answering a question and jumping to Part 2ui/quiz-flow.gif
T8the abuse-case table with the test that proves eachsecurity-tests.md
T10git diff --stat limited to other work items' spec folders, showing none changedupgrade.md
T11a screenshot of the rendered bannerbanner.png
T12the tail of make check and of the markdown lintchecks.md
red → greenfor each new behaviour, the failing run before its implementationunit.md, section per task

Redaction: the captures contain no token or hostname by construction. Logins in fixtures are invented.

Verification activities ​

  • [x] T1 — Run cd cli && uv run python -m pytest -q and record the summary.
  • [x] T2 — Run the two integration files and record the output with the scenario table.
  • [x] T4 — Run cd cli && uv run python -m pytest -q tests/test_pdlc_e2e_integration.py.
  • [x] T5 — Run node docs/specs/issue-557/evidence/ui/check.mjs skills/the-loop/templates/quiz.html docs/specs/issue-557/evidence/ui and compare the captures with design/code-quiz.html.
  • [x] T6 — Confirm the parity and golden-fixture tests ran inside T1 and name them.
  • [x] T8 — Run cd cli && uv run python -m pytest -q -k "abuse or quiz_taken or banner" and fill the abuse-case table.
  • [x] T9 — Read the axe results and the keyboard checks from the T5 run.
  • [x] T10 — Run cd cli && uv run python -m pytest -q -k "legacy or renamed or pre_change", then git diff --stat origin/main...HEAD -- docs/specs ':!docs/specs/issue-557'.
  • [x] T11 — Render the banner for a sample table to HTML with npx --yes marked@12 --gfm, capture it with headless Chromium, and check it against design.md § The banner.
  • [x] T12 — Run make check and npx --yes markdownlint-cli2@0.18.1.

Verification results ​

Executed on 2026-11-30, in the work item's checkout, and run again after the review rounds changed the code. Every activity ran and passed; the numbers are those of the final code.

ActivityCommand / procedureOutcomeEvidence
T1cd cli && uv run python -m pytest -qpass: 8174 passed, 2 skippedevidence/unit.md
T2cd cli && uv run python -m pytest -q tests/test_quiz_integration.py tests/test_quiz_taken_integration.py -vpass: 50 passedevidence/integration.md
T4cd cli && uv run python -m pytest -q tests/test_pdlc_e2e_integration.py -vpass: 17 passedevidence/e2e.md
T5node docs/specs/issue-557/evidence/ui/check.mjs skills/the-loop/templates/quiz.html docs/specs/issue-557/evidence/ui, then the captures compared with design/code-quiz.htmlpass: 163 checks; the page matches the prototypeevidence/ui/check.md
T6the parity and golden-fixture files, named in the evidencepass: 159 passedevidence/unit.md § T6
T8cd cli && uv run python -m pytest -q -k "abuse or quiz_taken or banner"pass: 431 passed; every abuse case has a passing negative testevidence/security-tests.md
T9the axe results and keyboard checks of the T5 runpass: no violation in any form or theme; Tab reaches the Part 2 link and an option, Space answersevidence/ui/check.md
T10cd cli && uv run python -m pytest -q -k "legacy or renamed or pre_change"; git diff --stat origin/main...HEAD -- docs/specs ':!docs/specs/issue-557'pass: 45 passed; no other work item's file changedevidence/unit.md § T10, evidence/upgrade.md
T11the banner rendered for a sample table with npx --yes marked@12 --gfm --breaks, captured with headless Chromiumpass: a quote with the three lines and the table, as design.md shows itevidence/banner.png
T12make checkpass: exit 0evidence/checks.md

Three things a reader should know:

  • The environment. The test commands were run with THE_LOOP_INSTANCE, THE_LOOP_WORK_ITEM and THE_LOOP_CLI_CONFIG unset. This session runs inside a the-loop daemon, and those variables make about 46 unrelated tests fail on main too.
  • T11 used --breaks. GitHub renders a line break inside a pull request description as a line break, and plain GFM does not. The capture uses the option that matches GitHub. Nothing was posted to a real pull request for this.
  • No live GitHub call was made, as planned. The banner writer and the reply path ran against in-memory fakes of the five new operations.

Not executed: none.

Review comments ​

Appended by the-loop's record-feedback hook when a human gate approves with comments (issue-109). Append-only and attributed: an approval never silently discards a reviewer's suggestions, and the feedback travels with the document it concerns rather than living in a side-channel tracker.

Released under the MIT License.