Skip to content

feat(brief): a declared copy's bump names the command that keeps how it is declared (audit E8, C3) - #982

Merged
runyourempire merged 3 commits into
mainfrom
fix/c3-brief-direct-commands
Oct 17, 2026
Merged

runyourempire merged 3 commits into
mainfrom
fix/c3-brief-direct-commands

Conversation

@runyourempire

Copy link
Copy Markdown
Collaborator

What

This is the Brief half of audit E8, the follow-up that recovery-lead cleared on #972.

#972 gave the Upgrade Plan's direct rows the command that moves a declared dependency while keeping how it is declared. The Brief's own direct rows still said a bare "bump minimist to >= 1.2.6". They now give the same command, read by the same rule from the project's own manifest (osv::direct_upgrade::direct_fix):

bump minimist to >= 1.2.6: run npm install "minimist@~1.2.6"

How

  • FixPath::Bump gains fix: Option<String>. It holds either "run <command>" or a manifest edit (a workspace-inherited crate, a PyPI == pin). It is None whenever nothing can be named with certainty, including when the declaration doesn't admit the installed copy (feat(fix-path): direct upgrades name the command that keeps how they are declared (E8, C2); security placeholders hold for any advisory (L4); H2 vectors #972's S4 rule).
  • fix is omitted from JSON when None, so serialized facts are unchanged for every other path.
  • brief_facts_build adds with_direct_fix to the chain after with_refresh_command. It passes the copy's installed version, so the admits check runs.
  • Every Bump { to } pattern becomes Bump { to, .. }: brief_facts, morning_audit, morning_floor_tests and evidence/stack_change.

A bug this would have caused, fixed here

security_signature hashes the fix path's Debug form for HIGH and CRITICAL facts. With fix included, every open act-now declared copy would have re-surfaced as "changed" once after upgrade, and again whenever a manifest's operator changed. That would be false news in the Brief.

A bump now renders as the pre-fix Bump { to: ".." }, so stored signatures still match. The test a_bumps_command_does_not_change_its_signature pins both the equality and the exact stored form.

File sizes

brief_facts.rs reached 1006 lines, over the 1000-line error.

  • fix_clause and proven_clause (the wording) moved to brief_facts_clause.rs and are re-exported, so callers are unchanged. brief_facts.rs is now 907 lines.
  • The direct-fix tests live in brief_facts_build_tests.rs. brief_facts_build.rs is 949 lines.

Checks

🤖 Generated with Claude Code

https://claude.ai/code/session_015KSXWNneouUjTiVV3Rc3FH

runyourempire and others added 3 commits October 18, 2026 04:05
…it is declared (audit E8, C3)

FixPath::Bump gains `fix`: the command or manifest edit from
osv::direct_upgrade, read from the project's own manifest -- the same rule
the Upgrade Plan's direct rows use. The Brief says "bump minimist to
>= 1.2.6: run `npm install "minimist@~1.2.6"`" instead of a bare "bump".
Nothing is named when it is not certain, including when the declaration
does not admit the installed copy. `fix` is omitted from JSON when None.

fix_clause moves to brief_facts_clause.rs (re-exported, callers unchanged)
and the direct-fix tests to brief_facts_build_tests.rs (file-size gate).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KSXWNneouUjTiVV3Rc3FH
…ture ignores it

security_signature hashed the fix path's Debug form, so adding `fix` would
have re-surfaced every open HIGH/CRITICAL declared copy as "changed" once
(and again whenever a manifest's operator changed). A bump renders as the
pre-`fix` `Bump { to }`, so stored signatures still match.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KSXWNneouUjTiVV3Rc3FH
…y; the Brief and the plan name the same one

- SF1: with_direct_fix gets the installed version only from a
  version-confirmed copy. Without one, the version, is_direct and the
  target are the alert's fallbacks (the raw highest OSV fix, which skips
  the withdrawn-release rule of #976), and the Upgrade Plan names no
  command there either.
- SF2: the verbatim-quote version check covers npm, Cargo and Go commands
  and the PyPI manifest edit.
- SF3: one seeded project, built by both builders: the Brief's direct row
  and the Upgrade Plan's direct row print the same command; with no
  confirmed copy the Brief names none.
- A changed target still changes the act-now signature; no installed
  version or an unread ecosystem names nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KSXWNneouUjTiVV3Rc3FH
@runyourempire
runyourempire force-pushed the fix/c3-brief-direct-commands branch from 4736d14 to 039acf6 Compare October 17, 2026 18:08
@runyourempire
runyourempire added this pull request to the merge queue Oct 17, 2026
Merged via the queue into main with commit 94ba6bf Oct 17, 2026
24 checks passed
@runyourempire
runyourempire deleted the fix/c3-brief-direct-commands branch October 17, 2026 18:22
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