[INFRA-180] Remove broken state-listing path from wo-po-lookup #92

Merged
amoussa1229 merged 1 commit from bug/INFRA-180-remove-state-listing into main 2026-07-15 22:51:54 +00:00
amoussa1229 commented 2026-07-15 22:49:36 +00:00 (Migrated from github.com)

Summary

The verified-sites table's by-state GSI was deleted by the owning stack on 2026-06-03 (procurement-ingest audit M-20, "0 reads in 30d"), so the state-listing branch of the bot's lookup_site action has failed at runtime ever since. Per the owner's decision (INFRA-180), this removes the state-listing path end-to-end rather than restoring the GSI:

  • lambda/wo-po-lookup/index.ts — drop the by-state Query; lookupSite now takes only a site code. A stale state parameter (e.g., from an older prepared agent version) returns a clear "no longer supported" message.
  • lib/constructs/bedrock-agent.ts — remove the state parameter from the WO_PO_Lookup.lookup_site function schema (site_code is now required: true) and strip state listings from the agent instruction, so the agent stops offering the capability.
  • README.md — update the verified-sites data-contract row and mark the known-broken-contract note resolved.

siteCode point lookups (GetItem by PK) are unaffected.

Validation

  • npx tsc --noEmit passes.
  • Verified no remaining references to by-state / state-listing anywhere in the repo (outside the README's resolution note).
  • No repo ESLint config exists; the build script is plain tsc.

Tests

No automated tests exist in this repo. Manual verification was static (typecheck + exhaustive grep); the state path was already failing at runtime, and the removed branch is the only consumer of the deleted GSI.

Notes

  • Breaking change (intentional): removes the state parameter from the Bedrock agent's lookup_site action surface. Deploying requires the agent to be re-prepared for the new function schema to take effect.
  • Cross-family review (GPT-4.1 cross_review.py) verdict: no BLOCK items and no security issues. FIX items: (1) document the breaking change for downstream consumers — done in this PR body and the README; (2) handle a stale state parameter gracefully instead of a confusing generic error — applied in the handler. NITs (docs/tests/dead-reference cleanup) are covered by the README update and repo-wide grep.
  • The global pre-push scanner backstop skipped: it looks for review.sh at ~/Documents/repositories/security-review/ but the repo lives under ~/Documents/repositories/seahaven/security-review/. Flagging as a hook-config issue; unrelated to this change.

Refs: INFRA-180

## Summary The `verified-sites` table's `by-state` GSI was deleted by the owning stack on 2026-06-03 (procurement-ingest audit M-20, "0 reads in 30d"), so the state-listing branch of the bot's `lookup_site` action has failed at runtime ever since. Per the owner's decision (INFRA-180), this removes the state-listing path end-to-end rather than restoring the GSI: - `lambda/wo-po-lookup/index.ts` — drop the `by-state` `Query`; `lookupSite` now takes only a site code. A stale `state` parameter (e.g., from an older prepared agent version) returns a clear "no longer supported" message. - `lib/constructs/bedrock-agent.ts` — remove the `state` parameter from the `WO_PO_Lookup.lookup_site` function schema (`site_code` is now `required: true`) and strip state listings from the agent instruction, so the agent stops offering the capability. - `README.md` — update the `verified-sites` data-contract row and mark the known-broken-contract note resolved. **siteCode point lookups (`GetItem` by PK) are unaffected.** ## Validation - `npx tsc --noEmit` passes. - Verified no remaining references to `by-state` / state-listing anywhere in the repo (outside the README's resolution note). - No repo ESLint config exists; the build script is plain `tsc`. ## Tests No automated tests exist in this repo. Manual verification was static (typecheck + exhaustive grep); the state path was already failing at runtime, and the removed branch is the only consumer of the deleted GSI. ## Notes - **Breaking change (intentional):** removes the `state` parameter from the Bedrock agent's `lookup_site` action surface. Deploying requires the agent to be re-prepared for the new function schema to take effect. - **Cross-family review (GPT-4.1 `cross_review.py`) verdict:** no BLOCK items and no security issues. FIX items: (1) document the breaking change for downstream consumers — done in this PR body and the README; (2) handle a stale `state` parameter gracefully instead of a confusing generic error — applied in the handler. NITs (docs/tests/dead-reference cleanup) are covered by the README update and repo-wide grep. - The global pre-push scanner backstop skipped: it looks for `review.sh` at `~/Documents/repositories/security-review/` but the repo lives under `~/Documents/repositories/seahaven/security-review/`. Flagging as a hook-config issue; unrelated to this change. Refs: INFRA-180
seahaven-openswe[bot] (Migrated from github.com) reviewed 2026-07-15 22:50:46 +00:00
seahaven-openswe[bot] (Migrated from github.com) left a comment

✅ Open SWE Review: No issues found

Open SWE reviewed this PR and found no potential bugs to report.

Open in Web

## ✅ Open SWE Review: No issues found Open SWE reviewed this PR and found no potential bugs to report. [Open in Web](https://openswe.seahaven.com/agents/reviews/Sea-Haven-Industries/seahaven-slack-bot/92) <!-- open-swe-reviewer pr=92 -->
This repo is archived. You cannot comment on pull requests.
No description provided.