Repository navigation
Conversation
…pendency change can break is built A dependency run's pull request had the right code after a review round and the wrong description: its table still showed the plan (packages as major version jumps the final manifest no longer makes), its count of fixed advisories was never compared with the final lockfile, the round that fixed the code said it could not edit the description, and a second app no CI job builds was never built. - common::dep_head: what the lockfile on the head resolves for each package version line, compared with the base branch. The dependency description's table and headline are written from it; an advisory is fixed only at or past its patched version; what can't be read is said as not known and the plan is marked as a plan. - passes::description: the one place a description is written from (save), the one rebuild every path that moves the head calls (head_moved), and a source test that fails on a body write anywhere else. - common::description_handoff: fix rounds are told the description is rebuilt for them; a round's sentence that hands it to a person is taken out and becomes the rebuild. Feedback rounds with no person behind them now have the description tool they were told to call. - common::file_claims and passes::file_claims: a sentence a run writes into a prose file that says a check passes needs that check's recorded passing result, or it is taken out before the run finishes. - runtime_proof: every workspace project whose dependencies bring in a changed package line is built when its manifest declares a build, and the project of every other lockfile with bumps; a project that can't be proven is named with why. - Incident case aj and its row in docs/incidents.md.
…::save - pr_watch.rs, flaky.rs and reviewer_guide.rs wrote the description directly; each now goes through description::save. - A dependency rebuild lifts every owned section out before it replaces the computed ones and puts them back as they were (rebuilt_body), so the settled items, CI notes, the reviewer guide, review fixes and the draft status survive wherever they sit. The model's rewrite puts the "before and after the code" section back word for word. - Feedback rounds settle the claims they write into files against their own run of the full test suite, before the description is rebuilt. - The incident case is renamed am_description_from_the_head (aj is taken).
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.
Summary
A dependency run's pull request had the right code after a review round and the wrong description. Its table still showed the plan (five packages as major version jumps the final manifest no longer makes), its count of fixed advisories had never been compared with the final lockfile, the round that fixed the code wrote that it could not edit the description and left the corrections to a person, and the repository's second app, which no CI job builds, was never built.
This change makes the description a function of the head, and makes the runtime proof cover every project a change can break:
Changes
The description is rebuilt from the head
common/src/dep_head.rs(new):resolvecompares each lockfile on the base branch with the same lockfile on the head, one answer per package version line: moved (with the real versions and whether it crosses a major), not moved, no longer installed, or not known with why.HeadFacts::fixedcounts an advisory as fixed only when every copy left on its line is at or past the patched version.headlinewrites the first sentences from those counts.common/src/reachability.rs:lock_copiesreads every copy a lockfile resolves (pnpm, npm, yarn classic and berry, Cargo, poetry, uv, Bundler). A lockfile it can't read gives no answer, and the description says so.common/src/security_fixes.rs:pr_body_at_headwrites the table, the headline and the per-tier lists from the head's facts. A line that could not be read is shown as "planned; not read from the head", and no count of fixed advisories is claimed when nothing could be read.pr_body_linked(the plan) is no longer called by the worker.worker/src/passes/security_fixes.rs:head_factsreads the lockfiles on both sides.rebuild_at_headreplaces Summary (headline and table), What to check and Proof in place and keeps the rest. The first description, a bundle a fix joins or leaves, and the CI result all use it.worker/src/passes/description.rs(new):saveis the only caller of the GitHub client's body write. All 29 call sites in 12 files now go through it.head_movedis the one rebuild: the prose is rewritten from the whole diff, then the dependency sections are rebuilt from the lockfile, so the model is never the source of a version or a count. CI fix rounds, review fix rounds and feedback call it. A bump CI takes out callsdependency_sections.head_movedby.A round never hands the description to a person
worker/src/passes/feedback.rs: the round's instructions told it to callupdate_pr_descriptionfor any request about the description, but the tool was only offered when a person triggered the round. A round started by CoderHelm's own review or a security follow-up was told to call a tool it did not have. The tool is now offered in every round; with no person behind the round, the call asks for the rebuild from the branch.implement.rs, used by CI fix and review fix) had no word about the description at all. They are now told it is rebuilt for them (description_handoff::ROUND_NOTE).common/src/description_handoff.rs(new):handoffsfinds a sentence that says the description can't be edited or leaves an edit of it to a person;scrubtakes it out. A fix round's account and a feedback round's reply are checked, and a match runs the rebuild even when no code was pushed.description::saveapplies the same check to every description.No unproven claims in files the run writes
common/src/file_claims.rs(new): reads the lines a change adds to prose files (.md,.mdx,.rst,.adoc,.txt,README,CHANGELOG) and returns each sentence that states that the build, the tests, the linter or the type check passes. Instructions, conditions, plans, questions, negatives, headings, code blocks and sentences where the word means something else are left alone.worker/src/passes/file_claims.rs(new): the recorded results are the run's sandbox check record, the same one the pull request's sections are written from. A claim without a passing record is taken out of the file in one commit and named on the run page. It runs after the proof check on both ways a run opens its pull request, and after a fix round lands, before the description is rebuilt.Every app the change can break is built
common/src/reachability.rs:lock_projectsreads the workspace projects of a lockfile and which changed package lines each one's dependencies bring in, through other workspace projects too. pnpm fromimporters, npm from thepackagesoutsidenode_modules, yarn from the workspace manifests.common/src/runtime_proof.rs:add_projectsadds each affected project'sbuildscript to the proof, whether or not CI builds it.add_lockfileadds the project of every other lockfile with bumps, after its own install (this replaces "covers the project with the most bumps only").unproven_projectsnames a project that has no build, gave no result, or fails on the base branch too, with the reason. A project build that passes on the base branch and fails with the bumps is blamed like any other, which is what the take-out acts on. Another project's failing build never keeps the main project's start from running.worker/src/passes/dep_fix.rs:proof_planworks out the affected projects and adds them. The proof still runs as its own step with the existing time rules and base-branch comparison.Incident suite
incidents/aj_description_from_the_head.rsand its row indocs/incidents.md.Not in this change
Verification
cargo fmt --check --all: cleancargo clippy --workspace --all-targets -- -D warnings: cleancargo test --workspace: passes (common 2146, gateway 902, worker 1652, 0 failed)