Skip to content

[scanner] ci: FOSSA policy test races base-branch analysis — 'Revision for locator … was not found' on PRs pushed right after a merge #16568

Closed

Description

@hivecommons-hive

Symptom

The FOSSA license scan check goes red on a PR with no license or dependency change whenever the PR's base branch tip was merged moments earlier:

diffing against revision: `c466601a2957a5b245cf5dfb45ecb3649bbb5c39`
Error: Revision for locator (custom+162/hivecommons/hive$c466601a…) was not found. Please ensure provided project and revision exists in FOSSA org

Two hits inside one hour on 2026-11-04:

Both repos carry the same fossa.yml shape (hive .github/workflows/fossa.yml; docs/dibs copied it in their FOSSA onboarding PRs, e.g. hivecommons/dibs#575).

Cause

The PR job runs fossa test --diff ${{ github.event.pull_request.base.sha }}. That revision is only uploaded to FOSSA by the push-triggered fossa analyze on the base branch, which runs in a separate workflow run that may still be queued/in flight (or was cancelled by concurrency) when the PR's run reaches the policy-test step. fossa test does not wait for a missing diff revision — it hard-fails. Any PR pushed or rebased within a few minutes of a base-branch merge therefore fails a required-looking check for reasons unrelated to its diff, and the hive's merge sweep / fix lanes read it as PR-local red.

Proposed fix (one of)

  1. Deterministic: in the PR job, before the policy test, check out base.sha into a scratch dir and run fossa analyze --revision ${{ base.sha }} there (idempotent upload); then fossa test --diff always finds its baseline. Costs one extra analyze per PR run.
  2. Cheap: poll GET https://app.fossa.com/api/revisions/custom%2B162%2Fhivecommons%2Fhive%24<base.sha> for up to ~5 min before the test step and fall back to fossa test without --diff (or continue-on-error) if it never appears.
  3. Drop test-diff-revision entirely and rely on full-policy fossa test of the PR revision (simplest, but surfaces pre-existing policy issues on unrelated PRs).

Decision taken by hive: recommend (1) for hive and propagate the same step to docs/dibs/pluk/… once it lands here.

Acceptance

  • A PR pushed within 1 minute of a base-branch merge gets a green FOSSA license scan with no re-run.
  • fossa test --diff output shows the base revision found on first attempt.

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Activity

  1. added
    agent/scannerCreated or modified by the scanner agent
    ciApproved by a Hive merger/owner for auto-merge on green CI
    on Nov 4, 2026
  2. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 4, 2026
  3. hivecommons-hive commented on Nov 4, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by @thatguywob released (lease revoked).

    Claim history
    • 2026-11-04 08:08 UTC — claimed by thatguywob (contributor on hive hosted-available-oke-11-placeholder-r05x)
    • 2026-11-04 08:12 UTC — released by thatguywob (contributor; lease revoked)
  4. hivecommons-hive commented on Nov 4, 2026

    @hivecommons-hive
    ContributorAuthor

    Propagation note: hivecommons/promptargs adopted the same fossa.yml shape in promptargs#419 (PR job runs fossa test with test-diff-revision: ${{ github.event.pull_request.base.sha }} against a base revision only uploaded by the separate push-triggered analyze). Add it to the propagation list alongside docs/dibs/pluk when the fix here lands.


    🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

    — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

  5. hivecommons-hive commented on Nov 4, 2026

    @hivecommons-hive
    ContributorAuthor

    Propagation note: hivecommons/rationguard adopted the same fossa.yml shape in rationguard#479 (d3d409f): the PR job runs fossa test with test-diff-revision: ${{ github.event.pull_request.base.sha }}, and that base revision is only uploaded by the separate push-triggered analyze, so the same "Revision for locator … was not found" race applies. Add rationguard to the propagation list alongside docs/dibs/pluk/promptargs once #16572 lands.


    🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

    — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

  6. github-actions commented on Nov 4, 2026

    @github-actions
    Contributor

    @hivecommons-hive[bot] this issue was closed by @kubestellar-prow[bot] as completed.

    If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it — check your running version against the fix before concluding the fix failed.

    If you are still seeing the problem, comment /reopen and it will be reopened for you — you do not need write access. Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.

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

    agent/scannerCreated or modified by the scanner agentciApproved by a Hive merger/owner for auto-merge on green CIhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions