Repository navigation
fix(automation): skip update on research exception so repos retry - #70
Open
detail-app[bot] wants to merge 1 commit into
Open
detail-app[bot] wants to merge 1 commit into
detail-app[bot] wants to merge 1 commit into
Conversation
Contributor
🤖 Augment PR SummarySummary: This PR fixes repository-description automation so transient or API-level research failures remain retriable. Changes:
generatePrDescriptions: exceptions retry on a future run, whereas completed-but-unproductive AI calls are considered attempted.
🤖 Was this summary useful? React with 👍 or 👎 |
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.
Detail bug report: View on Detail
Summary
researchRepositoryDescriptionsautomation task (commit3587d45, reworked in6366007) populates theuseDescription/impactDescriptionfields on theRepositoryGraphQL type so recruiters see why contributing to a repo is impressive.descriptionsFetchedAtand callsprisma.repository.updatewithnulldescriptions. The row is then permanently excluded bywhere: { descriptionsFetchedAt: null }on every future run.generatePrDescriptionstask does for errors). InsteaddescriptionsFetchedAtis persisted and the repository silently loses both recruiter-facing descriptions forever with no recovery path.useDescription/impactDescriptionfields are nullable enhancement fields; the repository'sname,url,logoUrl,projects, andprojectCountremain visible — the feature degrades to its pre-3587d45state for affected rows, which is not catastrophic but is permanent and silent.Code with Bug
src/automation/tasks/researchRepositoryDescriptions.ts:The selection query that prevents recovery:
Explanation
descriptionsFetchedAtand always executesprisma.repository.update, even ifresearch()fails via exception.where: { descriptionsFetchedAt: null }, a repo that hit an exception becomes permanently ineligible for future runs.Codebase Inconsistency
src/automation/tasks/generatePrDescriptions.tshandles these cases differently: it stamps inside thetry(soft-null) but leavesprDescriptionFetchedAtunset in thecatch(exception) so the job retries on the next run.researchRepositoryDescriptionsdoes not.Recommended Fix
Stamp on soft-null, but skip updating the repository on any exception (leave
descriptionsFetchedAtunset) so it will be retried next run, matching the pattern ingeneratePrDescriptions.History
This bug was introduced in commit 6366007. The commit's stated goal ("Add take") was to add a
descriptionsFetchedAttimestamp so repositories the AI couldn't describe wouldn't be re-billed on every run; the bug slipped in because, in the same change, the author unconditionally pre-populateddescriptionsFetchedAt: new Date()into the update payload and removed the priorif (Object.keys(data).length > 0)guard that had previously skipped theprisma.repository.updatecall entirely when allresearch()calls failed — conflating the deliberate soft-null stamping with the exception case the guard had also been silently protecting.Automatic Fixes PRs can be configured here.