Skip to content

github capture: an observedRepos.list() failure during a session_repos tick still aborts the whole tick #1306

Description

@philcunliffe

Deferred from PR #1302 (head cdf51d2a5517e3214cf2e60cd8a41bcc95a742c4), review rounds 1 and 2, finding 2.

Severity: Low (deferred hardening; not a defect PR #1302 ships).

Where: hypaware-core/plugins-workspace/github/src/tick.js:28, the await runtime.observedRepos.list() inside runCaptureTick.

Evidence and behavior: PR #1302 fixed the all_visible half of this shape: resolveRepos was awaited outside the per-repo try/catch, so an enumeration failure escaped captureRepos and aborted the whole tick instead of one repo. The session_repos half is unchanged. When runtime.config.inventory === 'session_repos', runCaptureTick awaits runtime.observedRepos.list() before the guarded capture loop, so a throw there propagates out of runCaptureTick into the tick() catch in source.js and the tick records github.poll_tick_failed having captured nothing.

Why deferral is safe: This is pre-existing behavior on master, not something PR #1302 introduced. The PR does not touch tick.js (git diff --stat origin/master...HEAD covers only capture.js, commands.js, and two test files). The call is a local cache read rather than a network call, so it is far less failure-prone than the listViewerRepos() path that motivated #1298. When it does fail the outcome is attributable (github.poll_tick_failed plus lastError), it retries on the ordinary cadence, and backlogPending survives the catch, so no durable work is lost or cleared. It is explicitly outside issue #1298's acceptance condition.

Acceptance: With inventory: 'session_repos' configured and runtime.observedRepos.list() made to throw, runCaptureTick resolves rather than throwing: the failure is recorded in the returned errors array and logged with its error_kind, the tick completes, and pending reflects durable saved work rather than being cleared. Covered by a test alongside the all_visible case in test/plugins/github-capture.test.js.

Activity

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

    neutral:fixDelegate this issue to neutral for an autonomous fix attempt (reproduce -> fix -> PR)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions