fix(ri): use connection auth binding for repair actions - #68
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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