Skip to content

fix(roadmap): the job clone and the change filter fail closed when the session login lookup fails, instead of falling back to a made-up devops-cli identity #1409

Closed

Description

@dan-petty

Problem

_get_session_login (src/devops_cli/roadmap/run.py) catches every exception from get_github_session().login and returns "devops-cli". Two callers then act on that made-up identity, and nothing is logged:

  • ensure_checkout writes it into the job clone's user.name and user.email, so the release cut can commit as an identity that doesn't exist;
  • _current_actor uses it to drop the Service's own events, so a failed login lookup stops that filter, and the Service then reacts to its own writes.

Found while delivering #1366 on 2026-10-08: a test fake that refused the login lookup still passed unless the test asserted the identity.

Acceptance criteria

Strategic alignment


Found on 2026-10-08 while delivering #1366. Filed directly with no priority; the roadmap service's intake sets Priority, Value and Effort.

Activity

  1. added
    type/bug
    scope/github
    source/agent
    on Oct 8, 2026
  2. dan-petty-bot commented on Oct 8, 2026

    @dan-petty-bot
    Collaborator

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Priority: P2-Medium. It only manifests when the session login lookup fails, but when it does it corrupts commit identity and disables the self-event filter, so it is a real correctness defect without being a constant outage.
    • Value: Medium. Prevents the service from committing as a non-existent identity and from reacting to its own writes, but only under a specific failure condition.
    • Effort: Low. Remove the try/except fallback in one function, let two callers propagate the error, and add a focused test at the gh process edge.
  3. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Linked: #1365. After this item, a failed login lookup fails the clone rows (roadmap/run.py:333), which #1365 logs as one ExceptionGroup member. Found by the 2026-10-08 backlog review.

  4. added this to the v0.2.38 milestone on Oct 17, 2026
  5. added
    priority/p0-critical
    on Oct 18, 2026
  6. modified the milestones: v0.2.38, v0.2.37 on Oct 19, 2026
  7. added
    status/in-progress
    on Oct 19, 2026
  8. added a commit that references this issue on Oct 19, 2026
    3b70671
  9. dan-petty commented on Oct 19, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1699, merged into release/v0.2.37 as 3b70671.

    Closes #1409

    8 file(s) changed.

    How it was verified

    Check runs at 74ae80b:

    • Prune PR DevContainer Images: pass
    • Audit Defect PR Hardening: skipping
    • zizmor: pass
    • devops-cli: pass
    • bandit: pass
    • CodeQL: pass
    • Static Analysis: pass
    • Analyze (actions): pass
    • Rule Pack Tests: pass
    • Changed-Test Independence: pass
    • Fail-to-Pass Self-Check: pass
    • Tests & Coverage: pass
    • Analyze (python): pass
    • Fail-to-Pass Check: pass
    • Service Image: skipping
    • Dependency Freshness: skipping
    • DevContainer Image: skipping

    Acceptance Criteria of docs/agent/tasks/task-1409-fail-closed-session-login.md:

    • _get_session_login lets a failed login lookup raise, with no fallback.
    • Clone rows fail closed when login lookup fails, and user.name is never written as "devops-cli".
    • _current_actor caller (run_due_jobs / _fetch_filtered_changes) fails the round when the actor is absent and login lookup fails.
    • Tested through the GitHub session fake (github_api / GitHubApiFake) refusing GET /user.
    • Each test call phase stays under 1 s, and uv run devops ci passes.
    • Changelog fragment changelog.d/1409.md records the change.
  10. added a commit that references this issue on Oct 20, 2026
    954914e
  11. removed
    status/in-progress
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p0-criticalscope/githubsource/agenttype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions