Skip to content

Treat CodeRabbit login timeout as fatal auth (#43)#45

Open
pandalump wants to merge 1 commit into
mainfrom
issue-43-coderabbit-login-timeout-fatal-auth
Open

Treat CodeRabbit login timeout as fatal auth (#43)#45
pandalump wants to merge 1 commit into
mainfrom
issue-43-coderabbit-login-timeout-fatal-auth

Conversation

@pandalump

Copy link
Copy Markdown
Collaborator

Summary

CodeRabbit's non-interactive login can abandon with the message "Automatic
login timed out. Use the printed fallback URL to finish authentication." Until
now this fell through authFailureDetail to a deferred 'error' outcome,
letting the review stage continue past an unrecoverable authentication
failure instead of halting.

This change broadens authFailureDetail in
src/workflows/df12-build-odw/faults.ts with two tightly-scoped regexes
anchored on the login/authentication context (login timed out / login timeout and finish authentication), so the message classifies as 'auth'
and rides the existing 'auth' → fatal-auth halt path. No new outcomes,
branches, or signatures are introduced. Generic "timeout" prose remains
unmatched.

Tests

  • tests/modules/faults.test.ts: positive classifier row (coderabbit login timeout) and a negative benign timeout prose row.
  • tests/modules/host-review.test.ts: outcome-level test asserting a
    login-timeout error event classifies as 'auth'.
  • tests/df12-build-odw-assessment.test.mjs: mirrored authFailureDetail
    surface assertion and classifyCoderabbitOutcome row for the compiled
    bundle.

The generated workflows/df12-build-odw.js artefact was regenerated via
make workflow-build and committed alongside the source and tests.

Commit gates (format, lint, typecheck, module and behavioural tests,
freshness) are pending orchestrator validation.

Closes #43

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @pandalump, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Summary

  • Classifies CodeRabbit login timeout and “finish authentication” messages as fatal authentication failures.
  • Preserves generic timeout handling.
  • Adds source, unit, outcome-level, and compiled-bundle test coverage.
  • Regenerates the workflow artifact.

Walkthrough

Extend ODW authentication classifiers to recognise CodeRabbit and Codex login-timeout and authentication-completion messages as fatal auth failures. Add assessment, classifier, and host-review tests covering these mappings while preserving benign timeout classification.

Changes

ODW authentication classification

Layer / File(s) Summary
Extend authentication failure patterns
src/workflows/df12-build-odw/faults.ts, workflows/df12-build-odw.js
Add login-timeout and “finish authentication” patterns to the authentication-failure classifiers.
Validate outcome classification
tests/df12-build-odw-assessment.test.mjs, tests/modules/faults.test.ts, tests/modules/host-review.test.ts
Assert that automatic login timeouts classify as auth, while benign timeout prose remains none.

Possibly related PRs

Suggested labels: Issue

Suggested reviewers: leynos

Poem

Login timed out at the gate,
Patterns now classify its fate.
Auth takes the helm,
Tests guard the realm,
Benign timeouts still wait.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Testing (Overall) ❌ Error Positive tests only use the full login-timeout sentence, so they would still pass if matching relied only on the finish-auth clause and ignored the login-timeout branch. Add a dedicated assertion using only login timeout/login timed out, and keep a separate plain-timeout negative, so both regex branches are exercised.
Testing (Unit And Behavioural) ⚠️ Warning Unit checks are solid, but the new “behavioural” coverage stops at helper seams; no test drives the ODW task path to prove CodeRabbit login timeout halts as fatal-auth. Add a boundary test through runTask or runBetweenItemReview that feeds the login-timeout event and asserts fatal-auth plus workflow halt; keep the helper-level unit tests too.
✅ Passed checks (18 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the PR scope and includes the linked issue reference (#43).
Description check ✅ Passed The description clearly describes the authentication-timeout classification change and its tests.
Linked Issues check ✅ Passed The changes implement #43 by classifying login-timeout and finish-authentication messages as fatal auth.
Out of Scope Changes check ✅ Passed Keep the bundle regeneration and added tests as scope-aligned support for the auth-classification change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
User-Facing Documentation ✅ Passed PASS: docs/users-guide.md already states CodeRabbit authentication failures halt the task as fatal-auth, which covers this login-timeout classification.
Developer Documentation ✅ Passed PASS: The patch only extends auth regexes; docs already cover fatal-auth layering and CodeRabbit auth handling, with no API/architecture or roadmap/execplan change.
Module-Level Documentation ✅ Passed PASS: every touched module has a top-of-file doc comment explaining purpose and relationships; the PR adds no undocumented module.
Testing (Property / Proof) ✅ Passed PASS — this is a narrow regex classifier tweak with concrete example tests; it introduces no broad invariant or lemma that warrants property/proof testing.
Testing (Compile-Time / Ui) ✅ Passed No compile-time or UI surface is introduced; cover the regex change with focused unit and outcome-level assertions.
Unit Architecture ✅ Passed Keep the change in the pure auth classifier: it only adds anchored regexes, leaves dependencies and side effects untouched, and tests pass explicit inputs.
Domain Architecture ✅ Passed PASS: The change stays in pure workflow classification code; it only extends regex matching and tests, with no transport, storage, or framework coupling.
Observability ✅ Passed fatal-auth is already surfaced via bounded faultMetrics, the fatal-auth status, and auth-boundary logs; the new login-timeout branch reuses those paths.
Security And Privacy ✅ Passed PASS: The change only broadens auth-failure regexes for login-timeout messages and adds tests; it introduces no secrets, credentials, or trust-boundary changes.
Performance And Resource Use ✅ Passed PASS: Keep the change; it adds two fixed regexes to an existing small scan, with no new loops, I/O, buffering, or unbounded growth.
Concurrency And State ✅ Passed Keep this as a pure regex-classification change; introduce no new shared state, async work, ordering, or lifetime behaviour.
Architectural Complexity And Maintainability ✅ Passed Pass: keep the change local to existing classifiers and tests; introduce no new layer, registry, or abstraction.
Rust Compiler Lint Integrity ✅ Passed No Rust files, Cargo manifests, lint suppressions, or clone-heavy changes were touched; the PR only adjusts TypeScript/JS tests and regexes.
📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #43

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-43-coderabbit-login-timeout-fatal-auth

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Biome (2.5.3)
workflows/df12-build-odw.js

File contains syntax errors that prevent linting: Line 3866: Illegal return statement outside of a function


Comment @coderabbitai help to get the list of available commands.

CodeRabbit's non-interactive login can abandon with "Automatic login timed
out. Use the printed fallback URL to finish authentication." This message
previously fell through to a deferred 'error' outcome, letting the review
stage continue past an unrecoverable authentication failure.

Broaden authFailureDetail with two tightly-scoped, login/authentication-
anchored patterns so the message classifies as 'auth', routing it through the
existing fatal-auth halt. Generic "timeout" prose is left unmatched.

Cover the new behaviour with a positive and a negative classifier row in the
faults module tests, an outcome-level test in the host-review module tests,
and mirrored rows in the compiled-bundle assessment suite. Regenerate the
committed workflows/df12-build-odw.js artefact.

Closes #43
@leynos
leynos force-pushed the issue-43-coderabbit-login-timeout-fatal-auth branch from 8356768 to 2c13ba0 Compare July 17, 2026 22:36
@leynos
leynos marked this pull request as ready for review July 22, 2026 22:25

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c13ba0d0a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +35 to +36
/\blogin tim(?:ed out|eout)\b/i,
/\bfinish authentication\b/i,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Constrain the login-timeout match to CodeRabbit errors

When an implementation legitimately reports something like “Raised the login timeout to 30 seconds” or “Finish authentication before redirect”, either new regex matches. Because this shared matcher is also applied to implementation summaries and open issues by implementationAuthFailureDetail, run-task.ts then returns fatal-auth, halting the workflow instead of integrating the completed task. Match the complete CodeRabbit abandonment message, or require CodeRabbit error context, rather than treating these standalone phrases as authentication failures.

Useful? React with 👍 / 👎.

@buzzybee-df12

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot added the Issue label Jul 23, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/modules/faults.test.ts`:
- Line 37: Update the fault test table in tests/modules/faults.test.ts to add a
separate `login timeout` input row expecting the authentication category and
retain the existing `timed out` case with its current message expectation,
covering both production alternatives.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3212666e-ddbf-423e-8d34-e81c14b52336

📥 Commits

Reviewing files that changed from the base of the PR and between 6327f14 and 2c13ba0.

📒 Files selected for processing (5)
  • src/workflows/df12-build-odw/faults.ts
  • tests/df12-build-odw-assessment.test.mjs
  • tests/modules/faults.test.ts
  • tests/modules/host-review.test.ts
  • workflows/df12-build-odw.js
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/nixie (auto-detected)

['coderabbit login hint', 'Run `coderabbit auth login` to authenticate', 'auth'],
['logged-in false JSON', '{"loggedIn": false}', 'auth'],
['token expired', 'the token expired yesterday', 'auth'],
['coderabbit login timeout', 'Automatic login timed out. Use the printed fallback URL to finish authentication.', 'auth'],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover the literal login timeout branch.

Add a separate table row using login timeout; the current case exercises only timed out, leaving the second production alternative unverified.

-    ['coderabbit login timeout', 'Automatic login timed out. Use the printed fallback URL to finish authentication.', 'auth'],
+    ['coderabbit login timeout', 'login timeout', 'auth'],
+    ['coderabbit login timed out', 'Automatic login timed out. Use the printed fallback URL to finish authentication.', 'auth'],
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/modules/faults.test.ts` at line 37, Update the fault test table in
tests/modules/faults.test.ts to add a separate `login timeout` input row
expecting the authentication category and retain the existing `timed out` case
with its current message expectation, covering both production alternatives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Treat CodeRabbit login timeout as fatal auth

2 participants