Skip to content

feat: W2 passes on the task's own Client Documents block when the project tab shows nothing (issue 268) - #277

Merged
PromptEngineeringAI01 merged 5 commits into
mainfrom
claude/summit-w2-268-fallback-846c60
Dec 6, 2026
Merged

PromptEngineeringAI01 merged 5 commits into
mainfrom
claude/summit-w2-268-fallback-846c60

Conversation

@PromptEngineeringAI01

Copy link
Copy Markdown
Owner

Intent

Fixes the second false ACCURACY_BREACH at W2, field=documents (#268, Summit, 4 Dec 2026). A read-only live look found that MySys's project Documents tab fails server-side for one project: it shows "No Document Found" in every section, old tasks included. The new task's own detail screen showed "Client Documents (1)" with the right PDF, so the booking was correct. Joey approved a fallback pass path on 4 Dec 2026. The change is in the shared booker, so B1 gets the same path.

What changed

  • booking.task_documents_shown(...): reads the task detail's own Client Documents block with no click, right after check_task_detail (the screen W2 already reads). It returns True only when two reads in a row show exactly one heading whose accessible name is Client Documents (1) and exactly one named link (the download icon link has no name) that starts with the PDF name or a document_names form. Otherwise it returns False after 15 s, and it never raises.
  • booking.check_project_document(..., task_documents=False): a new pass path. W2 passes only when all of these hold:
    • The tab never settles at one row.
    • Every read that counted showed no row, with "No Document Found" in the task's section and under every section heading on the tab (the issue 268 shape).
    • The task block counted.
  • Everything else behaves as before:
    • One row on the tab is read as before (Type, File), whatever the block shows.
    • These stay an ACCURACY_BREACH: 2+ rows, a wrong row, any section with a row, or an empty table without "No Document Found".
    • Never "at least one".
  • This is narrower than the handover's plan, on the safe side: the tab also has to show "No Document Found" under every section heading, the exact live shape.
  • docs/decisions.md (6 Dec 2026 entry), SPEC.md W2 "Back and the document", docs/screen-map.md row 19.
  • Commits:
    • test: e16f2ba: new tests, and both browser fakes gain the task block.
    • test: 87683fc: the run fake gains the new read.
    • feat: d3e5883: the code and docs.
    • test: + fix: from the review: the heading is matched by accessible name, and a test pins "every read".

Risk

High: touches mysys/. No new click and no guard action; guard.py is untouched. The change loosens a control by one pass path, which Joey approved.

  • Cost: up to 15 s more at W2 when the block doesn't show one row. The block is read on every booking.
  • Assumption that can't be proven offline: live's block looks like the 4 Dec accessibility tree. In that tree, Download All is a button, Upload and Remove are generic, and the only named link is the file. If live differs, the block never counts and W2 behaves exactly as before.

pr-reviewer (second model): no Important findings. How I handled them:

  • U1 (the fallback might never trigger on live). I checked the role of each control in the 4 Dec capture: one named link only. Fixed the remaining part: the heading was compared by inner_text, which a CSS text-transform would change, so it is now matched by accessible name (red test, then the fix).
  • Nit 1 (no test pins "every read"): added test_w2_s_fallback_needs_every_read_of_the_tab_empty.
  • Nit 2 ("under every section heading" is checked by counts, not per section): accepted. The count must match exactly, and any mismatch stays a breach.
  • Nit 3 (nothing in the run output says W2 passed on the fallback): not done here. It changes printed output and needs its own decisions entry. Proposed as a follow-up.
  • Nit 4 (one transient read during rendering turns the fallback off): accepted as safe side, and noted in the decisions entry.
  • Nit 5 (decisions wording on commits): fixed.

Testing

  • uv run scripts/check.py on 3f78410: 4897 passed, 12 skipped, "check: all passed", exit 0.
  • Red first: the 3 pass-path cases breached field=documents on the old code, and the uppercase-heading case failed before its fix.
  • New: tests/test_task_documents.py (block rules: 0, 2, a heading/row count mismatch, wrong file, a name only containing the PDF name, filed_as, Certified ignored, no block, two blocks, closed page, CSS case), plus the fallback cases in tests/test_summit_booking.py and tests/test_booker_offline.py.
  • Live proof: the first live hourly run after Joey moves production (CLAUDE.md Done means docs: use the 3 most recent real POs for the MVP's real-PO seam #3). Summit stays unloaded until then.

🤖 Generated with Claude Code

PromptEngineeringAI01 and others added 5 commits December 6, 2026 23:46
… shows nothing (issue 268)

Both fakes' task detail screens gain the Client Documents block as the
4 Dec 2026 live look saw it; new fake options: the project Documents tab
showing "No Document Found" everywhere (issue 268), and the block's files.
Red: the pass-path cases breach field=documents on the current code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/fakes/mysys.py patches every booking step: it gains
task_documents_shown (False: its Documents tab always shows the row) and
check_project_document takes task_documents. No expected value changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ject tab shows nothing (issue 268)

Live 4 Dec 2026: MySys's project Documents tab failed server-side for one
project and showed "No Document Found" in every section, while the task's
own detail showed "Client Documents (1)" with the right PDF: a false
ACCURACY_BREACH field=documents. W2 now reads that block before leaving
the task detail (no click) and passes on it only when the tab never
showed a row and showed "No Document Found" under every section heading
on every read that counted. One row, two or more, a wrong row, or a
block other than exactly (1) with one named link of the PDF: as before.
Joey approved the pass path on 4 Dec 2026; decisions entry 6 Dec 2026.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… be empty (PR review)

Red: a CSS-uppercased "Client Documents (1)" heading is not counted.
Pin: two rows on an early tab read, "No Document Found" after, stays a
breach.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A CSS text-transform would change the heading's inner text, not its
accessible name. Decisions entry wording updated (review Nit 5) and the
safe-side "every read that counted" note added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PromptEngineeringAI01
PromptEngineeringAI01 merged commit 8598782 into main Dec 6, 2026
2 checks passed
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