triage bot: how-to lane staleness governance + notifications FAQ (PP-4831)#1309
Conversation
🧪 Unit Test Results📊 View Full Interactive Report ❌ 4 TESTS FAILED7966 tests | 7827 passed | 4 failed | 133 skipped | ⏱️ 16m 43s | 📊 98.3% | 📈 46.0% coverage Tests by Class — 909 classes, 4 with failures
Failed Tests (click to expand)📊 Testing Coverage BreakdownUnit Test Line Coverage (testable surfaces): 46.0% Total coverage incl. UI/lifecycle: 45.0% (17 files excluded from testable denominator — see
📈 TrendsTest count change: +7966
|
| Artifact | Description |
|---|---|
| test-report | 📄 Markdown + HTML reports |
| test-data | 📊 JSON data for tooling |
| test-results | 🔍 Full xcresult (open in Xcode) |
…P-4831)
A how_to answer names UI ("go to Settings → Libraries") and has no fix version to
expire against, so it goes stale silently when the app's navigation moves — exactly
the Palace-icon → Settings reroute we just did. This adds the governance to catch that.
- KBEntry gains `ui_surface` (the screen a how_to depends on) + `reviewed_at` (when
the answer was last verified). Both nil for known_issue entries.
- All four how_to entries are now anchored + dated; HT-003 switch-library and the
add-library answers point at `settings-libraries`.
- HowToGovernanceTests adds a UI-surface CHANGE LOG (surface → last-changed date) and
a staleness lint: any how_to whose `reviewed_at` predates its surface's last-changed
date fails — the screen moved and nobody re-checked the directions. `settings-libraries`
is dated 2026-07-20 (today's reroute); the answers were re-reviewed the same day, so
they pass — had they not been, the lint would have caught it. Teeth proven on the real
catalog: rolling a review date back to before the change fails with the drift message.
- New FAQ entry HT-2026-004-notifications (hold-ready + due-soon reminders — enable
notifications; from HelpSpot 18103), with a benchmark case.
Note on FAQ growth: several "common questions" (loan period, borrow limit, hold window)
have LIBRARY-SPECIFIC answers (they vary per library's config), so they're poor canned
FAQs — better routed to the library than answered with a hardcoded number. v1 adds the
universal one (notifications); the rest want product input before authoring.
TriageBotCore suite 248/248 green via `swift test`.
**Scope:** TriageBotCore local package only — KBEntry anchor/date fields, catalog
metadata + one new how_to entry, governance tests. No classifier/reducer/escalation
change (that's PP-4832). No app/DRM/sign-in code.
**Not done:** branched off the unmerged PP-4825 branch; re-stack after #1305 + PP-4825
land. Applying the UI anchor to known_issue text (which can also drift) is deferred.
Holding PR until tomorrow per request — pushed for backup only.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8588eff to
16c72c6
Compare
🏗️ CodeAtlas Ledger Analysis✅ All Checks Passed♿ Accessibility (via AccessLint)
✅ No accessibility issues detected 🧪 Test Coverage (via QAAtlas)
🏛️ Architecture Analysis
🔍 Reachability Analysis
✅ No dead code detected 📊 0 files analyzed | 📦 Download Full Report Powered by CodeAtlas Ledger |
…steer (PP-4831) David Wilcox's product call on the deferred library-specific FAQs: answer them generically (option b) with a helpful pointer, rather than hardcode a number that's wrong for most patrons. Three new how_to entries, each anchored to the existing `my-books` UI surface and reviewed 2026-07-21: - HT-2026-005-hold-pickup-window — "How long you have to pick up a ready hold varies by library and distributor. When your hold is ready, Palace shows the exact 'pick up by' date right on it…" - HT-2026-006-borrow-limit — "The number of titles you can borrow at once is set by your library, so it varies. If you've reached the limit, returning a title you've finished frees up a slot…" - HT-2026-007-loan-length — "Loan length is set by your library, so it varies — you'll see the due date on each title when you borrow it. Palace can't extend or renew a loan in the app…" Renewals (HT-2026-001) unchanged — David confirmed the existing answer is accurate. Loan-length keywords deliberately avoid renewals' "renew/extend/keep longer" set so the two don't compete. Each entry gets its shouldMatch benchmark cases in ResponseQualityTests (so the every-entry-has-a-benchmark gate passes and precision/recall keep exercising them). Full TriageBotCore suite green (261/261), incl. HowToGovernance, CatalogSchemaLint (nested-keyword), and per-kind precision/recall. **Scope:** three how_to corpus entries + their benchmark cases. No classifier, reducer, or governance-schema changes; reuses the existing `my-books` anchor so no change-log edit is needed. **Not done:** other FAQ topics named in PP-4831 (send-to-Kindle/formats, adding a library card) — separate follow-ups. **Deferred:** none.
…s/Kindle (#1322) Closes out the two FAQ topics from PP-4831's acceptance criteria not yet built (holds + borrow limits shipped in #1309). Both answers product-confirmed: - HT-2026-008-add-library-card — "To add your library card, open Settings → Libraries. If your library isn't listed yet, add it there first, then tap it and sign in with your library card number (barcode) and PIN…" Anchored to settings-libraries; keywords avoid the switch-library set. - HT-2026-009-formats-kindle — confirmed NOT supported: "Palace isn't connected to Kindle — there's no 'send to Kindle' step. You read your borrowed books right in the Palace app…" Anchored to my-books. Keywords use "to kindle" / "on kindle" (not the nested "send to kindle" variants) so natural phrasings like "send my book to Kindle" match without tripping the nested-keyword lint. Both carry reviewed_at 2026-07-22 and reuse existing UI-surface anchors, so no change-log edit. shouldMatch benchmark cases added for each. Full TriageBotCore suite green (283/283) — HowToGovernance, schema lint, per-kind precision/recall. **Scope:** two how_to corpus entries + their benchmark cases. **Not done:** none of PP-4831's named FAQ topics remain after this. **Deferred:** none. Co-authored-by: t <t@t.io>
Implements PP-4831. Offshoot of PP-4825.
Why
A how-to answer names UI ("go to Settings → Libraries") and has no fix version to expire against, so it goes stale silently when the app's navigation moves — exactly what happened with the Palace-icon → Settings library-switch reroute in PP-4825. A wrong how-to is worse than a wrong bug card: it's an authoritative-sounding falsehood about the product. This adds the governance to catch that automatically, plus one new FAQ.
What changed
KBEntrygainsui_surface(the screen a how-to depends on) +reviewed_at(when the answer was last verified). Nil for known-issue entries.settings-libraries.HowToGovernanceTests) = a UI-surface change log (surface → last-changed date) + a check that fails any how-to whosereviewed_atpredates its surface's change. When the UI moves, you bump that surface's date; any answer not re-verified since then fails until a human re-checks it and bumpsreviewed_at.settings-librariesis dated to the reroute day; the answers were re-reviewed the same day, so they pass — and the teeth are proven on the real catalog (rolling a review date back fails with the exact drift message).Product note (FAQ growth)
Several "common questions" the ticket listed — loan period, borrow limit, hold window — have library-specific answers (they vary per library's config), so they're poor canned FAQs; better routed to the library than answered with a hardcoded number. This adds the one clearly-universal entry (notifications); the rest want a product call before authoring.
Verification
TriageBotCore package suite 248/248 green via
swift test; drift lint teeth-proven on the real catalog. No classifier/reducer/escalation change (that's PP-4832).PalaceTests) + a rebase.🤖 Generated with Claude Code