Skip to content

fix(ri): use connection auth binding for repair actions - #68

Merged
tnunamak merged 2 commits into
mainfrom
waspflow/chatgpt-wedge-systemic-0730
Jul 31, 2026
Merged

fix(ri): use connection auth binding for repair actions#68
tnunamak merged 2 commits into
mainfrom
waspflow/chatgpt-wedge-systemic-0730

Conversation

@tnunamak

Copy link
Copy Markdown
Contributor

Summary

Use durable connection auth binding to select the repair surface, and stop idle schedules from claiming active collection.

Validation

Focused suites passed 503 tests; the owner rerun passed 114 tests; typecheck, Ultracite, spec check, diff check, and the complexity ratchet passed.

Risk

Static-secret rejection remains binding-scoped and covered. Browser-session connections with no credential row now select browser-session repair.

Assisted-by: AI

tnunamak added 2 commits July 31, 2026 00:14
…uth surface

A browser-session-bound connection with no stored credential (dondochaka
ChatGPT, cin_e4ab231c7d49b8f59e4c80ed) could be routed to stored-credential
capture instead of browser-session repair whenever a scheduled run's
known-gap classifier flattened a definitive auth failure (401/unauthorized
wrapped in a `_session_failed` terminal prefix) to the generic
"credential_rejected" reason literal in ref-control.ts. connection-health.ts's
credentialsValidCondition matched that literal via message-text pattern
matching alone, ignoring the durable connection-binding fact
(credential === null, browserSessionRepairCapable === true) already present
on the same input.

Make the binding-scoped credential evidence the authority: a
"credential_rejected" surface now requires standing stored-credential
capability (credential?.capable === true); a browser-session-bound
connection with no credential row routes to browser-session repair even when
the generic run-reason text says credential_rejected/401. When that
generic reason routes to session repair, use the honest "session_required"
label instead of echoing the misleading raw reason on the returned
condition.

Also fix a co-located presentation bug: the scheduled-progress headline
claimed "Collecting on schedule." for an idle, eligible-but-not-currently-
syncing connection (no distinction between "eligible" and "active"). Thread
badges.syncing through progressHeadline/buildProgress so idle eligibility
reads "Refreshes on schedule." and only active runs claim "Collecting".

Regression coverage: a browser_collector-bound connection with a
generic/flattened credential_rejected reason and no credential row now
proves exactly one browser_session reauth action, no open attention, and no
phantom "Collecting" headline while idle. Two new rendered-verdict tests
cover the idle-vs-syncing scheduled headline split.

Investigated and ruled out as unrelated: the unapplied browser-surface
replacement-episode correction artifacts (38 external_or_host_loss members
for this connection) are continuity diagnostics only -- nothing in
connection-health.ts reads that ledger, so they cannot poison credential/
session evidence. The stale list_summary_projection_state is already
self-repaired per-read via reconcileDirtyConnectorSummaryEvidence; no
change needed. The old stopping duplicate browser_surface row is not on the
live selection path (ready surface has no active lease) and is separate
lifecycle residue, not causally linked to this fix.

Hook bypass: this worktree's shared core.hooksPath pre-commit gate includes
a repo-wide complexity-mass-ratchet check that failed on
runtime/rendered-verdict.ts (baseline 77, current 80) for the one added
`syncing` branch in progressHeadline's scheduled case. All gates this task
actually calls for were run independently and passed before this commit:
node --test (503/503) across the touched suites, tsc --noEmit, ultracite
check on every touched file, pnpm spec:check, and git diff --check.
Committed with --no-verify per explicit owner instruction rather than
absorb an unrelated repo-wide ratchet policy question into this fix.

Assisted-by: AI
Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
…chet green

Follow-up to fff9b9b: extracting the scheduled-mode branch of
progressHeadline into its own pure helper (mirroring the existing
deferredHeadline/manualHeadline siblings) keeps progressHeadline's own
complexity flat instead of growing it for the new syncing parameter. The
complexity-mass-ratchet gate now reports TIGHTENED (baseline 77 -> 75) for
runtime/rendered-verdict.ts rather than the prior FAIL (77 -> 80); baseline
updated to match.

node --test test/rendered-verdict.test.ts test/ref-connectors-connection-projection.test.ts \
  test/connection-health-acceptance.test.ts test/connection-health.test.ts
# 303 passed, 0 failed
pnpm --dir reference-implementation run typecheck   # passed
pnpm exec ultracite check runtime/rendered-verdict.ts   # passed
node scripts/quality-ratchet/check-mass-ratchet.ts --files "runtime/rendered-verdict.ts"
# MASS RATCHET PASS (TIGHTENED 77 -> 75)

Assisted-by: AI
Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pdpp Ready Ready Preview Jul 31, 2026 5:23am

Request Review

@tnunamak
tnunamak merged commit cc07e3a into main Jul 31, 2026
4 checks passed
@tnunamak
tnunamak deleted the waspflow/chatgpt-wedge-systemic-0730 branch July 31, 2026 05:23
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