Skip to content

Dependency updates are decided and proven: families, verification set, one advisory count, safety per major, behaviour probes - #671

Merged
nambok merged 3 commits into
mainfrom
upgrade-quality-au
Nov 14, 2026
Merged

nambok merged 3 commits into
mainfrom
upgrade-quality-au

Conversation

@nambok

@nambok nambok commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

A reviewer of a CoderHelm dependency security PR found the code sound and five gaps in how the update was decided and accounted for: an advisory count that disagreed with the package manager's audit, a framework family split across versions, no type check because CI has none, "contract unchanged" while a validation major changed 400 bodies, and overrides across majors with no reason they are safe. Each is now a general mechanism in common::upgrade_quality, run in the dependency run and recorded for the head commit.

Changes

  • family: packages released together (same source repository in the registry, same version in the base lockfile, or a peer range that pins them) move as one bump; a lockfile that splits them fails the set. Derived from registry metadata and the lockfile only, no outside grouping data.
  • verify: the verification set is found in the project, not in CI (frozen install with the manifest's package manager version and the deployment image's, type check, build, lint, tests, production audit), fitted to the sandbox time left, compared with the base branch where the head fails; what did not fit is named.
  • advisories + dep_audit: fixed, remaining and introduced counted once, base and head read the same way, laid beside the audit, each disagreement with its cause.
  • safety: each major's paths, where they run, use in the repository, reachability with its limit, and a parent release before an override.
  • behaviour: majors the repository calls are probed through their call sites on the base build and the head's; "unchanged" stays only when a probe shows it.
  • The record lives on the security ticket for the head commit and reaches the description through WhatToCheck; settle cites it. Incident au reproduces the five review points.
  • Merged current main.

Verification

  • cargo fmt --check --all, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace: all pass locally.
  • Incident au passes only when all five points are found.
  • Not yet run in a real sandbox against a live repository.

…et found in the project, one advisory count, why each major is safe, behaviour probes

An outside review of a dependency security pull request found the code
sound and five gaps in how it was decided and accounted for. Each now has
a general mechanism in common::upgrade_quality, enforced in the run:

- family: packages released together (same source repository in the
  registry, same version in the base lockfile, or a pinning peer range)
  move as one bump; a lockfile that splits them fails the set.
- verify: the set a dependency change is verified with is found in the
  project, whatever CI runs (frozen install with the manifest's package
  manager version and the deployment image's, type check, build, lint,
  tests, production audit), budgeted to the sandbox's time, compared with
  the base branch and recorded against the head.
- advisories: fixed, remaining and introduced, base and head read the same
  way and laid beside the package manager's audit, each disagreement with
  its cause.
- safety: each major's dependency paths, where they run, whether the
  repository uses it, and how it is fixed (a parent release before an
  override).
- behaviour: majors the repository calls are probed on the base build and
  the head's; "unchanged" stands only on a probe.

The record is kept on the security ticket for the head commit and reaches
the description through WhatToCheck on the pr_body_at_head path. Incident
au reproduces the five review points.
@nambok
nambok merged commit 8b134aa into main Nov 14, 2026
10 checks passed
@nambok
nambok deleted the upgrade-quality-au branch November 14, 2026 03:30
nambok added a commit that referenced this pull request Nov 14, 2026
Brings in #672 (GitHub request budget, Integrations) and #671
(dependency updates decided and proven). Incident ids au (#671) and av
(this branch) are distinct and both kept; the worker tick keeps the
lesson cleanup and runs the skill sweep under its GitHub budget.
nambok added a commit that referenced this pull request Nov 14, 2026
…facts check

The section #671 records (advisories on the head, families released
together, the verification set) is built into a dependency pull
request's body, shaped by description_facts::shape against the head's
dependency facts, and must come out whole; a rebuild reads it through
security_fixes::at_head.
nambok added a commit that referenced this pull request Nov 14, 2026
…head (#674)

* A description names the head it was built for and is rebuilt whenever the head differs

A dependency run's description was built on the commit that changed the
manifest, where the lockfile still resolved the old version. The lockfile
was regenerated in later commits and the run completed with a description
that still said "not moved on the head", still counted the advisory as not
fixed and still listed items of the earlier head.

- description: a hidden stamp names the head the description was built
  for. reconcile rebuilds it when the stamp is not the pull request's
  head: after every message in which CoderHelm moved the branch, in the
  checks and settle step, before a review of its own pull request, in the
  pull request watch and at the end of the run, which returns an error
  instead of completing on another head's description.
- GitHub client: every request leaves through send_tracked, which notes
  the branch a successful ref update, contents write or merge moved. No
  caller has to remember to ask for a rebuild.
- review: its open findings are written on the description as it is now
  and only while the reviewed head is still the head. It used to write
  back the copy it read when it started.
- settle: an item that says a lockfile is out of sync is checked on the
  head by the repository's checks, never carried as CoderHelm's own.
- own review: a finding that the description is behind the code triggers
  the rebuild and is dropped when the rebuild settles it. Every finding
  that is not pure style is CoderHelm's to act on.
- dep_head: tests for suffixed versions, exact-version override keys and a
  package moved on a later head.
- Incident case ar and its row in docs/incidents.md.

* A description is a view of the facts recorded for its head

* Plain steps, the reader pass and the quality eval for descriptions

* Every rebuild is shaped from the facts, held by the source test; lead evidence reads as a sentence

- description: the source test now also requires that every write is laid
  out, that a model's text is fact checked before it is saved, and that a
  rebuild gathers the facts, asks the reader pass, shapes, stamps, saves
  and settles CoderHelm's own thread about the description. No module
  other than the rebuild, the eval and the incident cases shapes a
  description.
- pr_facts: the evidence after an item under "Look at first" starts with
  an upper case letter ("crosses a major version. No safety evidence is
  recorded ...").

* A security update's description keeps the upgrade record through the facts check

The section #671 records (advisories on the head, families released
together, the verification set) is built into a dependency pull
request's body, shaped by description_facts::shape against the head's
dependency facts, and must come out whole; a rebuild reads it through
security_fixes::at_head.
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