Skip to content

ci(lore): stop pull request runs posting into main - #300

Merged
saadahmed95 merged 2 commits into
mainfrom
ci/lore-tests-no-pr-run
Nov 1, 2026
Merged

saadahmed95 merged 2 commits into
mainfrom
ci/lore-tests-no-pr-run

Conversation

@saadahmed95

@saadahmed95 saadahmed95 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Why

A pull request's Lore test run writes into main's graph. lore-tests.yml runs lore-code-trace --post on pull_request. That checkout is a detached merge commit, so the binary reports branch HEAD, and lore-api deliberately reads HEAD as the default branch (overlayBranchOf). From Lore's code, each such run therefore:

  • projects the PR's results onto main's graph
  • moves main's recorded ingest commit to a merge commit that never lands on main, so the next push to main can't reach it and uploads the whole report

It shows in this repo's logs. Run 40962161541 checked out 1a9af90 ("Merge 518ef0c… into b8b3881…") and logged posted incremental test report for re-cinq/HALEngine@1a9af90.

Lore's data model says "main itself is never written by a branch". re-cinq/lore#3603 dropped this trigger from Lore's own job on 2026-10-26 and told its onboarding agent never to use it. Its description says repositories already onboarded keep their workflow until someone edits it, and this is one of them. bowman-ui's lore-tests.yml records the same damage and doesn't post from a pull request.

This job only takes about a minute here, so the cost isn't time. The problem is wrong data in main's graph.

What Changed

  • .github/workflows/lore-tests.yml: removes the pull_request trigger, and a one-line comment says why. push stays, with no branch filter.

Alternatives Considered

  • Narrowing push to main as well, which Lore's onboarding instruction now asks for. I've left that as a separate decision, because it isn't what causes this damage. A branch push checks out a real branch (run 40962100407: git checkout --progress --force -B build/check-audit-declared-dependents), so its report names that branch, and lore-api puts it in the branch's overlay and leaves main alone. Removing it would also take away the coverage that query_trace reads for a branch.
  • Keeping a pull request run that doesn't post, as bowman-ui does. The branch-push run already proves the manifest and scripts on the PR's head commit.
  • Having the binary report the real branch on a pull request checkout. That needs a change to Lore and goes against Test-report ingest runs on main only lore#3603.

ADRs & Architecture

None.

Testing

  • Workflow: it parses with push as its only trigger, and scripts/check-action-pins.mjs passes.
  • Changelog: bash scripts/check-changelog.sh origin/main reports no shipped source changed.
  • Specs: npx re-lint-reanchor --check reports stale: 0, and no spec, test or doc refers to this workflow.
  • Required checks: lore-tests-jest isn't one, so nothing waits for its pull request run. The required ones are Verify, Build chain and Smoke (packed tarball), and lore-tests-jest still reports on a PR's head commit through its branch push.
  • Build chain is red here for an unrelated reason: a new advisory, GHSA-mrwp-f3q8-3g9p in follow-redirects. This PR changes no dependency and can't merge until that fix lands and this branch picks it up.
  • Live check on this PR: lore-tests-jest should appear once, from the push, instead of twice.
  • Not run: npm run verify, because nothing it covers changed. CI runs it.
  • After merging: the first push to main may upload the whole report once if the recorded commit is off main. I can't read that commit from here.

Code Quality Checklist

  • Lint: N/A, no code changed
  • Types: N/A, no code changed
  • Tests: N/A, a workflow trigger with no test around it
  • No Secrets: No API keys, tokens, or credentials committed
  • Formatting: N/A, Prettier covers .ts here
  • Documentation: the one-line comment says why the trigger is absent
  • Layer Adherence: N/A, outside src/
  • No console.log: N/A, no code changed
  • Changelog: no shipped source changed

Related Issues

None. Follows re-cinq/lore#3603.

🤖 Generated with Claude Code

A pull request's checkout is a detached merge commit, so lore-code-trace
reports branch HEAD and lore-api reads that as main. The run wrote the PR's
results into main's graph and moved main's recorded commit to a merge commit
that never lands on main. Branch pushes name their branch, so they stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lore-agent

lore-agent Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Lore is reviewing this PR — 05d37b3d-caf7-44f7-960a-c8fc6878ad7e.

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

@lore-agent

lore-agent Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Nothing blocks this PR from merging now. Lore updates this comment when the reason changes.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

🔍 Lore Spec Impact

Examined 1 changed file(s): 0 had graph data (no coupling found), 1 had none — no ingested test run covers them, so this check cannot speak for them.

Deterministic · graph @ 77aa2b5 (projected 2026-11-01) · 1 file(s) skipped: changed since the graph last saw them, so their line numbers no longer line up · no tests run by this check

@lore-agent lore-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lore review — Approved

Removing the pull_request trigger from lore-tests.yml cleanly stops detached PR merge commits from being ingested into main's graph while keeping push-triggered branch and main test ingestion.

Must fix (0) · Consider (0) · Nits (0)

Reviewed by gemini-4-argon

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

Posted by floor, visit 57d32af8-8a7f-4568-b726-4b2b79c2ff70.

@saadahmed95
saadahmed95 merged commit db69574 into main Nov 1, 2026
7 checks passed
@saadahmed95
saadahmed95 deleted the ci/lore-tests-no-pr-run branch November 1, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant