Skip to content

Review follow-ups to the merged backlog batches (#293/#294) - #295

Merged
richardmhope merged 1 commit into
mainfrom
claude/backlog-task-selection-svmnci
Aug 2, 2026
Merged

Review follow-ups to the merged backlog batches (#293/#294)#295
richardmhope merged 1 commit into
mainfrom
claude/backlog-task-selection-svmnci

Conversation

@richardmhope

Copy link
Copy Markdown
Collaborator

Summary

An adversarial re-review of the two merged backlog PRs (#293, #294) surfaced three defects, all in the newest code. One commit, all three fixed with regression tests. No tracked issues — these are review findings on already-merged work.

Changes

Noted in review but deliberately unchanged: the NO_PROXY decision for OIDC uses the discovery URL's host for all three outbound calls (true for all four supported IdPs, documented assumption); the roles app-claim allowlist in the #269 fix is name-based (claim naming is operator-controlled config, the intended trust boundary); and applyAiReportFields shares the in-flight-snapshot staleness, but its queued follow-up save self-heals since nothing navigates away.

Testing

  • uv run pytest passes — 669 passed, 16 skipped
  • Static gates pass — ruff, bandit, mypy, vulture, djlint all clean
  • Added/updated tests (a bug fix includes a regression test)

New tests: the flush-loop contract (bounded repeat while dirty/in-flight, timer + queued-flag cleanup, refuse-when-still-dirty ordering); malformed proxy/webhook URLs neither crash snapshot() nor leak the embedded password, on both the env and DB rows; non-URL values with an @ (the dev-login email) still render; and the 409 branch clearing the queued flag.

Standing caveat from the parent PRs: biome lint and the assets drift job run only in CI (not available in the dev sandbox). Only JS/CSS-comment-level changes here — no new Tailwind utilities.

Checklist

🤖 Generated with Claude Code

https://claude.ai/code/session_01LQpYwRbt1YhpTXPb46MR5v


Generated by Claude Code

Adversarial re-review of the two merged PRs surfaced three defects, all in
the newest code.

**Transition flush is not a flush when a save is in flight (#278 gap).**
`saveNow()` with a save already in flight returns THAT promise — whose
FormData snapshot predates any keystrokes typed since it started — and
merely queues a follow-up. `submitTransition`'s single await therefore
narrowed the publish race from the 1.2s debounce to one save RTT without
closing it, and the queued follow-up save is a plain fetch the navigation
aborts. The handler now repeats the flush (bounded at 5 attempts) until
nothing is dirty or in flight, clears the re-armed timer and queued flag
so no doomed fetch fires into the navigation, and refuses the transition
if it exits the loop still dirty.

**/admin/config 500s on a malformed URL-shaped value (#273 hardening).**
`urlsplit` raises on an unbalanced IPv6 bracket and `.port` raises on a
non-numeric or out-of-range port, and the new `_scrub_userinfo` /
`_origin_only` helpers called both unguarded — so a typo'd proxy or
webhook URL crashed exactly the page an operator opens to see their
broken config. Both helpers now catch the parse failure; a URL-ish value
that may carry a credential which cannot be safely carved out is hidden
wholesale rather than guessed at.

**Stale queued-save flag after a 409 (#271 polish).** A save queued behind
the one that hit the optimistic-lock conflict survived recovery and fired
one redundant re-post of the same stale version. The 409 branch now drops
the queued flag so recovery starts clean.

Regression tests for all three; suite 669 passed, all static gates clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LQpYwRbt1YhpTXPb46MR5v
@richardmhope
richardmhope requested a review from a team as a code owner August 2, 2026 20:57
@richardmhope
richardmhope merged commit 3cbfba1 into main Aug 2, 2026
7 checks passed
@richardmhope
richardmhope deleted the claude/backlog-task-selection-svmnci branch August 2, 2026 21:00
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.

2 participants