Skip to content

feat: Summit Agent 2's four rules for missed POs (Joey, 4 Dec 2026) - #270

Merged
PromptEngineeringAI01 merged 5 commits into
mainfrom
claude/summit-missed-fix-d3e2ec
Dec 4, 2026
Merged

PromptEngineeringAI01 merged 5 commits into
mainfrom
claude/summit-missed-fix-d3e2ec

Conversation

@PromptEngineeringAI01

@PromptEngineeringAI01 PromptEngineeringAI01 commented Dec 4, 2026 •

Copy link
Copy Markdown
Owner

Intent

Summit (Agent 2) missed some compaction-test POs on every hourly run. Joey decided four rule changes on 4 Dec 2026 (docs/decisions.md -> "4 Dec 2026 - Summit (Agent 2) missed POs") so those POs book; this PR builds them. Summit stays unloaded until this and the #268 W2 fix are on production.

What changed

  1. A Projects search row whose Status reads exactly Cancelled (trimmed) is dropped before the Client Ref No. match. Agent 2 only (match_project(..., drop_cancelled=True) from SummitProjectRule.agent_2()).
  2. "New Gen and EasyStart" / "New Generation and EasyStart" agrees with a Summit New Homes project; creator NH Sub Floor.
  3. Summit Projects, Summit Renovations and Summit Homes Display: the creator is the project window's Project Creator (creator_rule = "project_creator", replaces previous_task). The driver reads it only when ProjectRule.reads_project_creator; W1's reopen compares it again before Create New Task.
  4. Summit Projects row agrees_with_any_row = true: the project's company need not share a row with the title/PDF, but the title and PDF companies must be in the table.

Files with a one-line reason each, beyond src/po_agent/summit/ and mysys/driver.py above:

  • src/po_agent/b1/decision.py: adds reads_project_creator = False to B1ProjectRule, because the ProjectRule Protocol gained that property; B1 never reads the Project Creator, so B1 behaviour is unchanged.
  • config/clients/summit.toml: the client file carries the rules as data - New Homes also_agrees (rule 2), creator_rule = "project_creator" on three rows (rule 3), Summit Projects agrees_with_any_row = true (rule 4).
  • src/po_agent/core/config.py, core/models.py: parse and validate the new config fields (previous_task now refused) and the Protocol property.
  • SPEC.md, docs/decisions.md, docs/screen-map.md (rows 06, 07), docs/ops-runbook.md (3.5a and the W1 alert line): the rules as decided.

Safe side, Joey to confirm:

  • (a) The title and the PDF must still name the same table row; only the project's row may differ under rules 2 and 4.
  • (b) Agent 3 (summit_variation) keeps its old rules (no Cancelled drop, one row for title, PDF and project).

Risk

High (touches mysys/driver.py, src/po_agent/summit/ and config/; not dormant: Summit is an enabled client).

Safe because of one fact: with the four rules in, no case that should skip proceeds - false PROCEED: 0 on seam 1 (fake Summit, Agent 3 and B1 cases, incl. Cancelled, brand and any-row mutations) and on the real-PO seam. Proof level: run (commands and output under Testing). Supporting lines: B1 and Agent 3 keep their rules (B1ProjectRule.reads_project_creator = False; summit_variation/client.py builds SummitProjectRule(self.companies) with the new switches off, pinned by tests), and the driver change is one read (_labelled(project, "Project Creator:")), no new action outside guard.py.

Second-model review (pr-reviewer, one round) and triage:

  • Important (code): none.
  • Finding 1 (harm 3, likelihood 2): docs/ops-runbook.md 3.5a and the W1 alert line still named the previous-task creator; a person finishing a Summit PARTIAL_WRITE by hand could set a wrong creator. Must-fix, fixed in 5ce5e73.
  • Nit 1: SPEC said the Project Creator is read only at the peek and W1; the hold re-check reads it too (and drops Cancelled rows, so a later-Cancelled booked project re-checks as not found: a HOLD_LOST alert, nothing written). Fixed (SPEC and decisions "Carried in" now say so).
  • Nit 2: stale docstrings in driver.py and core/models.py. Fixed.
  • Nit 3: SPEC Screens row named "a previous-task name". Fixed.
  • Nit 4: the feat: commit carries no decisions/SPEC lines (they are in test: commit fdaad9d of this PR). Overthinking: the PR merges whole with --merge.
  • Nit 5: if a live Project Creator is not exactly one Creator option, W1 stops WRITE_NOT_STARTED each run (Note returned, nothing written); a missing label is UnexpectedScreen. Overthinking for now: safe outcome; screen-map row 07 saw the label on test and live; the first live run proves it.

Testing

  • uv run scripts/check.py on head 5ce5e73: 4865 passed, 12 skipped, last line check: all passed, exit 0.
  • uv run pytest tests/seam1 -m real_data -s (laptop, SEAM1_PRIVATE_DIR = main checkout's private/): false PROCEED: 0 in all three sections - Agent 3 4 of 4 as expected, Summit 8 of 11 as expected, B1 5 of 5 decided. The 3 real Summit Projects cases now skip CREATOR_UNKNOWN: their lookups in private/summit/fixtures/cases.toml carry no Project Creator. False skips, never a false PROCEED; Joey to copy each project's Project Creator and expected creator into the cases file.
  • TDD: test: new tests (c075092), test: changed expectations with the decisions entry and SPEC lines (fdaad9d), test: Agent 3 pin rebuilt (67504e6), feat: the four rules (05f1939), docs: review fixes (5ce5e73).
  • After merge and the production tag move: Joey's live check on the first hourly Summit run.

🤖 Generated with Claude Code

PromptEngineeringAI01 and others added 5 commits December 4, 2026 10:45
Failing tests for Joey's four Summit (Agent 2) decision rules:

- a Cancelled Projects search row (its Status cell) is dropped before the
  Client Ref No. match; near spellings are kept;
- "New Gen and EasyStart" (and "New Generation and EasyStart") on the
  title/PDF also agrees with a Summit New Homes project, nothing wider;
- Summit Projects, Summit Renovations and Summit Homes Display take the
  project window's Project Creator; empty or --- is CREATOR_UNKNOWN; W1's
  reopen reads it again and needs the same value;
- a Summit Projects project agrees with any title/PDF company in the table.

Agent 3 keeps its rules (pin cases: a Cancelled twin still counts, the
three companies still agree on one row). Fake values only.

Fails now: SearchRow has no status, MySysLookup and SummitProceed no
project_creator, SummitProjectRule no agent_2 / reads_project_creator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Dec 2026)

Existing expectations that encode the old Summit rules, changed for
Joey's four rules of 4 Dec 2026:

- seam-1 previous-task cases become Project Creator cases; the Summit
  Projects spelling case expects its Project Creator;
- the creator-table pin reads project_creator; previous_task is refused;
- test_summit_booking drops its two previous-task W1 tests (the Project
  Creator W1 tests from the first commit replace them);
- safe side, Joey to confirm: title and PDF must still name one row, so
  two cases from the first commit now expect COMPANY_MISMATCH.

decisions, 4 Dec 2026, Summit (Agent 2) missed POs: entry, SPEC Client 2
and Agent 3 lines and screen-map rows 06-07 in this commit (CLAUDE.md
Must never #8).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… pin

The pin from this branch's first test commit built VariationClient without
Summit's company table, so every row was PROJECT_NOT_FOUND and the test
could never show a Cancelled row counting. It now builds the client as
the command does; the expected PROJECT_AMBIGUOUS is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- match_project drops a Projects search row whose Status reads exactly
  Cancelled (Agent 2; the driver now reads the search row's Status);
- the client file gains also_agrees (Summit New Homes: the New Gen and
  EasyStart brand) and agrees_with_any_row (Summit Projects); title and
  PDF must still name one row (safe side, Joey to confirm);
- creator_rule project_creator replaces previous_task: the creator is the
  project window's Project Creator, read by the driver only when the
  rule asks (ProjectRule.reads_project_creator); empty or --- is
  CREATOR_UNKNOWN; W1's recheck compares it again;
- SummitProceed carries project_creator (was previous_task_no/creator);
- Agent 3 keeps its rules (SummitProjectRule's defaults; agent_2()).

decisions, 4 Dec 2026, Summit (Agent 2) missed POs (entry and SPEC lines
in the test commit before this one, as CLAUDE.md Must never #8 pairs it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and docstrings

Review of the 4 Dec 2026 Summit fix: the ops runbook's by-hand Task
Creator (3.5a) and W1 "project changed" line still named the
previous-task rule; SPEC now says the Project Creator is also read in
the hold re-check, where Agent 2's read drops Cancelled rows; two
docstrings and a Screens row no longer name the previous task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PromptEngineeringAI01
PromptEngineeringAI01 merged commit 8d2e5af into main Dec 4, 2026
1 of 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