100 Commits
Author SHA1 Message Date
poli0981andClaude Opus 5.5 2303aa2c7e fix(ci): no unused-crate inspection in Qodana for Rust
One run in five on #120 reported "Unused crate: sha2", the crate
env_hash is built on, on a commit that changed only a Markdown file.
Every run's sanity check finds the Cargo project only partly loaded in
the linter's container, and the inspection sometimes concludes from
that. A baseline entry would not hold, because its fingerprint hashes
neighbouring lines that Dependabot rewrites weekly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 807d9bf839 docs(roadmap): the second smoke, on the review's fixes
The installed build from a fresh release dry run, against a real
--symlinks venv: added as itself with its own identity, listed beside
its base with its own packages, removed for good; a deleted venv's
broken row removed for good; the installed CLI agreeing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 bb056c511d fix(core): a venv made with --symlinks is its own environment
Its python.exe links to the Python it was made from, and env_hash
followed the link, so the venv's pins, snapshots and cached graph,
report and audit were filed under its base. Nothing showed it while no
screen could list the two apart; Add interpreter now can. A venv's own
interpreter, recognised by its pyvenv.cfg, is resolved only up to its
folder. No other path's identity changes, and a linked venv's earlier
pins and snapshots stay with the base they were filed under.

Checked against a real --symlinks venv: `env use` stores the venv with
its own prefix, and the venv and its base keep two identities.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 2539950cd5 fix: what an independent review of 1.6.0 found
A venv made with --symlinks is run and stored as itself, not as the base
Python its python.exe links to: validate_interpreter returned the
canonical path, so `--env .venv update --all --yes` would have changed
the system Python. Canonicalizing now only decides where a link leads
and whether it is PipDock's own; a link to another program is refused,
and a Microsoft Store alias (os error 1920) is judged by its own path.

The GUI merges and removes an added row by its path rather than by
envHash, which follows links: a re-add replaces a broken row, removal
sticks for an entry whose file is gone (a share), and neither runs
during a scan. Added entries are validated again on every listing in
both heads (envs::probe_listed), and the CLI checks its stored default
when it uses it. `env remove` makes a typed path absolute first.

SECURITY section 2 and env_probe's doc claimed an enforcement point over
IPC; they now say what is checked, and backlog X36-b records the rest.
notify.yml reports a Triage failure on a pull request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 a85242db1a fix(ci): an ASCII name for the Vietnamese wording in triage.cjs
Qodana for JS (JSNonASCIINames, High): a variable named in Vietnamese
mixed ASCII and non-ASCII. The text it holds is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 567142901f docs(changelog): 1.6.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 e15d1637b0 fix(cli): env remove <dir> finds the deleted venv it exists for
A new integration test found it: removing an added venv by its
directory answered 'not on the list' once the venv was gone — the very
case remove is for — because interpreter_in resolves only an interpreter
that exists and fell back to the bare directory. The directory is now
also matched as the venv whose interpreter it would hold
(envs::venv_interpreter), existing or not.

tests/manual_envs.rs drives the binary with an app-data root of its own
and no Python: a non-interpreter is refused and nothing stored; an added
interpreter whose file is gone is listed with PD-ENV-001 and removed by
its directory; removing it again is not an error. The first failed
against the code before this fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 11a643777b docs: AI-DISCLOSURE for 1.6.0 — who decided, who did, and the eight checks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 957343c07b fix(core): a free-threaded python3.14t.exe is a Python too
Found by running env list against this machine: the python.org
installer puts python3.14t.exe (PEP 703) beside python.exe, the registry
lists it, and the new name rule refused it — so Add interpreter… could
not add an interpreter discovery itself reports. A version may now end
in t; pythonw3.14t, pythont and python3.14tt are still refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 b0b5d5e25c refactor(cli): one builder for an env list element
env add --json promises exactly what env list --json prints for the same
interpreter; it built its own copy of the object. Both use env_json now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 f21329b1f8 docs: CLAUDE.md for 1.6.0 — Browse… shipped, NOT_YET empty, maintenance mode
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 38e0226878 chore(release): 1.6.0
The five places the version lives, moved together: Cargo.toml, Cargo.lock,
package.json, package-lock.json and tauri.conf.json. `cargo metadata
--locked` agrees.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 39be719b22 docs: maintenance mode — what is taken, what is not planned, and why
README carries the status in both languages, CONTRIBUTING a 'Scope in
maintenance mode' section the triage bot links to, and ROADMAP a section
recording the decision: dependency, security, major-upgrade, defect and
wording work is taken; P1-7, X19, the engine caches and P2 are not
planned, each with its reason. The Audit backlog is the maintenance
backlog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 61e5e26c4e ci: close feature requests in maintenance mode, and say why
triage.yml labels a feature request enhancement and out-of-scope,
answers in English and Vietnamese with CONTRIBUTING linked, and closes
it as not planned — on unmistakable signals only: a title that says it
is one, a feat: pull request, or the enhancement label going on.
Maintainers, bots and policy-exception are never closed. The rules live
in .github/scripts/triage.cjs with node --test cases (run by npm
licences); pull_request_target checks out only the base branch's
scripts; workflow_dispatch is a dry run. notify.yml hears about it.

Templates: a Wording or translation form (i18n), a contact link saying
features are not taken, a maintenance note on the bug form, and the
kinds of change a pull request can be. eslint.config.js lints the
CommonJS helper as Node, outside the type-aware program.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 cfa5b4e1be docs: Add interpreter… in the specs, ACCESSIBILITY.md and the privacy policy
PRD P0-1, UI-SPEC §4, CLI-SPEC (env add/remove, their JSON, --env's new
refusal), CLI-GUIDE, ERROR-CATALOG (PD-ENV-001's new cases, and the
first button its advice ever had) and TESTING's golden count. SECURITY
§2 claimed for two milestones that interpreter paths were canonicalized
before use while the only check was existence; it now describes the
validator that makes it true. PRD also records P0-9's first-run uv
detection, P1-7 and P2 as not planned in maintenance mode.

legal/PRIVACY-POLICY.md 1.3 names the interpreter paths a person adds,
kept until removed, in both languages. With the repository URL it
already changed, the first-run gate shows once in 1.6.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 9f9efbba79 feat(cli): env add and env remove; env list shows added interpreters
The CLI half of Add interpreter…: env add validates, probes and stores
an interpreter or environment directory, env remove takes it off the
list (matched by identity, or by the stored path when the file is gone),
and env list appends the added ones after discovery. --env and env use
go through the same validator. Two new help goldens; help-env and
help-env-list re-blessed for the new lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 c9128e479e feat(ui): Add interpreter… and Remove from list on Environments
The header and the empty state offer Add interpreter…, which asks for a
python.exe and selects what it added; an added row, broken or not,
offers Remove from list. Busy is aria-disabled with a click guard, an
add and a scan refuse to overlap, the result is said in a status region
mounted before its words, and focus goes to the heading when the row
holding it leaves. Ctrl+K has the add too. PD-ENV-001's copy now covers
a file PipDock will not run, in both catalogues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 ab16742989 feat(core): interpreters a person adds — validated, stored, listed
PRD P0-1's manual browse, the last command NOT_YET owed (env_add_manual).

- envs::validate_interpreter, the enforcement point for every path a
  person supplies: an existing file named python[X[.Y]].exe, not one of
  PipDock's own tools or audit venvs (canonical, so .. cannot walk past),
  returned canonical and without the verbatim prefix. A missing file reads
  exactly as the probe's own message, so the CLI's goldens do not move.
- store v5: manual_envs, apart from the CLI's recents and default.
- scan_reporting appends the manual list last: discovery keeps its own
  source, and an added interpreter whose file is gone stays listed, so
  its PD-ENV-001 row can be removed.
- env_add_manual validates, probes, then stores; env_remove_manual takes
  an entry off the list and touches nothing else. env_probe validates a
  manual path too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:12 +07:00
poli0981andClaude Opus 5.5 ccae96dbeb chore: move to poli0981org — self-contained CI, Qodana, an npm licence gate, this week's dependencies (#119)
The repository now lives in the poli0981org organization, and this makes it at home there.

- main was red since 2026-11-18: RUSTSEC-2026-0543 (chrono), in Cargo.lock only through serde_with's weak features and compiled into nothing; ignored with its reason and exit condition.
- Supersedes #113–#118 (Rust 1.100.0, rusqlite 0.42.0, Tauri 2.12.6, code-health pins, actions, npm) plus jsdom 31.0.1; minimatch 11 closes GHSA-g3hv-75wg-m249. rfd 0.18 (#112) is held again until tauri-plugin-dialog moves.
- Dependabot's tauri groups never worked (it picks the most specific group); exclude-patterns on the catch-alls fix it.
- CI is self-contained: no workflow calls poli0981/.github; every action is pinned by commit; notify.yml vendors the Discord notifier.
- npm licences: scripts/check-licenses.mjs, deny.toml's allowlist for the npm half. Required, with cargo deny and tauri lockstep — eight required checks.
- Qodana in two parts (Rust, TS/JS), full scans, a triaged Rust baseline, fail on anything new. The Rust container needed its toolchain and CARGO_HOME pointed somewhere writable before it analysed anything.
- SonarQube Cloud analyses into poli0981org_pipdock; every npm ci runs with --ignore-scripts (S6505).
- Every repository URL points at the organization. README's attestation command for 1.4.0/1.5.0 had stopped working; it now says --owner poli0981 --signer-repo poli0981/pipdock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 21:50:41 +07:00
poli0981andClaude Fable 5.2 90fdfb3a2a test(a11y): hold the click guards that replaced disabled
A `disabled` button cannot be clicked; an `aria-disabled` one can. So every
button that became aria-disabled while busy depends on a guard in its handler,
and a guard that is missing starts a second scan, run or audit over the first.
SonarQube's gate saw those branches uncovered (78.7% on new code).

busy.test.tsx drives each one both ways: Use and Rescan, Code Health's Run,
Security's Run audit, the plan panel's Stop, and the two requirements buttons,
where the second press must not open a second picker. It also holds the other
half of the rule: a control with nothing to act on is still `disabled`.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 7ee00893a7 fix(a11y): four defects from an independent review of the diff
- Visually-hidden text is position: absolute, and with no positioned ancestor
  it is laid out against the viewport, outside every scroller above it. A pin
  chip's hidden sentence did that on Pins: a long list made the whole window
  scroll and took the header with it. Every parent of hidden text is relative.
- A run that failed before producing a summary rendered no <h1>, so the focus
  rule had nothing to land on. The branch has a heading.
- The console drawer stays open across runs, so the next run mounts it with no
  opener to return focus to. It falls back to the Console button.
- Under forced-colors the selection outline followed the focus ring at equal
  specificity and replaced it on a focused current tab.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 f9c5001dc4 docs: say "display scale" where the statement and the issue form said zoom
There is no zoom in 1.5.0, so asking a reporter for their zoom level asks for
something the application does not have.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 2df161cb36 docs: 1.5.0 — the changelog, the slice's record, and what running found
changelog/1.x.md gains 1.5.0, written by reader: keyboard, screen reader,
contrast theme, everyone. It says that Narrator was not run again on this
release and that zoom was built and held back.

ROADMAP records the slice: the decisions and why, and the defects that were in
code with green tests and were found by driving the installed build over
WebView2's debugging port — the high-contrast border that had never been
drawn, the buttons that dropped focus when they went busy, the legal gate, two
accessible names. U45, U47 and U48 close; A1-A7 open, each with what it is
waiting for, and A7 is the testing only a person can do.

ACCESSIBILITY.md, UI-SPEC and TESTING are corrected to what the build actually
does: no zoom, a double border, busy as aria-disabled. CLAUDE.md carries the
rules the slice left behind and the recipe that found the defects.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 95e45d7acc chore(release): 1.5.0
The five places the version lives, moved together: Cargo.toml, Cargo.lock,
package.json, package-lock.json and tauri.conf.json. `cargo metadata --locked`
agrees.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 5aa4da87f4 fix(a11y): five defects found by driving the installed build
Every one of these was in code whose tests were green. They were found by
installing the bundle, opening WebView2's debugging port, and pressing real
keys while reading document.activeElement and the accessibility tree.

- The high-contrast border on destructive buttons had never been drawn. The
  rule sat in @layer base; every button carries Tailwind's border utility, a
  later layer wins whatever the selectors say, and border: 2px lost to
  border-width: 1px. It is outside every layer, and a double border, because
  2px beside 1px is not a difference anyone sees.
- Accepting the legal gate left focus on nothing: the gate is rendered instead
  of the shell, so the screen was replaced with the tab unchanged.
- A button that disabled itself when pressed dropped focus to <body>, because
  a browser takes focus from a control that becomes disabled and jsdom does
  not. Use, Rescan, Run, Run audit, Add, Download the index, Stop and the two
  requirements buttons are aria-disabled while busy and ignore a second press.
- A dialog's name read "Remove packages : certifi": a browser puts a space
  before visually-hidden text. The second half of the name is an aria-label.
- The Updates tab's name read "Updates(5)".

Zoom hotkeys were tried and are not in this commit: at 200% in the default
window the package-name column collapsed to zero width.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 4732f05197 docs: sync the specs with the accessibility pass
UI-SPEC §7 no longer describes a forced-colors list that is "not complete": the
mark is data-destructive. §8 gains the five rules the pass left behind — focus
on every screen replacement, names that contain the visible text, composite
widgets as one tab stop, chip meanings as text, status regions that exist
before their first message.

TESTING says which of the three new tests holds what, and that none of them
knows what a screen reader says; the manual charter gains a ten-minute
accessibility pass. CLI-SPEC writes down that the CLI has no colour and nothing
that animates, which was true of the code and stated nowhere.

RELEASE-CI: the conversation-resolution rule the protection table never listed,
the labels box that had been true for weeks, and .nvmrc, which still said 24 a
month after every workflow moved to 26.

README links the new files and gains Accessibility and Contributing sections.
AI-DISCLOSURE and About name the model that produced 1.5.0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 3e2c5e1a07 docs: accessibility statement, contributing guide, code of conduct and templates
GitHub's community profile listed five things missing, and the ops repository
supplies no defaults despite its description, so they are added here.

ACCESSIBILITY.md is at the root, where GitHub looks and where the README can
link it. It follows the Accessibility Toolkit's structure, rewritten for a
Windows desktop application and a CLI: the target (WCAG 2.2 AA, as a target and
not a conformance claim), what is supported, a table of what was tested and by
whom, what was not tested, the known limitations, and how to report a barrier
without a GitHub account. It commits to an answer within seven days and to no
fix date, because one person cannot honestly promise one.

CONTRIBUTING.md states the rules a contributor actually meets: the checks CI
runs, generated bindings, goldens, both locales, and the invariants that are
not negotiable. CODE_OF_CONDUCT.md is Contributor Covenant 2.1, unmodified
apart from the contact address. The pull request template carries an
accessibility checklist, and accessibility.yml is an issue form that asks for
impact rather than for a diagnosis. bug_report.yml keeps its name: the in-app
Report bug link is built from it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 d016b80014 fix(a11y): name dialogs by their heading, and four smaller things
A PdDialog's name was an aria-label holding what it was about, so a screen
reader announced "numpy, dialog" and then "Cancel": the question being asked
was on screen and never spoken. It is named by its visible heading, followed by
what it is about, and described by its body.

The legal gate replaces the whole shell, declares itself modal, and had no
focus inside it. Its heading takes focus on arrival, as a screen's does.

A package row's focus ring was drawn 2px outside a row that is absolutely
positioned in a scroller and stacked against its neighbours, so three sides of
it were clipped or painted over. It sits inside the row, in every mode rather
than only in forced-colors.

The dock bay's remove button was a bare glyph about 8px wide. It is 24px each
way.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 885bca416c feat(about): the accessibility statement and where to report a barrier
Someone who cannot use part of the app is the person least able to go looking
for a repository file about it. About gains an Accessibility section: a button
that opens ACCESSIBILITY.md, and accessibility@poli0981.dev beside the two
addresses already there, copyable the same way. No capability is widened:
https://github.com/* was already in scope.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 a5fc204de8 fix(a11y): mark destructive controls by attribute for high contrast (U45)
Forced-colors drops every tint, so a danger-treated primary is drawn exactly
like the Cancel beside it. The stylesheet gave five data-action values a border
and had missed Remove, Allow, Clear, the Force-latest confirm and a forced
plan's Confirm for as long as the list existed.

The mark is one attribute, data-destructive, and destructive.test.ts reads the
source to hold both halves: every button drawn in the danger colour carries it,
and the stylesheet draws it.

The active sidebar tab carries aria-current="page" and the outline rule matched
'true', so high contrast drew it like every other tab.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 f1bab20306 fix(a11y): say what Search is doing, and expose the tab shortcuts
Search told a screen reader nothing between a keystroke and its answer: the
index loading, a search running, how many results came back and "nothing
matches" were plain spans or not text at all. One status region carries them,
mounted from the first render so there is an earlier state for a message to
differ from. The result whose details are showing was a background colour; it
carries aria-current.

The sidebar's ^1..^9 hints were aria-hidden and at half opacity: about 2.6:1,
and the shortcut existed nowhere else. They are drawn in a token, and each tab
carries aria-keyshortcuts.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 6b70580b91 fix(a11y): finish the tab, radio group and listbox patterns (U47, U48)
Health's tabs were three buttons with role="tab": three tab stops, no arrow
keys, no panel. They are one stop with Left/Right/Home/End, tied to a tabpanel.
Their accessible name was an aria-label reading "Dependencies, 3 findings" over
a tab that says "deptry 3", which fails WCAG 2.5.3; the name is the visible
text now, followed by what the tab is about.

A conflict's three choices were role="radio" with none of a radio group's
keyboard. They are one stop, and the arrows move between them. The arrows move
focus and choose nothing: checking what focus lands on would open Force
latest's destructive confirm from an arrow key.

The palette's highlight is an aria-activedescendant, not focus, so nothing
scrolled the list and the selection left the visible window. It is scrolled
into view.

The vulture whitelist link was told from the sentence around it by a colour
1.4:1 away and underlined only on hover. It is underlined at rest.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 567b0ae8fa fix(a11y): move focus when the screen is replaced, not only when the tab changes
The shell moved focus to the new screen's heading on a tab change and on
nothing else. Four things replace what <main> shows without changing the tab:
the plan panel and each of its phases, the dependency view, and an opened
environment. Each unmounts the control that was just pressed, so focus fell to
<body>, the next Tab started from the top of the window, and a screen reader
said nothing about a screen that had entirely changed.

A second effect covers them, and only acts when focus was actually lost: a run
advancing from resolving to preview must not pull a keyboard user off Back.

The console drawer had the same hole. Escape closed it and dropped focus; it
goes back to whatever opened the drawer. Its close button was named "Cancel",
beside a Stop that cancels the run, and is "Close console".

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
poli0981andClaude Fable 5.2 9754b95e66 test(a11y): run axe-core over every screen, and fix the grid it failed
No accessibility tooling stood behind any of this: roles were asserted one at a
time, wherever a test happened to reach for getByRole. axe-core now runs over
every screen inside the shell and over the components with structure of their
own. It is called directly: eslint-plugin-jsx-a11y peers ESLint 9 at most and
this repository is on 10, and the matcher packages are wrappers pinned to a
runner's major. color-contrast stays off under jsdom and stays tokens.test.ts's
job.

Its first run failed on the package grid, which is fixed here:

- the row checkbox was a direct child of role="row"; it is in a gridcell
- the header had five column headers over six cells; the checkbox and action
  columns are named, visually hidden
- the grid says rows are multi-selectable, which aria-selected needs

And one axe cannot see: a pin chip's meaning lived in a title attribute on a
span that cannot take focus. It is text now, visually hidden.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:01:03 +07:00
2329d55298 build(deps): cooled-down npm, actions and tools bumps (supersedes #103, #104, #105) (#106)
* build(deps): Bump taiki-e/install-action

Bumps the actions group with 1 update: [taiki-e/install-action](https://github.com/taiki-e/install-action).


Updates `taiki-e/install-action` from 2.88.0 to 2.89.1
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/86f7a0ffb25f40114606501a311ebcfaf882ea32...682ce6c3c696a4cd5168a05f98e51aa02b877941)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.89.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): Bump the npm-minor-patch group with 6 updates

Bumps the npm-minor-patch group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [i18next](https://github.com/i18next/i18next) | `26.7.1` | `26.7.2` |
| [react-i18next](https://github.com/i18next/react-i18next) | `17.1.12` | `17.1.13` |
| [zustand](https://github.com/pmndrs/zustand) | `5.0.16` | `5.1.0` |
| [@tailwindcss/vite](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-vite) | `4.3.4` | `4.3.5` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) | `4.3.4` | `4.3.5` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `8.3.5` | `8.3.6` |


Updates `i18next` from 26.7.1 to 26.7.2
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v26.7.1...v26.7.2)

Updates `react-i18next` from 17.1.12 to 17.1.13
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v17.1.12...v17.1.13)

Updates `zustand` from 5.0.16 to 5.1.0
- [Release notes](https://github.com/pmndrs/zustand/releases)
- [Commits](https://github.com/pmndrs/zustand/compare/v5.0.16...v5.1.0)

Updates `@tailwindcss/vite` from 4.3.4 to 4.3.5
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.3.5/packages/@tailwindcss-vite)

Updates `tailwindcss` from 4.3.4 to 4.3.5
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.3.5/packages/tailwindcss)

Updates `vite` from 8.3.5 to 8.3.6
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v8.3.6/packages/vite)

---
updated-dependencies:
- dependency-name: i18next
  dependency-version: 26.7.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: react-i18next
  dependency-version: 17.1.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: zustand
  dependency-version: 5.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@tailwindcss/vite"
  dependency-version: 4.3.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: tailwindcss
  dependency-version: 4.3.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: vite
  dependency-version: 8.3.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): sonarqube-scan-action 8.4.1; regenerate tools constraints

sonarqube-scan-action 8.4.1 was six days old at Monday's Dependabot run and is
past the seven-day cooldown today.

tools-constraints.txt is regenerated with the command in its header, bounded to
the releases that are past the cooldown (filelock 4.2.7, platformdirs 4.14.3).
The result is byte-identical to the hand edit in #104, which is the check that
edit was missing.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 18:54:22 +07:00
poli0981andClaude Opus 5.5 093ea4fce4 build(deps): dependencies to latest; classify pip 26.3's backend-unavailable (#102)
- cargo update (~60 bumps, 627 -> 616 crates) clears the yanked async-executor 1.14.0 that
  had turned cargo audit red on main and on every Dependabot PR since 2026-11-03 (Linux-only,
  never in the shipped binary). rusqlite 0.41.1 (SQLite 3.54.1), no code change. rfd 0.17 with
  tauri-plugin-dialog 2.8.4, which met the rfd ignore's own condition, so the ignore goes.
- npm: thirteen packages to latest; TypeScript still held at 6.0.3 (typescript-eslint peers <6.1).
- Tools: ruff 0.17.3, certifi, msgpack, platformdirs; constraints regenerated.
- Actions: taiki-e/install-action v2.87.32, sonarqube-scan-action v8.4.0; Node 24 -> 26 LTS.
  "Latest" means the newest release past each ecosystem's Dependabot cooldown.
- pip 26.3 renders an unloadable build backend as `error: backend-unavailable`, which fell
  through to PD-BLD-003; a classifier rule restores PD-BLD-002. Found by the drift job; live
  corpus re-captured with pip 26.3 / uv 0.13.7, the 26.2.1 capture frozen as pip-26.2/, and a
  test holds both renderings to one code.
- Docs: ARCHITECTURE §10 re-verified, ERROR-CATALOG, TESTING, ROADMAP, CLAUDE.md.

Supersedes #97, #98, #99, #100, #101.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 10:21:48 +07:00
poli0981andClaude Opus 5.5 0112b000ec docs(sonar): a version bump moves the new-code baseline one analysis late (#93)
The analysis that first sent 1.4.0 still measured from 2026-09-27; the
next measured from the last analysis of the version before (2026-10-20).
The docs said the version did not move it at all. They now say when it
does, what that means for the merge carrying a release bump, and what
main's gate read after #91.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 07:47:58 +07:00
poli0981andClaude Opus 5.5 2f6ad04967 fix: the 16 Rust findings and the coverage gap from the first CI analysis of main (#91)
The first CI analysis of main failed its gate: 16 Rust bugs and new-code
coverage 78.3 % against 80 %, over all of 1.4.0 (sending a version did not
move the previous-version baseline).

- rust:S6677 x3: a failure's message is logged as `error`, not as a second
  `message` field (CLI, update flow, app startup); golden.rs reads the
  CLI's log to hold it, and failed first.
- rust:S7493 x13: std::fs inside async fns goes through tokio::fs (tools
  venv sync, deptry's report, export/requirements/report commands).
- Tests for 1.4.0 code nothing drove: rollback end to end, forcing a
  latest this Python cannot run, PEP 691 parsing (L55), user_file_error
  (U25), a plan verified in another environment, PyPiReleases' cache, and
  the plan/env stores' success and late-error paths. InstallSet::only had
  no caller and is removed.
- ROADMAP, TESTING and CLAUDE.md record what the analysis found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 07:21:45 +07:00
poli0981andClaude Opus 5.5 4a617722d6 ci(sonar): CI-based SonarQube Cloud analysis, with Rust and TypeScript coverage (#85)
Automatic analysis could not build, so it never analysed the Rust two
thirds of the code and imported no coverage; it also sent no project
version, leaving the previous-version new-code period anchored to the
first analysis. sonar.yml runs on Windows, produces cargo-llvm-cov and
vitest LCOV plus clippy's JSON, and scans with sonarqube-scan-action
v8.3.0 (pinned), passing the version from package.json. The token
reaches the scan step alone; the job is skipped without one (Dependabot,
forks) and refuses a dispatch off main, which this plan cannot analyse.

Unblocks the required audits, red on main since 2026-10-21:
rustls-webpki 0.103.16, webpki-root-certs 1.0.11, clipboard-win 5.4.3,
zod 4.6.7. Dependabot groups vitest with @vitest/*.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 06:38:10 +07:00
poli0981andClaude Opus 5.5 57ed5756c4 ci: unblock cargo audit on zbus 5, redact pip 26's finished progress bar, hold rfd at 0.16 (#84)
Three things have kept CI red since 2026-10-18; none touches the shipped program.

- **cargo audit** (required on every PR, and the daily Security scan) fails on
  RUSTSEC-2026-0370/0371/0372: zvariant, zbus_names and zvariant_derive were folded into
  zbus 6 on 2026-10-16 and marked unmaintained the same day. zbus reaches the tree only
  through tauri-plugin-opener and tauri-plugin-single-instance, for D-Bus on Linux;
  `cargo tree -i zbus --target x86_64-pc-windows-msvc` prints nothing. Every release of both
  plugins, the 3.0 alphas included, still requires zbus ^5.9, so there is no update to take.
  Ignored individually in .cargo/audit.toml with that reason and a removal condition.
  `cargo audit --deny warnings` is clean locally.

- **The Monday fixture-drift job** failed on pip/build-backend-failure/stdout.txt: pip 26
  ends a finished bar with the bare elapsed time, not `eta 0:00:00`, so `_is_progress` let
  the transfer rate through (15.1 MB/s committed, 75.1 MB/s on the next runner). The rule now
  keys on a trailing time token. Old vs new over every committed fixture line: exactly this
  one line changes verdict. The fixture is restored to `<PROGRESS>` in binary mode, 7 CRLF
  before and after; its blob is again b349d1f, the pre-pip-26 bytes.

- **rfd**: Dependabot's 0.17.2 bump (#83) adds a second rfd to the binary, because
  tauri-plugin-dialog 2.8.3 requires ^0.16 and src-tauri depends on rfd only because the
  plugin already compiles it. dependabot.yml now ignores rfd >= 0.17 until the plugin moves.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 06:37:19 +00:00
poli0981andClaude Opus 5.5 283605a4a0 chore(sonar): NOSONAR on the line SonarCloud flags (#80)
SonarCloud honours a NOSONAR only on the flagged line. 1.4.0 put this one on
the line above the `cargo` call, so S4036 stayed open on `main` and kept the
project's security rating at B while the PR gate reported "0 new issues" — the
issue was old, not new. The call now fits on one line, with the marker on it.
The two in `spikes/` were already on their flagged lines and are cleared.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 01:16:31 +07:00
poli0981andClaude Opus 5.5 87dcb3452f fix(spikes): scrub progress bars line by line, not with a backtracking regex
SonarCloud's PR analysis flagged the progress-bar regex in capture.py's redaction again (S8786,
super-linear backtracking) — the second regex form of this rule it has flagged. A per-line test
cannot backtrack at all. It replaces exactly the lines the regex did on the LF text
`subprocess.run(text=True)` produces, checked against seventeen sample lines including the edge
cases (no space after the dashes, trailing whitespace, several "eta"s, a final line without a
newline); no committed fixture changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 6cd7e99385 chore(release): 1.4.0
The version in all five places it lives — Cargo.toml, Cargo.lock, package.json,
package-lock.json and tauri.conf.json — checked with `cargo metadata --locked` and with the
release workflow's own tag check run locally against v1.4.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 7124227262 docs: the specs say what the code does; 1.4.0 recorded, with its audit backlog
Every spec checked against the code rather than against itself, in four passes that each read the
branch's commits and then the source:
- CLI-SPEC/CLI-GUIDE: one JSON document per command (with the per-command table and the paths
  that print nothing), environment selection, logging, Ctrl-C and exit 130, the prompts as they
  are rather than the [A]bort and countdown that never existed, `.heldBack`, a `pipdock audit`
  section, and the rules every mutating command now follows.
- ARCHITECTURE/DATA-FLOW/ERROR-CATALOG: the Engine trait's real signatures, Requires-Python's
  three checkpoints, store v4 and the log folder, §7's return types and events, the state machine
  with re-probing and Force latest, where each §9 invariant is enforced, and 35 codes in 32 rows.
- SECURITY/TESTING/RELEASE-CI/CODE-HEALTH-SPEC: the PEP 668 override as built, four browser hosts
  and the exact capability set, attested releases, the new CI, the tools constraints, and test
  tiers that describe what runs rather than what was planned.
- UI-SPEC/PRD/README/I18N: the screens as they render, the keyboard, tokens and their contrast
  sweep, the feature matrix's status, attestation instructions, and I18N's one stated exception.

ROADMAP gets the 1.4.0 record — what was wrong, what running found that reading did not, what was
deliberately not done — and the **Audit backlog**: every finding not fixed, with where it is and
why it waited. CLAUDE.md's counts and contradictions are corrected, with the rules this release
left behind. changelog/1.x.md has the 1.4.0 entry, including "Changed for scripts" and "You will
see this once". AI-DISCLOSURE, README and About say which model and who released what. The legal
documents' effective date moves to the release date.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 42f227c1aa fix: what installing the build found, and what the doc pass turned up
The release build was installed and driven before tagging. Two defects showed up that no suite
could see:
- Every dialog opened in the window's top-left corner. Tailwind's preflight sets `margin: 0` on
  everything, which removes the `margin: auto` a modal <dialog> is centred by; PdDialog (and so the
  uninstall guard, since it was written) and the Ctrl+K palette were both affected. `m-auto` /
  `mx-auto`, measured in the dev server: (0,0) before, centred after.
- On a profile that had never downloaded the index, Search said "preparing the package index"
  for ever and never offered the download. Moving the load into the background let a failed load
  restart on the next search, which reset the slot to Warming before the failure could be read,
  and the screen asked again every 150 ms. A failed load now stays failed until a refresh; a test
  in state.rs failed first against the old rule.

From the documentation pass, each checked against the code:
- The GUI's snapshot diff used the plain diff while the CLI's and the rollback used the
  engine-aware one, so the two heads disagreed about pip and setuptools across engines (G5).
- `--json`'s help still promised NDJSON; `--yes`, `--quiet`, `--verbose`, `--log-file`, the
  install spec and `engine` described behaviour they did not have. Corrected, and the 32 help
  goldens re-blessed for exactly those lines. `pipdock engine` now marks the configured engine,
  as its help always said; `health --fix` printed a dirty-tree warning to stdout before its JSON;
  the text preview now lists withdrawn releases, as the GUI's does.
- Copy that promised what the code does not do: a pinned package "can still be updated on its
  own" (an Exclude pin filters a named package too), a held pin left only "out of bulk updates",
  and an empty Environments screen pointing at a Browse… button that does not exist.
- Stale comments in exec, the pip and uv parsers, index refresh, health, the pin screen, the
  status line, the settings store and i18n.ts (whose missing-key warning never fires). The
  ExecutionSummary.cancelled description is part of the public schema, so that golden and the
  TypeScript bindings move with it.
- Metadata lookups reuse the shared HTTP client (M37 had been half done); insta was a dev
  dependency of core that nothing in core used; the integration workflow's checkouts no longer
  persist credentials; the capability file cites SECURITY §4, where the rule lives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 310436552c fix: a bug-report link GitHub will open; uninstall output that finishes printing
- report.rs: the excerpt was capped at 6000 characters *before* percent-encoding, which is what
  decides the length GitHub sees - an accented letter costs up to nine bytes, a path separator
  three - so a log full of Vietnamese paths built a ~20 KB link and GitHub answered with an error
  page instead of the form (M51). Lines are now dropped from the front until the encoded excerpt
  fits; a single enormous line is trimmed rather than dropped. Two tests, both failing first.
- run.rs: `pipdock uninstall` dropped its output pump's handle instead of awaiting it, so the
  summary could print over the last engine lines - the ones that say how the removal ended (X38).
  The other three pumps already waited.
- bug_report.yml: the version placeholder read "1.0.0", which every release since made wrong; it
  now says where to find the version instead (X48).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 25f0269631 fix(build): the legal hash ignores line endings; the privacy policy says what is stored
build.rs hashed each document's raw length two lines above the normalisation that existed so a
CRLF checkout would hash like an LF one (X25). It did not: a build from a Windows checkout with
autocrlf - the runner's default - carried a different hash from an LF build of the same commit.
The algorithm moves to src/legal_hash.rs, which build.rs includes by #[path] and the library
compiles under cfg(test), so the tests exercise the function that runs at build time: a CRLF pair
hashes like its LF pair (this failed against the old code), a changed document or text moved
between documents changes the hash, and the hand-rolled SHA-256 agrees with sha2 across block
boundaries.

legal/, as users read it (X26):
- PRIVACY §2 names what is now stored: the log files exist (they record the commands PipDock ran,
  so they hold package names and paths), PipDock's own tools/ and audit/ environments, and the
  per-release Python ranges. §3 says what the one destination, PyPI, is asked for - including
  pip-audit's advisory data, which comes from PyPI's own service - and adds osv.dev to the pages
  handed to the browser. The Vietnamese summary follows.
- THIRD-PARTY §A gains rfd (the startup-failure dialog), §C osv.dev: four browser destinations,
  not three.

Both documents are hashed into the consent record, so the legal gate is shown once more after
updating - the mechanism working, as CLAUDE.md says.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 12bf723daa ci: failures reach someone, audits run on what is merged, releases are attested
- notify-ci-failure.yml lists its workflows by name. `workflows: ['*']` is not a wildcard to
  workflow_run: it matched nothing, so `main` was red from 2026-09-23 with no one told.
- cargo audit runs a prebuilt cargo-audit (taiki-e/install-action, pinned by commit) with
  `--deny warnings`, replacing rustsec/audit-check@v2 - Node 20, a check-run write token, and on a
  pull request a failure only for "critical", which is how September's advisories passed every PR.
  .cargo/audit.toml's contract (a new informational advisory fails CI) is now what runs.
- security-scan.yml: both audits daily against `main`, so an advisory against something already
  merged is reported the day it is published, not at the next PR.
- cargo deny (licences, sources, bans) with deny.toml: the licence allowlist makes "every bundled
  licence is GPL-3.0-compatible" a test. The workspace declares `publish = false`, which it never
  had - and without which cargo-deny judged the app crates as published ones.
- CodeQL analyses rust and actions as well as javascript-typescript. The comment saying CodeQL had
  no Rust support stopped being true in 2025.
- ci-node.yml: Pages and id-token write move from the workflow to the one job that needs them
  (Sonar S8233); the audit installs with --ignore-scripts (S6505); a new `tauri lockstep` job
  fails when a Tauri crate and its npm package drift apart on Cargo.lock and package-lock.json.
- release.yml: build (read-only token, no persisted credentials) and publish (attest + draft) are
  separate jobs; the tag must match all five version fields; SHA256SUMS.txt is LF, which
  `sha256sum -c` elsewhere needs; actions/attest-build-provenance attests the .exe and .msi;
  softprops/action-gh-release is pinned by commit; `workflow_dispatch` with `dry_run` builds any
  ref without attesting or drafting.
- ci-integration.yml also runs for the CLI, exec, audit, release metadata, errors, store, index,
  Cargo.lock and rust-toolchain.toml - every one of which its end-to-end steps run through.
- dependabot.yml: cooldowns, a group per ecosystem for Tauri packages and for actions and pip,
  TypeScript held below 6.1 (typescript-eslint's peer range), and the rust-toolchain ecosystem.
  A multi-ecosystem group would put both Tauri halves in one PR, but what it does to dependencies
  outside its patterns is undocumented; the lockstep job covers the gap instead.
- Sonar: NOSONAR with reasons on the dev scripts' argv and PATH lookups; bundle-cli.mjs no longer
  claims to run from beforeBuildCommand. The dev CSP moves out of index.html into a Vite plugin
  that reads devCsp from tauri.conf.json, so a release build carries one policy, the strict one
  (S7039); checked in the dev server, where React Refresh's preamble still runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 7c6a506652 chore: remove what nothing uses, and finish what was half-wired
Dead code, each checked for callers first:
- graph::ReverseDeps::leaves (only its own test called it), health::run::sink_for (no caller,
  and a doc describing something else), SnapshotProof::id and is_waived (no caller).
- Two whitespace collapsers become one, errors::catalog::collapse_whitespace; the classifier's
  normalize is that plus lowercase. Three hand-folded SHA-256 hex digests become
  model::sha256_hex (build.rs keeps its own: a build script cannot use the crate it builds).
- Six copies of asPdError become one, beside isPdError in ipc/errors.ts.
- Thirteen strings no screen renders, from both catalogs (status.resolving/executing/ready,
  actions.confirm/browse/retry/openLogs, env.requiresPython/unusable,
  packages.updateSelectedSoon, health.notInstalled, settings.localeSystem/saved).
- fixtures.rs is compiled only for tests and for xtask (feature `fixtures`), not into release.

Half-wired, finished rather than deleted: engine_info had a typed wrapper and no caller, while
ARCHITECTURE §7 promised a version beside each engine radio. Settings now shows it for the
selected environment, and says "not found" for an engine that is not installed.

Docs that described another project: core's "Phase 0" status, model.rs's specta, pip.rs's "lands
in M1", snapshot.rs's "execute takes a Snapshot" (it takes a SnapshotProof), declared_source's
doc stranded on validate_project, the pin validators' "character-class check" (they share
pep440::is_version now), three health wrappers in ipc/index.ts each under another's doc, and
three %LOCALAPPDATA% paths missing the data\ folder.

Repo: production builds carry no source maps - Tauri embeds dist/ in the executable, so
`sourcemap: true` shipped 2 MB of them to every user (X51). .gitignore covers insta's pending
snapshots and a downloaded SHA256SUMS.txt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 4da4c0f3ec fix(ui): the shell - window, grants, CSP, language, keys, table, contrast
The window (U21). It may now be maximized and snapped; the 1600x1100 cap is gone, and the content
column stops at max-w-content (87.5rem) instead, centred in what is left. The window is created
hidden and src-tauri/src/window.rs fits it to the monitor's work area before showing it: 1180x760
is taller than the work area of a 1920x1080 panel at 150% and of a 1366x768 laptop, so the status
line and the plan panel's Confirm opened under the taskbar. Never below 900x560; pinned to the
corner rather than centred off-screen when even that does not fit. UI-SPEC §5 says so.

The webview's grants (U1, U32). core:default granted some sixty core commands nothing called and
not core:window:allow-close, so Decline on the legal gate did nothing in the installed app while
its component test - which mocks close() - passed. default.json now holds exactly the five the
frontend calls, and a test in lib.rs pins the union of every capability file, plus the opener's
four hosts.

CSP (U56): object-src, base-uri and form-action 'none'. A release build's style-src drops
'unsafe-inline' - React sets styles through CSSOM, which CSP does not govern. index.html keeps it
for `npm run dev`, where Vite injects <style> elements; both policies are enforced, so the
stricter decides. To be confirmed on the installed build.

Language (U3): the choice is stored and applied at start. save() sent locale: null every time, so
choosing Vietnamese lasted until the window closed. Settings now load before the legal gate, so the
gate is in the chosen language too, and <html lang> follows the UI.

Keys: a screen's data-autofocus wins over the heading (U12) - Search's field lost focus to the
shell's effect, which runs after its children's - and `/` works from Search itself. Ctrl+1..9 by
e.code (U49): on AZERTY Ctrl+3 reports `"`. A release build swallows F5, Ctrl+R, Ctrl+P, Ctrl+F,
F3 and Alt+arrows (U20), which reloaded, printed and found in a single-page app.

Also: Security scrolls (U2); the legal gate shows a consent that cannot be recorded (U29); Report
bug asks for the link again with the environment, so the issue carries the Python and engine
versions, at one subprocess per click rather than per row (U31); the package table's header and
rows share one set of widths and one gutter, and narrow tables drop Size so names stay visible at
900px (U22, U23); the grid is focusable (Sonar S6852); --color-danger is #F26A63 and danger badges
use a 15% tint, with tokens.test.ts now compositing every badge tint over every surface (U46 -
3.92:1 before); test seeds typecheck instead of `as never`, the IPC mock uses the real isPdError
and has the audit cache entry (U10).

U14 and U26 were already fixed by earlier commits in this release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 8e4b87e4ab feat(ui): the PEP 668 override asks first and is shown; the preview says what the report says
SECURITY §3 asks for two things the override never had: a confirmation before it turns on, and a
persistent chip on every mutating screen while it applies. Turning it on now opens PdDialog with
Cancel focused; turning it off saves at once. PdOverrideChip shows on Installed/Updates, Search's
dock bay, the plan panel and an environment's detail - only where the override applies: the
setting is on and the environment carries the EXTERNALLY-MANAGED marker. A venv never does, and a
chip there would claim the flag is being sent.

The preview renders the three fields ResolutionReport gained in this release, which nothing showed:
- forced: "Will break (n)" in danger, each dependent named with the constraint the forced version
  violates; the Confirm button carries the count and the danger treatment (DISCLAIMER §2).
- incompatible: left out for Requires-Python, with the range against this interpreter (invariant
  10). A plan whose only content is one is no longer "nothing to change".
- yanked: PD-PKG-003 as a warning row beside the change it belongs to.

The summary says when the post-run check could not run (CheckReport.error) instead of showing
nothing, which read as a pass (M30). The same defect survived on the empty-plan path of
plan::execute, which kept its own unwrap_or(ok: true); it now goes through post_check like every
other path, with a test that failed first.

Also: settings load at app start once the documents are accepted, so the status line's engine and
the chip are right before anyone opens Settings (U13); the plan panel names the interpreter it
changes (part of U15); pins.suggestIntro no longer claims a pinned package can still be updated one
at a time - an Exclude pin filters a named package too (DATA-FLOW §9.5).

flow_step_forced.json is computed by derive_forced and release::mismatch over the scenario rows
rather than written, for the reason fixtures.rs gives for its other computed fixtures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 73e65303ca fix(ui): an answer for what the user has left is dropped
Every store awaited a command and then wrote what came back, without asking whether the question
was still the one being asked. A slow answer for the environment the user had just left landed on
the one they switched to:
- the package list and the outdated badges (U5), pin suggestions (U43) and the snapshot timeline
  check the environment after each await;
- a pin write re-joins the rows from the store as it is after the write, not as it was before
  two awaits (U6);
- two clicks down the timeline show the second entry's diff whichever answers first (U42);
- the dependency view loads the environment switched to while the previous one was loading,
  rather than bailing on "already loading" and showing nothing (U34).

The plan store counts generations. Leaving a plan the backend is still working on - Back during
a resolve or a guard, or out of a parked preview - now stops it there with plan_cancel, and its
late answer no longer re-opens the panel the user closed (U9). A failed decision round keeps the
preview (U24, the UI half). The progress subscription stays open 50 ms past the command's reply,
which arrives separately from its last events and in no promised order. The uninstall guard's
probe has its own phase, so the table is not swapped for the plan panel for half a second and its
scroll position kept (U14).

- Back from a preview is not a finished run: the selection is kept and nothing is refetched (U11).
- Search asks again while the index warms instead of waiting for another keystroke (U7); the
  backend now always answers the first search at once.
- Install from the dock bay keeps the queue until the resolve answers (U30).

ui/src/stores/races.test.ts holds a command open, moves on, then lets it answer: six of its seven tests
fail on the previous stores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 a9f476a2ae fix(app): a claimed slot releases itself; IO errors say what happened; quieter locks
- The session slot is claimed through a guard that releases it on drop unless it was parked
  (U4). Release was a call every exit path had to remember, and plan_resolve, uninstall_guard and
  the rollback preview each had a `?` between claim and release: one failed settings read left the
  slot Busy and every later plan answered PD-RES-003 until a restart. The slot is a std mutex now,
  held only to swap a value, so the drop can take it; a test returns early through a claim and
  finds the slot free and the token gone.
- A guard refusal in uninstall_execute keeps the flow parked: the dialog is still on screen and
  Force remove is still a choice, and its buttons used to answer "no plan".
- A file the user chose - an export, a saved report, a requirements file - fails with the code
  that fits: read-only is PD-PRM-003, in use is PD-PRM-002, a full disk is still PD-SYS-002. Every
  one of them was PD-SYS-002, "not enough free disk space" (U25).
- cache_clear holds the slot of the feature that owns the target - Health for the tools venv, the
  Security tab for the audit venv, the plan slot for snapshots - so a clear is refused while that
  feature runs instead of deleting the venv in use, and a parked preview is put back (U36). The
  deletion runs off the async workers.
- The name index loads in the background on its own connection (U35). The load held the store's
  lock for 140 ms - every command that wanted the store waited behind a keystroke - on a worker
  the app shares; the triggering search answers ready:false, as the command's doc always said.
- Environment probes run four at a time instead of in series (U19, part).
- The audit's cancellation token is registered before the freeze, so Stop during it is honoured
  (U37); a run stopped that early skips the venv sync and reports itself cancelled.
- A cache test named its scratch folder after the clock alone, so two tests in one tick shared it
  and the fresh-install test read the other's files. It failed once in this run; a counter fixes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 040571c7f7 fix(cli)!: one JSON document per command, env use is honoured, Ctrl-C stops the run
Changed for scripts: every `--json` invocation now prints exactly one document on stdout
(CLI-SPEC §6), with prompts, previews-before-a-prompt and prose on stderr (X5). The preview and
then the summary used to be two documents, so `pipdock install x --json | ConvertFrom-Json`
failed on the second. The document is: the ResolutionReport when nothing runs (a dry run, an
empty plan, a declined prompt - exit 2), the ExecutionSummary when something does, the FlowStep
when there is nothing to plan, the GuardReport for a refused removal (with --force, only the
summary), and the entity itself for env use, pin add/remove, snapshot create, engine and
pip-upgrade ({before, after}). Prompts moved to stderr in both modes.

- `env use` is honoured (X3): --env, then the default it set, then a .venv here - as --env's help
  always said. It was written and never read. A default whose interpreter is gone is said and
  skipped. The help line says "the one `env use` set" now (32 help snapshots re-blessed for that
  line alone).
- Ctrl-C (and Ctrl-Break, which a supervisor can send) trips the flow's token (X6): the engine's
  process tree is killed, what ran is summarized with the snapshot to roll back to, and the exit
  is 130; a second press quits at once. Verified against a resolve hung on a server that never
  answers: exit 130 the instant the signal arrived, no python left running.
- `update` with neither names nor --all exits 2 instead of planning nothing (X16); `audit` uses
  --engine (X14); `engine` needs no environment (X15); `doctor` judges the configured engine, not
  pip, so a uv-only venv passes (no pip is the uv default); an impossibility skipped off a TTY says
  what and why (X26); `list` probes once instead of twice (X28); names and versions honour
  `{:<32}` (X27); `snapshot diff` compares the way a rollback would across engines.

Verified with a script driving the real binary through each of these: every stdout parses as one
JSON document and every exit matches CLI-SPEC §5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 77ca18cc33 feat(app): the GUI logs, says when it cannot start, and shows where the log is
- The GUI writes data\logs\pipdock.<date>.log through the same core::logging the CLI uses, with
  the panic hook installed, so a crash leaves a record where it used to leave nothing.
- A data folder that cannot be opened is said in a dialog before any window exists (U18). The
  store was opened inside Tauri's setup hook, whose failure is a panic in the event loop: a
  release build has no console, so the user double-clicked and nothing happened. It now opens
  before Tauri starts, and the failure shows the code, the message and the log path through
  rfd - already in the tree via tauri-plugin-dialog, so Cargo.lock gains one dependency edge and
  no crate. It is the one place GUI copy is written in Rust (both languages at once), because no
  webview exists yet to load a catalog.
- logs_tail returns LogTail { dir, lines } - a new schema, so schema-LogTail is blessed and
  schema-unknown-type lists one more type. NOT_YET is down to one entry, env_add_manual.
- Settings gains a Logs row: the folder, as a path, and "Copy recent log", which re-reads the tail
  at the moment of copying so the clipboard holds the run that just went wrong. The clipboard
  permission "Copy full log" already had is enough; no capability changes. en + vi copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 b7fa16a281 feat(logging): a log exists, and the CLI's logging flags do something
There was no log. tracing was a dependency of three crates and called zero times, --verbose and
--log-file were parsed and ignored, LOG_RETENTION_DAYS had no reader, and the privacy policy
described "log files (14-day rotation)" that did not exist. A bug report could attach the last
run's engine output and nothing about what PipDock itself had done.

core::logging owns what both heads share: one file per UTC day under data\logs
(<prefix>.<date>.log, so the GUI and CLI never interleave), a sweep that keeps
LOG_RETENTION_DAYS and never touches a file it did not name, tail() for reading it back, and a
panic hook. What is logged: every spawn's argv, exit code and duration, every stop and its
reason (exec); each resolve's outcome, each snapshot, each run's counts or refusal (flows); and
the engine's own lines at DEBUG.

The CLI always writes its file, at PIPDOCK_LOG or INFO; --verbose adds stderr at DEBUG;
--log-file adds a copy; an internal error (exit 10) prints the log's path on stderr. Nothing goes
to stdout - verified: `install --dry-run --json --log-file x` leaves one JSON document on stdout
and nothing on stderr. The golden suite runs under a scratch LOCALAPPDATA now, and no golden
changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 f4cf9e4959 build(tools): pin the tools venvs' whole dependency tree, not just the tools
tools-requirements.txt pins four tools and nothing beneath them, so every sync resolved their
thirty-odd dependencies against whatever PyPI held that day: a Code Health report was
reproducible for a build only as far as the top of the tree, and a broken or compromised release
of requests, rich or msgpack reached every user on their next sync (H27).

tools/tools-constraints.txt is that tree, compiled once with
`uv pip compile --universal --python-version 3.10 --only-binary :all: --no-emit-package pip`
(the command is in its header), embedded in the binary and passed to the bootstrap as `-c`. One
file serves both venvs because a constraint does not install anything. pip is left out on purpose:
it is the installer, and pip-audit's dependency on it would otherwise make pip replace itself
half-way through installing pip-audit. A test refuses a ledger pin the constraints do not match,
with the command to fix it, so a Dependabot bump cannot ship half-applied.

The manifest hash still covers the tool pins alone, so no existing venv is forced to re-sync.
Verified by syncing both venvs from nothing: every installed package is the constrained version.
Hashes (`--require-hashes`) remain in the backlog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 535b4c8707 fix(health, audit, index, snapshot): what was previewed is what is fixed, and smaller holes
Code Health
- ruff --fix ran `check . --fix` with none of the exclusions the previewed run used (C4). Real
  ruff 0.17.1, verified: it rewrote every .ipynb in the tree - the preview excludes notebooks -
  and, in a project whose pyproject sets its own `exclude` (which replaces ruff's defaults), the
  files under .venv as well. The fix argv is now the read-only argv plus --fix, by construction;
  re-run against both cases, neither file changes.
- git status runs with -c core.fsmonitor=false (M40): a project folder that carries its own
  .git/config could name a program for `git status` to run, and asking "is it safe to write
  here" would have run it.
- One tool whose output cannot be read is that tool's problem, not the run's (H24). A `?` at the
  last step returned from the whole run, taking the other tools' findings with it.
- The fix's own failures speak Code Health's codes, and a timeout says files may already have
  been rewritten (M39). Project paths lose Windows' \?\ prefix, which every filename in the
  report carried (M47).

Security tab
- pip-audit is given pins, not the raw freeze (H21): one editable install failed the whole audit.

Index
- TLS failures read the error's source chain (M32): reqwest's top-level message never mentions
  the certificate, so PD-NET-002's guidance never showed.
- Typed, borrowing parse instead of a Value tree of 700k objects; the ingest runs on a blocking
  thread; connect/read timeouts replace a single 120 s total a slow link could exceed while
  making progress (M36). An empty project list is refused rather than ingested over the index
  (L55).

Snapshots
- Ids are fixed width and the list orders by created_at (M43): the timestamp's trimmed fraction
  made `…09-42Z` sort after `…09-4235606Z`. A sidecar whose id is not a PipDock id is ignored
  rather than used to build a freeze-file path (L54).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 545e86bd31 fix(flow): rollback across engines keeps pip; Hold pins hold; a failed round keeps the preview
- A rollback never removes pip, and across engines leaves pip, setuptools and wheel out of the
  comparison (C7). uv's freeze has no --all, so a uv snapshot never lists them; compared with
  pip's freeze every one looked added since, and the restore uninstalled pip from the
  environment. Meta::engine was recorded for exactly this and read by nothing. Verified: a uv
  snapshot previewed for a pip rollback now reports the environment already matches.
- Hold pins are restated at their version in every resolve (H17). hold_requirements existed and
  nothing called it, so a held package was only left out of the upgrade list and free to move as
  anyone's dependency. A hold never releases the packages it collides with - only a forced pin
  does - so its impossibility is shown as it stands.
- PinMode::Exclude's doc promised one-at-a-time updates that filter_upgrades never allowed. The
  rule stays DATA-FLOW §9.5 and the doc now says so (schema-Pin re-blessed for the wording).
- decide() is transactional and the GUI keeps the flow parked when it fails (U24): a failed
  re-resolve used to leave the new request beside the old report, and plan_decide dropped the
  flow, so the preview on screen had a Confirm that answered "no plan".
- An install no longer runs `list --outdated`, a network sweep of every installed package that
  nothing in an install reads (M28).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 e2e75f63fb feat(flow): PipDock enforces Requires-Python itself, as hard invariant 10 says
Invariant 10 says PipDock enforces Requires-Python because the engines disagree, and nothing
did (C2): PD-PKG-001 existed in the catalog and was never raised. pip refused an incompatible
exact pin with the "No matching distribution" it gives a typo (PD-PKG-002); uv honours the
lower bound, ignores the upper one, planned scipy==1.7.3 on Python 3.14 and failed at install
time building it from source.

The update flow now checks three places:
- exact pins the user typed (name==v, name===v), before any engine sees them. A request that is
  nothing but such pins is PD-PKG-001 with the range and the interpreter; otherwise the pin is
  left out and the preview says so (report.incompatible).
- forced pins: forcing a release this Python cannot run stays held back, with the reason.
- what the engine planned. pip's report already says what each release requires, so nothing is
  asked; for uv's plan PyPI is, and each release that excludes this Python is ruled out by name
  (`name!=v`) and the engine asked again, at most twice - it, not PipDock, picks what is next.

crate::release asks https://pypi.org/pypi/{name}/{version}/json for info.requires_python, at most
eight at once with a 15 s watchdog each, and remembers every answer forever in a new store table
(an uploaded release's metadata never changes). A failure is asked again; unknown never blocks.
The PyPI client is shared per process now, rather than rebuilt for every request (M37, part).

Store v4. Migrations ran on every open - a journal_mode write and eight CREATE TABLEs, on a store
some paths open twice per lookup - and an older build set user_version back down, so the next
newer build re-ran them (M38). Both fixed, with tests.

Verified on Python 3.14: `install scipy==1.7.3` is PD-PKG-001 under pip and uv alike, and
`install scipy==1.7.3 six==1.17.0` plans six and says why scipy was left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 6ff2a10631 fix(flow): Force latest forces, and says what it breaks before it runs
Choosing Force latest recorded the decision in the request and nothing read it, so the "forced"
resolve was the held-back one again (C6). forced_requirements had existed since M2 with no
production caller. The flow now turns Strategy::ForceLatest into the resolve's GuardAdjust: the
forced package pinned to its latest, and the packages whose constraints held it back released
from the guard set.

Forcing still failed in the canonical case, because the guard set pins every installed package
the plan does not move - the forced package's own dependencies included: httpcore 1.0.9 needs
h11>=0.16 and the guard had h11==0.12.0. Which pins collide is resolution, and PipDock does not
resolve (invariant 3), but the engine names them in its impossibility; forced_collisions
releases exactly those, installed and still pinned, and asks again, at most three times.

report.forced carries each forced package with its blockers - the "Will break" rows DISCLAIMER
§2 requires before anything runs - and the CLI prints them. Verified on a venv seeded with
httpx 0.23.0: under pip and uv both, httpcore -> 1.0.9 and h11 -> 0.16.0, breaking httpx, named.

The underlying over-pinning (a selective upgrade cannot move its target's dependencies) is
recorded in the audit backlog rather than changed here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 3cfb8f82ec fix(flow): PEP 668 is decided on a fresh probe, and the override works
The gate read env.externally_managed - whatever the caller last cached - before anything was
probed, and the rollback flow had no gate at all (H12). The Settings override saved and nothing
read it, so turning it on changed nothing (H11). Every mutating flow now starts with one
preamble: probe, then decide on what the probe says. Without the override a managed
environment is PD-ENV-002 before any engine command; with it, the flow carries
SystemPackages::OverrideAllowed to every mutating engine call.

SystemPackages is a named value, not a bool, for the reason SnapshotProof is a named waiver:
hard invariant 5 says the flag is never passed implicitly, and this makes "implicitly"
greppable. It reaches pip and uv installs and removals, and uv's dry run, which refuses a
managed environment without it (verified, uv 0.13.1); pip's --dry-run --report is exempt and is
never given it. pip implemented PEP 668 in 23.0 and added the flag in 23.0.1, so below 23.0
nothing is passed and pip 23.0 itself is PD-ENV-002.

The CLI reads the override from the store both heads share - deliberately with no flag of its
own - and says on stderr, every run, that it is in force. Verified against a uv-managed
CPython 3.13 with an EXTERNALLY-MANAGED marker: refused without the override (exit 3); with it,
pip installed and uv dry-ran and removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 5d63b31098 fix(flow): a stale or drifted preview is refused, before the snapshot
DATA-FLOW §9.3 refuses a preview older than ten minutes or one whose environment changed. Both
checks existed in AcceptedPlan::verify and neither could fire (C1): the flow created the plan
inside execute() with the current time, so its age was always zero; it passed the resolve-time
listing as the "current" one, so the fingerprint always matched; and plan::execute compared the
plan's env hash with itself.

AcceptedPlan::accept now takes the basis the report was resolved over - the listing and the
resolve time - and the flow re-probes in take_snapshot, after the user confirmed and before
anything is written, so a refusal costs no snapshot. plan::execute verifies against the hash of
the environment it is actually changing, and acts on the re-probed listing.

The same rule reaches the other two flows (M44): an uninstall re-probes before its snapshot, since
a package installed after the guard ran may depend on what is about to go, and a rollback compares
the freeze it takes with the one its restore plan was diffed against.

One plan id (M31): the snapshot said "update-<env>" for every plan ever made in an environment and
the summary carried a different id. Both now carry the flow's, which is unique per plan.

Five new flow tests fail on the previous code and pass on this one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 f9984fa4fb refactor(flow): FlowOptions and an Engine::probe seam
Every flow probed through a free function, so nothing `start` decides - the PEP 668 gate, the
graph, the drift basis, what reaches the resolver - could be reached by a test without a real
interpreter, and the bugs the next commits fix were all there. Engine::probe is a provided
method (it is probe.py, not an engine command; no adapter overrides it), and tests/flows.rs
drives whole flows against a scripted engine that owns a small, mutable world.

FlowOptions carries what the caller decides before a flow starts: the cancellation token and a
clock. The token is the caller's because the first resolve runs inside `start`, and a token
made there could only be handed out after the resolve it was needed to stop. The GUI
registered a token of its own for that window which nothing listened to, so Stop during a first
resolve did nothing at all (H13); plan_resolve now hands its token to the flow, and a test
proves a hung resolve ends on Stop rather than on its watchdog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 7e6ad52b4f fix(graph): platform markers are read, and the lexer is safe on any text
The marker evaluator knew python_version and python_full_version and treated every other
variable as unknown, which keeps the requirement in force. The platform markers had been left
out as "constants for a Windows-only v1" - but a constant still has to be read. Unread,
ipython's `pexpect; sys_platform != "win32"` was in force on Windows, so the dependency view
reported pexpect missing from every Windows environment with ipython in it, and the uninstall
guard and pin suggestions counted edges that do not exist there (H25).

ReverseDeps::for_probe evaluates against probe schema 3's marker environment: platform
variables compare as strings with ==, != and PEP 508's `in` / `not in`, which the lexer now
reads. Whatever the probe did not report - platform_release on Windows - still keeps the
requirement. Every production graph (update and uninstall flows, deps_graph, pin suggestions)
is built this way; build_for remains for callers that know only the Python version.

The lexer skipped whitespace a byte at a time and sliced a word's length before checking the
prefix, so a no-break or ideographic space in some installed package's Requires-Dist cut a
character in half and panicked the command (H19).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 53dedf8625 fix(probe): one METADATA parse, a marker environment, and paths with spaces
probe.py read each distribution's METADATA three times - dist.metadata, then dist.version and
dist.requires, which each re-parse it - on the path every environment open pays (M42). One
parse now; an .egg-info still gets its requires.txt. On CPython 3.14 with 64 distributions the
probe went from 154 ms to 118 ms (median of 15, twice), and the dists array is byte-identical.

Probe schema 3 adds the PEP 508 marker environment, so the graph can tell a requirement in
force from one gated to another platform (H25, consumed in the next commit). It is built from
sys and os: platform.uname() is a WMI query on Windows (55 ms on 3.14) for two values almost no
requirement mentions, which are left out there and stay unevaluated.

Discovery:
- py -0p and uv python list rows are "<key> [*] <path>", and the path may contain spaces
  (H26). Taking the last token turned C:\Program Files\Python312\python.exe - where every
  all-users python.org install goes - into a relative path the existence check dropped.
- A 32-bit all-users Python registers under Wow6432Node, which a 64-bit process does not see
  through the default registry view (M48). HKLM is now read in both views.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 c0301fa3e8 fix(parse): uv is read by its exit status; check findings name the right package
uv's adapter handed every outcome to the plan parser, which looked for the words of a plan
(C3). A build that failed still printed "Resolved 1 package", so it previewed as "no changes";
a refused connection matched nothing and was reported as a uv newer than PipDock (PD-ENG-003);
an unknown name came through the resolver as an impossibility and was auto-skipped as a
conflict. uv_resolution and pip_resolution now decide by exit status first: zero is a plan, an
impossibility is a report, anything else is classified like every other engine failure. A new
corpus test asks that function - the one each resolve returns through - about every failed
capture; classifier_corpus.rs had proved each stderr classifies correctly while the adapter
never asked the classifier. Verified against real uv 0.13.1: PD-PKG-002 and PD-NET-001 (exit 6).

check_text read one of the three shapes real engines print (H18, and one found by breaking an
environment on purpose): pip's version conflicts say "has requirement" and were dropped - the
case a post-run check exists for - and every uv finding ("The package `httpx` requires ...")
was filed under a package called "the".

- A pip yank reason is the one line after the warning that names the package (H23). Flattening
  the whole stderr ran it over pip's [notice] lines, which carry the user's home directory, and
  gave the first of two yanked packages both reasons.
- pip's unreadable output is PD-ENG-999, not PD-ENG-003, whose advice is to switch to pip (M34).
- A pip below 22.2 stops at --dry-run, the first option it does not know, so that line is
  PD-ENG-002 too.
- uv 0.11 (miette glyphs) and 0.13 ("cause:" labels) now explain one conflict in the same words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 8b18dc4795 feat(engine): a resolve can be stopped, and pip's impossibility is a report
Engine::resolve takes a ResolveCtx: the flow's cancellation token, which now reaches the dry-run
command, and a GuardAdjust the flow will use for Force latest, Hold pins and Requires-Python
exclusions (pins replace a name in the request and the guard set, releases leave the guard set,
exclusions ride as `name!=v`). A stopped resolve is FlowStep::Nothing(Cancelled) - nothing
planned, nothing ran - instead of an error (H13).

pip's ResolutionImpossible was a hard error, so under pip one unsatisfiable package failed the
whole preview while uv offered a per-package Skip. The pip adapter now returns
report.impossible, built from pip's "Cannot install A and B" line (H15). The same request now
exits 2 under both engines.

Running it found a defect the requirement files introduced: pip names a requirement that came
from a file as "-r <temp path> (line N)", so the impossibility lost the package the user asked
for and every error row showed a temp path that had already been deleted.
RequirementFiles::humanize puts the line back; uv names requirements by their text and needs
none of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 d2993bbd7d feat(wire)!: the preview carries what it was missing, and stops carrying the engine's output
A contract change, deliberately in one commit; four schema goldens re-blessed for it
(`ResolutionReport`, `FlowStep`, `CheckReport`, `ExecutionSummary`).

**`ResolutionReport.raw` leaves the wire.** It was pip's whole `--report` document — every
package's README — cloned into each `FlowStep`, serialized over IPC on every round and printed by
`--json` (33 KB for two packages, megabytes for "update all"). Nothing in the UI ever read it. It
stays in Rust (`#[serde(skip)]`) for the log, and for pip it now holds stderr — pip's warnings —
rather than the report the parser already consumed.

**New fields, all omitted when empty, so existing JSON reads the same:**
- `incompatible: [PythonMismatch]` — pins whose `Requires-Python` excludes this environment
  (PD-PKG-001), as structured data: the preview shows the required range against the
  environment's version, which a sentence assembled in Rust could not let it do (invariant 4).
  Filled by a later commit.
- `forced: [HeldBack]` — what "Force latest" will break. Filled by a later commit.
- `yanked: [YankWarning]` — **both adapters parsed yank warnings and then dropped them**
  (`.map(|p| p.report)`), so PD-PKG-003's preview warning has never been shown.
  `ParsedPlan::into_report` keeps them.

**`CheckReport.error`.** A post-execution check that could not run was reported as
`ok: true` — "verified" exactly when nothing was, for instance when the run had broken pip
itself. It is now `ok: false` with the reason's code; the rows still carry the per-package truth.
`CheckReport` therefore embeds `Code`, which makes it the sixth schema that does.

**`NothingReason::Cancelled`**, for a resolve the user stopped (wired in a later commit); the
CLI maps it to exit 130.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 80b2cee9e7 fix(engine): requirements and constraints reach the engine as files
**The command line no longer grows with the environment.** Every plan restates the whole
installed set as requirements (SP-1), and it did so as one argv entry per package — at about 1,300
packages that passes Windows' 32,767-character command line, the spawn fails with os error 206,
and the user was told to install an engine. Resolves and installs now pass `-r <file>` (and
`-c <file>`), written under fresh random names with `TempFile` and deleted on drop. The files hold
exactly the tokens argv held: rendered `PinnedSpec`s and validated `Spec`s. A test restates 2,000
long names and asserts the command line stays under 1,000 characters.

**Every install step holds the rest of the environment still.** SP-1's rule was applied to the
resolve only. Phase B then ran `pip install alpha==2` bare, free to move any dependency — pip warns
and exits 0 when it breaks an installed package's bound — so a failed batch could leave a state
the preview never showed. `Engine::install` now takes an `InstallSet { specs, constraints }`:
Phase A constrains everything the plan does not touch to its current version; a Phase B step adds
the rest of the plan at its planned versions; a rollback restore holds the rest of the restore at
the snapshot's.

Verified against real engines in a throwaway venv (pip 26.2.1 and uv 0.13.1): `-r`/`-c` dry
runs, the SP-1 held-back case and a real install all behave as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 6559ebcc84 feat(model): PEP 440 at the boundary where text becomes argv
SECURITY §2 has always said names *and versions* are validated before argv. Names were; versions
were plain strings, so a dock-bay entry of `2.0 ; python_version<'0'` reached argv as one token pip
read as a requirement whose marker is false — a silent no-op install — and requirements import
failed outright on any range, because `build_request` split on `==` alone (`django>=5.0,<6`
became a "package name"; `pkg===1.0` became version `=1.0`).

New `pep440` module, the one place that says what a version and a specifier set may look like: a
hand-written reader of `packaging`'s `VERSION_PATTERN` (epochs, every pre/post/dev spelling, local
labels — nothing legitimate is refused), a specifier-set grammar (`===`, `.*` prefixes, whitespace
only between an operator and its version), and `is_argv_safe` for installed versions that are not
PEP 440, which the guard set now restates with `===` (packaging dropped `LegacyVersion`, so `==`
would be refused).

Wired in at every way text arrives:
- `Spec::parse` for CLI/GUI install specs and imported requirements; `Spec` and `PinnedSpec` now
  deserialize through the same checks, closing the IPC door the way `PkgName` already did.
- The guard set skips an installed version that could be read as more than one token.
- uv's `+ pkg==0.1.0 (from file:///…)` keeps only the version (it reached argv whole).
- pip report changes and freeze lines with such versions are dropped / unrestorable.
- `pins::validated_hold` and `health::validated_version` were the same charset check twice; both
  use `pep440::is_version` now, which also rejects `1.0--break-system-packages`, a string whose
  every character is in a version's alphabet.

`version_req` is normalized to an operator form (`==0.28.1`), which `plan_argv_specs` already
rendered identically. The one golden that moved is `schema-PlanRequest`, for its doc text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 3e4f3d0243 fix(plan): Phase A under Stop, a watchdog and an environment-wide failure
`plan::execute` ran the batch with `engine.install(...).await?`. The real adapters return `Err`
when the batch is stopped or cannot start, so that `?` sent all of these out of `execute` as
PD-INT-001 — no summary, no "cancelled", no rollback offer:

- **Stop during Phase A**, which is most of any run: the cancelled-Phase-A branch right below was
  unreachable outside a test whose fake engine returned `Ok` on cancel.
- **The watchdog** on a long sdist build: the whole run aborted, contradicting the
  skip-and-continue requirement it exists to keep.
- **An engine that will not start**.

Now an `Err` is an outcome: a user's cancel marks every row Skipped with `cancelled: true`; any
other failure becomes the batch's code on every row.

**Phase B only runs when it could help.** Isolating re-ran every package one at a time after
*any* batch failure — offline, read-only site-packages, a full disk, a missing or too-old pip, a
watchdog — each meeting the same wall after pip's own retry backoff. `isolates()` keeps those in
Phase A, with the stderr tail on the first row only instead of N copies of one network trace.

**Rows say what they moved from** (`StepResult.from`), taken from the plan's changes; the
engines cannot know it, so every row carried `None` and the summary and `--json` called every
upgrade a fresh install.

A rollback no longer runs `pip check` between its removals and its restores — it nested
`execute_uninstall`, post-check included; both now share the removal loop.

Five new tests, each failing before this: a fake engine that returns `Err(Stop::Cancelled)`,
`Err(Stop::TimedOut)` and a spawn failure the way the adapters do, an offline batch that must not
be isolated, and `from` through both phases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 8ddb2317f4 refactor(exec): a stopped run says why in its type; the pump survives any bytes
**Typed stops.** A cancelled or watchdog-killed command now returns a `PdError` carrying
`stop: Some(Stop::Cancelled | Stop::TimedOut(_))` (never on the wire). Three modules decided
"was this a cancel or a timeout?" by matching the `"cancelled:"` / `"timed out"` prefixes
`Command::stopped` happened to write — so pip's own "Read timed out" network error was relabelled
a watchdog by Code Health's remap. They ask `is_cancelled()` / `is_timeout()` now. A timeout
carries PD-ENG-004 at this layer; Code Health and the audit still remap it to their own codes.

**The pump reads bytes.** tokio's `lines()` errors at the first byte that is not UTF-8, and the
loop treated that as end of stream: it stopped reading and dropped the pipe, so the child died on
a broken pipe mid-install and the stderr the classifier needed was cut short. MSVC prints in the
OEM code page, so a non-English Windows was one failed source build away. Lines are now read
with `read_until` and decoded lossily; a test writes raw cp-1252/cp-932 bytes through
`cmd /C type` and asserts the line after them arrives.

**Watchdogs per kind of work** (`exec::watchdog`): install 30 min, resolve and `--outdated`
10 min, local queries 3 min, `probe.py` 60 s, `py -0p` / `uv python list` 30 s. One 600 s budget
let a hung `py -0p` hold the Environments screen for ten minutes and killed a slow scipy build.

**Spawn failures map by cause**: a missing interpreter is PD-ENV-001 (it was PD-ENG-001,
"install the engine"), a command line past 32,767 characters is PD-SYS-001.

**`TempFile`** replaces `write_temp`: `create_new` with retry, deleted on drop. The old function
documented that an overwritten temp file would be harmful and then called `fs::write`, and its
comment described a nonce scheme the code did not use. `io_error` maps filesystem failures to
the code whose advice fits (disk full, path too long, permission) instead of always "disk full".

**`Command::python_tool`** gives vulture, deptry and pip-audit the UTF-8 environment
`Command::python` gives interpreters; they are Python launchers and were spawned without it.

**`probe.py` runs with `-X utf8`.** `-I` implies `-E`, which ignores PYTHONUTF8 and
PYTHONIOENCODING, so the probe wrote through the ANSI code page: a venv under a folder named with
Vietnamese diacritics crashed it with UnicodeEncodeError (PD-ENV-003, reproduced) and a Latin-1
path came back as mojibake. `-X` is a command-line option, which isolated mode honours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 9409a82e84 test(fixtures): pip 26.2.1 and uv 0.13.1 captures, both uv renderings under test
Re-captured by the drift job itself (workflow_dispatch on this branch, Python 3.12.10, artifact
`captured-fixtures`) rather than on a dev machine, so next Monday's run compares like with like.
Copied byte for byte; CRLF counts unchanged where the engine's output did not change.

What actually moved:

- **uv 0.13.1** renders every failure as `error: …` / `cause: …` instead of miette's `× …`,
  `╰─▶` and "Caused by:". The phrases the classifiers key on survived, so nothing reclassified —
  `both_uv_renderings_classify_identically` now pins that, against the frozen `uv-0.11/` corpus.
  The build failure also moved from `build_wheel` to `get_requires_for_build_wheel` and gained a
  `hint:` line.
- **pip 26.2.1** (it was 25.0.1 all along — the capture never upgraded it) prints no release
  notice, and for an unsatisfiable `scipy==1.7.3` now says *which* versions it ignored and why:
  "Ignored the following versions that require a different python version: … 1.7.3
  Requires-Python >=3.7,<3.11". pip 25 said only "No matching distribution found", which is why
  ERROR-CATALOG calls PD-PKG-001 unclassifiable from stderr. On pip ≥ 26 it no longer is.
- `clean-upgrade` now upgrades to the pinned idna 3.10 in both live corpora.

`plan_parsers.rs` and `classifier_corpus.rs` run over `pip/`, `uv/` and `uv-0.11/`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 2b4681954b feat(errors): PD-ENG-004 for an engine watchdog; WinError rules match exactly
**PD-ENG-004 `EngTimedOut`.** Every engine command shares one watchdog, and when it fired the run
reported PD-INT-001 — "PipDock hit an internal error" — for an sdist build that was simply still
compiling, and in the batch phase that error aborted the whole run with no summary and no
per-package retry. A timeout is a fact about the engine, not a PipDock bug, so it gets its own
code. Raised by PipDock, never classified from stderr, so it joins the `internally_raised` table of
the corpus gate. The exec layer starts producing it in the next commit.

The nine places: the catalog variant (`as_str`, `area`, `ALL`), both count tests (34 → 35), the
corpus gate, both `errors.json` catalogues, `codes.json` and `generated.ts` (regenerated, not
edited), the ERROR-CATALOG row (31 → 32 rows), and the five schema goldens that embed `Code` —
`Code`, `StepResult`, `ExecutionSummary`, `HealthReport`, `AuditReport` — each re-blessed for
exactly one new `const`, which is the contract change this is.

**WinError needles include the closing bracket.** Python prints `[WinError N]`, and the bare
"winerror 5" also matched 50, 53 and 59: `[WinError 53] The network path was not found` came out
as PD-PRM-001, "use a venv". `[WinError 53]` and `[WinError 10013]` (a firewall refusing the
socket, raised *as* a PermissionError) now classify as network failures, ahead of the permission
rules that would otherwise take them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 2b07d4057b test(fixtures): the drift gate measures engines, not PyPI
The weekly re-capture has failed seven Mondays running (since 2026-08-31), and for most of them no
engine had changed at all:

- `clean-upgrade` asked for the *latest* idna, so 3.18 → 3.20 was "drift". Pinned to idna==3.10.
- pip's "(from versions: …)" listed every scipy release, so the requires-python fixture grew with
  each one. Redacted, like the release notice before it; no classifier reads it.
- The capture never upgraded pip: every venv ran the CPython-bundled 25.0.1 while 26.2.1 was
  current, so the job meant to catch a pip output change could not see one. `venv.create(...,
  upgrade_deps=True)`, and the report's `pip_version` is redacted because it now moves with each
  pip release (provenance still records it).
- `python-version: '3.12'` floated with the runner image, and the Python patch is recorded in both
  engines' output. Pinned to 3.12.10, the version every committed fixture was captured with.

The job now uploads what it captured whether or not the gate passes, so a real drift is fixed by
reviewing and committing exactly those bytes. `capture.py` also refuses an unknown `--only` name
(it used to capture nothing and exit 0) and exits 1 when nothing was captured; its two
backtracking-prone patterns (SonarCloud S8786) became a `[ \t]` class and a `partition`.

The other half of the red was real: uv 0.13.0 (2026-10-09) replaced its miette rendering — `×`,
`╰─▶`, "Caused by:" — with "error:" / "cause:". `UV_MIN_VERSION` is 0.10, so both renderings stay
under test: the current captures are frozen as `uv-0.11/` (uv 0.11.32, byte-identical copy) before
`uv/` is re-captured against the newest uv. The disposable-venv suite also stops running twice on
Monday mornings (the drift cron matched it too).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 91a846c0fd build(deps): every dependency to its latest release
Supersedes Dependabot #75, #76 and #77, which could not merge while `main`'s audits were red.

Rust (floors raised to what is locked, so the manifests say what is built):
- tauri 2.11.5 → 2.12.4 and tauri-build 2.7.3, with the plugins dialog 2.8.3, opener 2.7.2,
  clipboard-manager 2.5.0 and single-instance 2.5.4 — in lockstep with `@tauri-apps/*` 2.12, which
  Tauri's own version check requires.
- **rusqlite 0.37 → 0.40.2** (libsqlite3-sys 0.38.2, SQLite 3.53.2). ARCHITECTURE §10 held it
  because libsqlite3-sys used the then-unstable `cfg_select!`; that is stable since 1.95 and the
  toolchain is now 1.99.1. Nothing here used `u64`/`usize` `ToSql` (disabled by default since
  0.38) or `prepare_cached` (optional since 0.38), and 0.40.1 fixes a SAVEPOINT-name injection.
- reqwest 0.13.5, tokio 1.53.3, tokio-util 0.7.20, jiff 0.2.38, clap 4.6.7, schemars 1.2.3,
  sha2 0.11.1, thiserror 2.0.21, serde_json 1.0.154, async-trait 0.1.92, insta 1.49.0, and 211
  transitive updates (h2 0.4.20 among them).

npm: React 19.3.1, Vite 8.3.4, @vitejs/plugin-react 6.1.2, **Vitest 5.0.5** (all 18 `vi.mock`
calls were already top-level), ESLint 10.12.0, typescript-eslint 8.71.2, jsdom 30.1.3,
@tanstack/react-virtual 3.14.21, i18next 26.4.7, react-i18next 17.0.19, @types/* current.
**TypeScript stays 6.0.3**: typescript-eslint 8.71.2 still peers `>=4.8.4 <6.1.0`.

Code Health pin: ruff 0.16.3 → 0.17.1. Verified by running it, not by reading its changelog:
`health/sample/capture.py` reproduces all four committed `ruff/*.json` byte for byte, and exit
codes 0/1/2 still mean clean/findings/error.

Two things the upgrade surfaced in the frontend, both real:

- virtual-core 3.19 measures the scroll element with `clientWidth`/`clientHeight` (it used
  `getBoundingClientRect()`), and that first reading replaces `initialRect`. jsdom reports 0, so 13
  table tests and 5 App-level ones went back to rendering an empty grid; the setup now stubs the
  two properties beside the `offset*` ones.
- jsdom 30.1 implements "a closed `<dialog>`'s contents cannot take focus", which is the spec.
  React applies `autoFocus` by calling `focus()` during commit — *before* PdDialog's effect calls
  `showModal()` — and never writes the `autofocus` attribute, so neither path focused Cancel. It
  worked in WebView2 only because Cancel is the first focusable element. PdDialog and the palette
  now focus explicitly after `showModal()`, and return focus to whatever opened them on close
  (it fell to `<body>` before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 d9c62ec6c9 fix(deps): rustls 0.23.46, quinn-proto 0.11.19, and the npm highs — main is green again
`main` has failed `cargo audit` since 2026-09-23 and every PR with it, because both audit checks are
required:

- rustls 0.23.42 → 0.23.46 (RUSTSEC-2026-0285, TLS 1.3 handshake messages accepted across key
  changes). `cargo update -p rustls` alone stops at 0.23.43: the fix needs aws-lc-rs 1.18 and
  rustls-webpki 0.103.15, which a conservative update will not move, so it is pinned with
  `--precise`.
- quinn-proto 0.11.16 → 0.11.19 (RUSTSEC-2026-0338..0342). Lockfile-only — nothing compiles quinn
  — but `cargo audit` scans the whole lockfile.
- chacha20 0.10.1 → 0.10.2 (the old one is yanked).
- npm: undici 8.9.0 → 8.12.2 (via jsdom), source-map-js 1.2.1 → 1.2.2, brace-expansion → 5.0.12, all
  dev-only. `npm audit fix` without `--force`; `npm audit --audit-level=high` reports 0.

Dependabot could not have done this: there are no Dependabot alerts for rustls, and its grouped PRs
only move direct dependencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5.5 1af0ec127b build(toolchain): Rust 1.99.1
Five stable releases behind (1.94.1, 2026-03-25). Two reasons to move now rather than on the next
Dependabot nudge:

- The rustls fix for RUSTSEC-2026-0285 (>= 0.23.45) does not resolve under `rust-version = "1.94"`:
  resolver 3 is MSRV-aware and stops at 0.23.43, so `main`'s red `cargo audit` cannot be fixed on
  the old pin at all.
- `cfg_select!` is stable since 1.95, which is the condition ARCHITECTURE §10 set for lifting the
  rusqlite 0.37 hold.

`rust-version` moves with the pin, so the workspace never claims a floor it is not built with.
Clippy 1.99 adds `chunks_exact_to_as_chunks`; the build script's SHA-256 now uses `as_chunks`, which
also removes two `try_into().unwrap_or` fallbacks that could never fire.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:55:27 +07:00
poli0981andClaude Opus 5 f770e9c85f fix(deps): h2 0.4.16 — RUSTSEC-2026-0258
Unrelated to this slice, and blocking its required `cargo audit` gate.
`main` is equally affected: the advisory was published 2026-08-17 and
reached the RustSec database at 10:23+02:00 on the 18th, while main's
last audit ran at 07:08 that morning and passed. The next push to main
would have failed on it regardless of this branch.

Low severity, denial-of-service: h2 accepted and queued empty DATA
frames without limit, so an undrained stream could grow memory without
bound or panic on length overflow. Reached transitively through
reqwest and hyper; PipDock's only network use is the package index and
metadata fetches, both to pypi.org, so nothing here is exposed to an
attacker-chosen peer. Fixed rather than ignored anyway, because
SECURITY.md is explicit that the vulnerability gate is never relaxed —
the `.cargo/audit.toml` ignore list is for *informational* advisories
on crates we cannot influence, and this one has a patch release.

`cargo update -p h2 --precise 0.4.16` and nothing else. The lockfile
diff looks alarming and is not: sixteen of its eighteen lines are
dependency *edges* re-pointing between `windows-sys` copies that
already coexist in the lock — five of them before this change and five
after. No package is added, removed or downgraded, and the only version
that moves is h2's own. `cargo check --workspace --all-targets` and the
full test suite pass on it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:35:15 +07:00
poli0981andClaude Opus 5 02cc17d95d docs: the dependency view recorded, and 1.3.0
UI-SPEC §4 gains the screen and **loses the sentence it contradicted**.
It said the third row action folds all three into a `⋮` menu "with the
budget intact"; that makes uninstall four clicks where §5's table
records three, hand-counted. The correction is written as a correction
rather than an overwrite, because the reason it slipped through is the
useful part: four is under the ceiling of five, and a ceiling is not a
ratchet — a table of measured counts is. §5 gains the row, §6 the
component, ARCHITECTURE §4 the forward direction and the whole-graph
value.

**The dangling cross-reference is repaired by writing what it promised.**
`ROADMAP.md` has pointed at "the analysis above" for what blocks P1-6
and P1-7 since 1.2.0, and no such analysis was anywhere in the document
— the survey lived only outside the repository, and the sentence had
been copied into CLAUDE.md as well. P1-6's half is its slice record.
P1-7's is now written too, and counted against the tree rather than
recalled: no toast component, no notification/autostart/tray dependency,
one plan-scoped `tokio::spawn` and zero intervals in either head, and no
surface that can report a failure at 03:00 while `logs_tail` is still
`NOT_YET`. Drafting this commit I nearly shipped a CLAUDE.md line
claiming that survey existed before I had written it, which is the same
defect one layer up.

Version in five places, moved together: the workspace inherits it, so
`Cargo.toml`, `package.json` and `tauri.conf.json` are the only hand
edits and the two lockfiles are regenerated. Hand-editing `Cargo.lock`
would have been wrong twice over — `scopeguard` and `simd_cesu8` are
also at 1.2.0 and `fs_extra` was already at 1.3.0. `cargo metadata
--locked` passes, which is the one-command check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:35:15 +07:00
poli0981andClaude Opus 5 8609518a37 test(ui): drive the shell against a logging bridge
The jsdom form of the recipe that has found more real defects here than
any suite: render the app, log every command that crosses, read back
what actually happened. Stage 2 found every screen fetching twice this
way and Stage 4 found a plan resolving into a screen that does not
render it — both faults *between* components, which is the one place a
component suite cannot look.

It proves the premise the slice is built on where it can actually be
observed: `deps_graph` crosses **once** when the view opens and **zero**
times on a re-centre. It also covers the seam nothing else did — the
row's new button through the table, the screen, the store and out to the
bridge — and pins the three row actions with none of them a tab stop.

Writing it found the trap the browser recipe already records, in its
jsdom form. `App` calls `checkConsent()` on mount and
`useLegalStore.check` **fails closed**, so setting `accepted: true` in
the store is undone a tick later by the real command rejecting and the
legal gate replaces the entire shell. The store reached `phase: 'ready'`
with the graph in hand and every assertion was reading a licence
agreement. Both halves have to be stubbed; the comment says so.

The browser pane could not reach localhost in this session, so this
stands in for the live drive rather than replacing it — the Rust side
of a command and the real window still want a human.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:35:15 +07:00
poli0981andClaude Opus 5 6ef677bc01 feat(ui): the dependency view, drawn at the one depth that survives the data
A mode of the package screen, not a tenth tab. `PdEnvironments` switches
to `PdEnvDetail` on `openFor`; this switches on `focus`, for UI-SPEC §4's
reason: `Ctrl+1..9` is positional over `NAV_KEYS`, appending is free and
inserting is not, and a Dependencies tab would have to sit beside
Installed to read as related. `NAV_KEYS` is already nine, so a tenth
entry would have no digit at all.

Three columns at depth 1, and depth is navigated by re-centring rather
than drawn. That is a measurement, not a preference: on the 352-package
fixture a depth-1 neighbourhood is a median of 7 nodes, and depth 2 is a
median of 172 and exceeds 60 for 212 of 352 packages. No layout
algorithm makes 172 nodes legible, so the eleventh runtime dependency, a
THIRD-PARTY-NOTICES edit that re-shows the legal gate, and a CSP
argument all buy a picture nobody can use. Transitive reach is two
numbers instead, and paths are not offered at all — `setuptools` has
more than 2000 distinct paths to a root in that environment.

**UI-SPEC §4 said the third row action folds all three into a `⋮` menu.
It does not.** A menu spends one click opening and one choosing, so
uninstall becomes four clicks where §5's table records three,
hand-counted. Four is under the ceiling of 5, which is exactly why the
budget alone would have let it through. A third inline button costs
nothing: the row is the only tab stop, so the controls are a roving
sequence and a third is one more arrow step, not 200 more stops.

Nothing is carried by colour. `styles.css` rebinds every `--color-*` to
a system keyword in forced-colors, so every edge states its specifier as
text and the columns are told apart by heading and position.

`deps_graph.json` is computed by `fixtures::deps_graph`, never written —
`numpy_blockers`' lesson. It turned out to carry two dependents with two
different specifiers *and* two packages with unsatisfied requirements,
which is more than a hand-written one would have thought to include.

Two defects the tests found by being run against mutations rather than
by being written: a column helper keyed on copy silently matched nothing
once the heading pluralised ("2 packages require this", not "requires"),
and a name-only comparison of the dependents column passed a mutation
that dropped the version and the specifier from every row.

The invalidation is the one this slice was warned about: `freshGraph`
keys on `envHash`, which a mutation does not change, so `App.tsx` resets
the slice in `onFinished`. Health and Security guard and never reset
because nothing they read is altered by an install. Edges are exactly
what an install alters.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:35:15 +07:00
poli0981andClaude Opus 5 c58fcac523 feat: deps_graph, and the shape it deliberately is not
`pin_suggestions`' shape, not `audit_run`'s. No `Sessions` slot, no
progress channel, no cancellation: those exist because an audit is
18-68 seconds, and a probe is 605 ms. Borrowing them here would be a
constant carrying its original units — the mistake `AUDIT_TIMEOUT`
already records.

One call per environment rather than one per package, which is the
whole reason the value is shaped this way. The view re-centres on a
click; a `deps_for(pkg)` command would read more naturally and pay a
probe for every click to answer a question the previous probe already
held the data for.

No store read, so there is no guard to drop — `pkg_list` is the same
and for the same reason. All five sites: the command, the handler list,
`COMMANDS`, the wrapper with `DepsGraph` added to the `import type`
list (`export type *` does not bring it into scope for a wrapper's own
signature), the `test/ipc.ts` mock, and ARCHITECTURE §7 — with its
trailing pipe, which the test added two commits ago now checks.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:35:15 +07:00
poli0981andClaude Opus 5 4ddec61ebb feat(wire): DepsGraph is a schema type
Registered in `schema_for!` and `SCHEMA_TYPES`, and in `golden.rs`'s own
copy of that list — the deliberate second list, which
`schema_lists_exactly_the_documented_types` holds in step by reading the
real one back out of the binary.

Only the root type, as the comment beside `HealthReport` says: the
generator hoists every `$defs` entry, so `DepEdge` and `DepsNode` arrive
as their own TS declarations without being listed, and listing them
would emit each twice.

`golden__schema-unknown-type.snap` churns because the error message
enumerates every known type, which is a real behaviour change rather
than noise. 67 snapshots.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:35:15 +07:00
poli0981andClaude Opus 5 bf2947b6c3 feat(core): the forward direction, and the graph as one value
`ReverseDeps` has been reverse-only since S3. Three features read it and
all three look exactly one edge out, so nothing ever needed to ask what
a package requires. PRD P1-6 does.

`forward` is built in the same pass, from the same parse, and filtered
by the same `applies_in` rule — a second traversal is how the two
directions would come to disagree. `edges_to` goes further and projects
`breaking_dependents` rather than walking `edges` again, so the
dependents column and the uninstall guard are the same set by
construction; the test asserts it whole rather than by name, after a
mutation that dropped the version and the constraint passed a name-only
comparison.

`unsatisfied` is the one thing this can say that the package list
cannot, and it is only trustworthy because the markers are evaluated.
Measured on the 352-package fixture: counting raw `Requires-Dist` names
reports **7** missing packages; evaluating markers reports **1**. The
other six are backports gated on a Python this environment is not. That
gap is the whole argument for this living in Rust.

`view` crosses the bridge whole rather than a package at a time,
because the alternative pays a 605 ms probe on every re-centring click.
Uncapped on purpose: the window is bounded in the view, but the
"+ N more" count has to come from the full set or a capped view
misreports a total.

Measured in --release against C:\Python314, 352 packages: build 1.8 ms,
view 42.9 ms, payload 249 KB, 1858 in-force edges, impact median 20 /
p90 111 / max 178. Having `reach` walk `forward` itself takes the view
to 31.4 ms — 1.8% of the probe the user is already waiting for, bought
with a second copy of the in-force rule. Declined, and the number is in
the doc so it is not re-litigated.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:35:15 +07:00
poli0981andClaude Opus 5 3152c55eaa fix(docs): three things main was carrying, and the gate that missed one
Found while surveying P1-6. None is caught by any suite, which is the
common thread rather than a coincidence.

`docs/ARCHITECTURE.md`'s `audit_run` row was the only row in the §7
command table missing its trailing pipe, so the table rendered wrong
from 1.2.0. Every gate passed: the command is registered, declared and
documented, and `documented()` strips only the *leading* pipe, so the
row parsed correctly and nothing looked at its shape. A spec sentence
is not a test — and neither is a spec table. The new
`the_architecture_table_is_well_formed` asserts the shape as well as the
contents, and was mutation-checked against the row it was written for.

`catalog.rs`'s comment read "Rust has 33; docs tabulates 30" three
lines above `assert_eq!(Code::ALL.len(), 34)`. Both numbers were one
behind; the doc tabulates 31, folding PD-HLT-001..004 into one row.

CLAUDE.md's error-code checklist named three schemas embedding `Code`
while saying "four", and 1.2.0 made it genuinely four by adding
`AuditReport` via `ToolProblem.code` — five snapshot files in all. So
anyone adding a code today would leave `golden__schema-AuditReport.snap`
stale. The line now says to grep `PD-ENV-001` across the snapshots
rather than trust the list, because that is how the omission was found.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:35:15 +07:00
poli0981andClaude Opus 5 39a0c54f05 docs: the changelog gets a directory, and a session gets a version
Two conventions, written down where each is enforced rather than remembered.

**`changelog/`, one file per major line.** A single growing file is the thing this
avoids: a reader should open `1.x.md` and find their version without scrolling past
releases they do not care about. Root `CHANGELOG.md` is a pointer, because two places to
write a release note is one place to forget.

A pre-release line gets its **own** file, named for the line it leads to, and is not
folded in when that line goes stable — the beta file is what says *when* a behaviour
changed during the run-up, and merging it would double the length of the file people
actually read while losing exactly that.

The split rule is stated in terms of **reading length rather than release count**, since
that is the property being defended: past roughly 600 lines, split into contiguous minor
ranges and leave the old name as a stub so no link breaks. Range files are never
renumbered — `1.0-1.4.md` does not become `1.0-1.6.md` at the next split.

Entries are backfilled for 1.0.0, 1.1.0 and 1.2.0, written for a *user*: what changed,
what they have to do about it, and — for 1.2.0 — that the legal gate will appear once,
which is the kind of thing a release note exists to say before someone reports it as a
bug. Deliberately no commit counts: a number written about the repository inside the
repository goes stale on commit, which AI-DISCLOSURE learned three times.

**One session, one slice, one version.** Depth over breadth, plus a hotfix release when
one is needed. It is in CLAUDE.md's conventions because that is what the next session
reads first.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 12:07:57 +07:00
poli0981andClaude Opus 5 99a25f3fa4 build(deps): ruff 0.16.3, zustand 5.0.15, typescript-eslint 8.67.0
Landed here rather than by merging #48 and #49, for two reasons that are the same
reason: both branches were cut before Slice 0 and P1-1, so each was ~3,400 lines behind
`main` and both touched `package.json`, which the 1.2.0 bump had since moved. A green
check on a stale base is the thing that broke `main` twice already.

**The ruff bump does not stand alone**, which is the P4 defect in full: `health/mod.rs`
asserts the rendered requirements body against a literal carrying `ruff==0.16.2`, and
`fixtures.rs` hardcodes the same string into `HealthReport.toolVersions`. Bumping the
ledger alone turns both red. Ledger, test literal and fixture move together, with
`ui/src/test/fixtures/health_*.json` regenerated.

rusqlite 0.40 (#50) is closed rather than deferred: ARCHITECTURE §10 holds it at 0.37
because `libsqlite3-sys` 0.38.1's build script needs the unstable `cfg_select!`, and
`rust-toolchain.toml` still pins 1.94.1. That is a compile failure, not a preference.

386 Rust tests, 204 UI tests, fmt/clippy/typecheck/lint clean, `npm audit` finds nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 12:07:57 +07:00
poli0981andClaude Opus 5 2795dda52b fix(test): a failed process query is not zero processes
`main` went red at `bee85dc` on `cancelling_kills_the_grandchildren_too`, failing its
**setup** assertion — "the fixture never started" — on a change that touched nothing in
`exec.rs`. It is the second time this test has flaked, and `19b5df4` had already replaced
one guessed sleep with polling, so the deadline was not the root cause.

`grandchildren_alive` ended in `.unwrap_or(0)`, which makes a PowerShell invocation that
*failed* indistinguishable from a definite **zero processes**. Each poll spawns
PowerShell and a CIM query — seconds apiece on a loaded runner — so twenty seconds of
wall clock was a handful of samples rather than the two hundred a 100 ms sleep suggests,
and a slow or failed query read as a confident "nothing is running".

That conflation is worse in the other direction, which is why this is a correctness fix
rather than a flake fix. The **teardown** assertion wants zero: a query that failed there
would have passed the test over a process tree that was still alive — the test proving
`TreeGuard` works could have passed while `TreeGuard` did not.

So `grandchildren_alive` returns `Option<usize>`, `None` meaning "no answer" rather than
"none alive"; `wait_for` never counts a failed query as an observation, retries, and says
so plainly if none ever succeeds instead of concluding from a number nobody measured. The
deadline goes to sixty seconds, and that number is about the *poll* rather than a guess
about the fixture.

Mutation-checked both ways: forcing the query to always fail now fails the test with its
own message, where before it would have passed on `0 == 0`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 11:31:39 +07:00
poli0981andClaude Opus 5 bee85dcdc2 chore(release): 1.2.0, and the Security tab recorded
Version in all five places — `Cargo.toml`, `Cargo.lock`, `package.json`,
`package-lock.json`, `tauri.conf.json` — and `cargo metadata --locked` verified after,
which is the one-command check that would have caught the `thiserror` lockfile
breakage that had `main` red for a day in Phase 4.

The ROADMAP stage record, and three rules in CLAUDE.md that the diff does not show:

- **A spec can promise a field that has never existed.** SECURITY §6 and PRD P1-1 both
  asked for a severity pip-audit publishes under neither vulnerability service, and §6
  named a venv the code had refused since P2. Found by running the tool and reading its
  JSON, not by reading the specs against each other. When a spec describes an external
  tool, the tool is the authority.
- **A watchdog is a unit, not a number.** Borrowing Code Health's 120 s gave an audit a
  linter's budget for a network fetch, and it fired on the first real run. A borrowed
  constant carries its original units with it.
- **Adding a field to a struct that is summed is a bug the suite will not see.**
  `total_bytes` kept adding three entries after a fourth arrived, with every cache test
  green.

Post-1.0 is down to two items: the dependency-graph view and the scheduled check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 10:55:11 +07:00
poli0981andClaude Opus 5 62c359c75b feat: the audit venv is a cache target, and a report can be saved
Two gaps the Security tab left, both of the same kind — a thing that exists on disk or
on screen that the rest of the app did not know about.

**The cache manager under-reported by a whole venv.** P1-1 put pip-audit in
`data\audit\`, and `cache::usage` knew only about `data\tools\`, so "clear the cache"
would have left one venv behind while reporting it gone. `Target::Audit` is a separate
variant rather than part of `Tools` for the same reason the venvs are separate: two
directories are two rows.

Fixing that turned up a second, worse one. `total_bytes` summed three entries and the
new field made four, so the total silently under-reported while **every existing test
passed** — the size on screen would have been wrong with nothing to say so.
`every_entry_reaches_the_total` now asserts on distinct powers of two, so a missing term
shows up as its own bit rather than as a number that merely looks plausible.
`PdCacheUsage`'s `entryOf` also became a lookup, because its ternary chain ended in a
hand-maintained negation that would have reported the tools venv's size on the audit row.

**And an audit could not be saved**, where Code Health writes Markdown and JSON beside a
chosen path. `audit_save_report` is `health_save_report`'s shape exactly, including both
of its reasons: Rust does the writing because `dialog:allow-save` asks for a path and
grants no `fs` permission, and the report comes from the frontend because what the user
asked to save is what is on their screen. `audit::markdown` lives in core so a future
`--format md` reuses it rather than growing a second renderer, and it states the source
at the top — an advisory database records what has been *reported*, which is what a
reader needs to judge an absence of findings.

Still owner-verifiable only: the save dialog itself, which needs the real Tauri runtime
rather than the stubbed bridge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 10:55:11 +07:00
poli0981andClaude Opus 5 47b9bc9039 docs: the Security tab's spec and legal debt, including two claims that were false
SECURITY §6 has said since it was written that pip-audit "runs **from the tools venv**".
The code has refused that since P2, with three tests enforcing the refusal, because
`pip-audit`'s closure contains `msgpack` — no universal wheel, so a new CPython would
hard-fail the whole sync under `--only-binary=:all:` and take Code Health down with a
feature it does not use. §6 now describes the venv that exists.

**And neither §6 nor PRD P1-1 could have been implemented as written.** Both promised a
severity — §6 as "(CVE/GHSA id, severity, fixed-in)", the PRD as "severity-sorted" —
against a field pip-audit has never had under either vulnerability service. Running the
pinned 2.10.1 is what settled it: a finding carries `id`, `fix_versions`, `aliases` and
`description`, full stop. Both are corrected to the order that ships, which is package →
fixable → id, and both now say why a derived severity would be worse than none.

`osv.dev` joins the opener allowlist, which ROADMAP has flagged as owed since 1.1.0 —
without it every advisory link rejects and nothing opens, which is the silence SECURITY
§4 exists to name. The description records what makes this entry different from
`docs.astral.sh`: `PdHealthReport` hands over ruff's own `finding.url` verbatim, while
`audit::advisory_url` **builds** the URL from an id checked against a whitelist that
cannot contain a slash, colon, question mark, hash or percent. The tool chooses the id,
never the destination.

The three legal documents that said pip-audit is "not invoked in version 1.0" now say
what it does, and DISCLAIMER §4's forward-looking sentence is replaced by one about a
feature that exists: findings come from **PyPI's** advisory data, an advisory database
is a record of what has been reported rather than a guarantee, and PipDock assigns no
severity because pip-audit publishes none. **This re-shows the consent gate once** for
every existing user — the mechanism working, not a regression.

Also: UI-SPEC §4 gains the screen it has assumed since §3's diagram, §5 its click budget
counted in the running app, and §6's off-list inventory said *four* while naming five —
now six, plus the three from 1.1.0 it never named at all. CLI-SPEC §3 documents
`pipdock audit` and drops `doctor`'s promise of an audit summary it has never printed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 10:55:11 +07:00
poli0981andClaude Opus 5 cbb6b17da4 feat(ui): the Security screen, and the sentence it told while running
`PdSecurity` owns the run, the errors and the progress; `PdAuditReport` owns the list.
Same division as `PdHealth`/`PdHealthReport`, and it is what lets the list be tested
against a fixture with no store at all. Routing the screen is one line: the nav slot,
`Ctrl+7` and both locale labels have existed since M2, so `PdSidebar`'s `NOT_YET` is
empty for the first time and `PdPalette`'s comment about a placeholder is no longer
true.

**The fixture is computed, not written** — `fixtures::audit_report` runs the real
`audit::parse` over a real pip-audit capture. Slice 0 is the reason, and the risk was
concrete rather than theoretical: dedup and the fixable-first order are exactly what
these tests read, and both live in Rust. A two-package capture, because one cannot show
grouping — sixteen rows collapsing to thirteen advisories, five of them against pip
itself, which is `Engine::freeze` passing `--all` and a fact the screen does not hide.

**One defect, found by clicking Run against a deliberately slow bridge.** Mid-run the
body read *"No audit has run for this environment"* — while an audit was running. The
report is cleared before the command, so `shown` is null during a run, and the un-run
empty state was rendered on that basis. It is P4's *no issues found before anything had
run*, inverted: a true-looking sentence derived from a state the screen had not loaded.
The body now says nothing while a run is in flight, because the live region, the
disabled Run and the Cancel beside it already say what is happening. `PdSecurity.test.tsx`
is new and asserts the absence; mutation-checked by restoring the old branch.

Verified in the browser against a stubbed bridge, per the recipe that found Stage 2's
double fetch: `audit_run` crosses **once**, all three `plugin:event|listen` calls precede
it (so a cold bootstrap is not emitted into nothing), both package groups render, Cancel
really reaches `audit_cancel`, and stale advisories clear before a second run rather
than sitting under a new timestamp.

`useSecurityStore` keys on `envHash` alone — health's `{envHash, folder}` pair exists
because Code Health has a project folder and an audit has none. `cancel` deliberately
sets no phase: a cancelled run still returns a report carrying `cancelled: true`, and
resolving the phase here would race that and throw away the partial answer.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 10:55:11 +07:00
poli0981andClaude Opus 5 2c6670a336 feat: audit_run, audit_cancel and pipdock audit
The Security tab's core reaches both heads. `AuditReport` joins `SCHEMA_TYPES`, which
is the six-place change the P1-A record describes — including `golden.rs`'s own copy of
the list, a new `golden__schema-AuditReport.snap`, and the expected churn in
`golden__schema-unknown-type.snap`, whose error message enumerates every known type.

`audit_run` takes the freeze itself, through the configured engine, because that choice
changes what is audited: pip is invoked with `--all` and includes pip and setuptools,
uv has no such flag. The real run makes that concrete — auditing the SP-4 environment
reports **five advisories in pip 25.0.1** alongside urllib3's eight, which a uv-engine
audit of the same environment would not see. The store guard is read and dropped before
any subprocess.

`AppState.audit` is `Sessions<()>`: nothing is parked, because an audit hands its report
straight back with no second call consuming it the way `health_fix` consumes a
`HealthSession`. What the slot is for is the **token**, which lives beside it so
`audit_cancel` can reach a run the slot no longer owns. Its own slot rather than
health's, for the reason health's is not `sessions` — an audit touches no environment,
so refusing it while Code Health runs would be a lock with no invariant behind it.

`pipdock audit` exits **1 on findings**, as `health` does: an advisory is a result, not
a failure, and a script wants to branch on it. A tool problem outranks the findings, so
a report that is empty because pip-audit never ran cannot exit 0 and read as "nothing
wrong here".

**Run rather than asserted.** Cold, against `spikes/out/target-env` with an isolated
`LOCALAPPDATA`: the audit venv bootstrapped, wrote its manifest, and reported 13
advisories across 2 packages; `--json` emitted **one** camelCase document with
`toolVersion` read back out of that manifest, and exit was 1. The second run did no
bootstrap at all, which is `needs_sync` returning `Fresh` for `AUDIT_TOOLS` — the half
of the venv split that only a warm second run can show.

Two hand-maintained lists were a row short and are not now: ARCHITECTURE §7, which the
new drift test demanded before it would pass, and `golden.rs`'s per-command help list,
which nothing polices — so `help-audit.snap` exists rather than the subcommand's help
going unpinned.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 10:55:11 +07:00
poli0981andClaude Opus 5 3463ff8d76 feat(core): a cancelled audit is a state, not an error
P4 deferred cancellation for Code Health on a measurement of 1.3 s. An audit measures
18-68 s, which is a different answer to the same question — long enough that stopping
one is an ordinary thing to want rather than an edge case.

P4 also recorded *why* wiring the token alone would be wrong: `exec` reports a cancel
and a crash through the same `Code::IntUnexpected`, so a stopped run would render
"PipDock hit an internal error". So the token is wired **and** mapped.
`AuditReport.cancelled` is a boolean on the report, the shape
`ExecutionSummary.cancelled` established — the user asking a run to stop is not a tool
failure, so nothing lands in `problems` and no catalog code is minted for something
that went right. The step ends `Skipped`, not `Failed`, per S1's rule that a step
killed by us is not a step that went wrong.

The test needs a real subprocess and says so: `audit_once` checks the executable exists
before it spawns anything, so a fake directory returns `PD-HLT-001` and never reaches
the token. It is `#[ignore]`d like `search_latency` and **was run** — cancelled 1.5 s
into the advisory fetch, returning `cancelled: true` with an empty `problems`. Then
mutation-checked: with the mapping disabled it fails on exactly the `PD-INT-001` path
P4 warned about, and passes again with it restored.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 10:55:11 +07:00
poli0981andClaude Opus 5 63899f9499 feat(core): audit::run, and the watchdog the first real run corrected
`audit::run` syncs nothing and freezes nothing: it takes the freeze document and the
audit venv's directory, spawns pip-audit over the SP-4 argv, and returns a report. The
freeze is the caller's for the reason `UpdateFlow::start` takes pins rather than a
`&Store` — an engine here would mean settings, which means the store, whose guard
cannot be held across an await at a command boundary. It also keeps the module
testable without a subprocess.

A failure does not propagate. It lands in `AuditReport.problems` and the report comes
back anyway, so the Security tab renders an error row and an honest zero rather than a
blank screen — the shape `PdHealthReport` proved and `PD-HLT-003`'s partial report
depends on. `packages` is deliberately separate from `advisories.len()`, because
"audited 145 and found nothing" and "audited nothing" are different answers and P4
already shipped the version of that lie once.

**The watchdog was wrong, and only running it said so.** Written against Code Health's
`TOOL_TIMEOUT`, the first real run hit 120 s and reported `PD-HLT-003` for a tool that
was working. Measured by hand afterwards:

| Run | Wall clock |
|---|---|
| cold cache, one package | 68 s |
| warm cache, one package | 18.6 s |
| warm cache, twelve packages | 20.0 s |

Twelve packages cost 1.4 s more than one, so what dominates is a one-off advisory-
database fetch, not the package count — a 352-package environment is not the risk, a
cold fetch on a slow link is. 120 s is a linter's budget for walking a source tree and
was simply the wrong unit. `AUDIT_TIMEOUT` is ten minutes, matching
`exec::DEFAULT_TIMEOUT`, which is what every other network-bound subprocess gets.

Three tests, plus one that is `#[ignore]`d the way `search_latency` is and takes
`PIPDOCK_AUDIT_DIR`. That one was **run**, against a real synced venv: 16.8 s, no
problems, and the same eight advisories live that the committed fixture carries — so
it checks the parser against the tool rather than only against a capture. The missing-
tool case is asserted to produce a *report* carrying `PD-HLT-001`, never an `Err`.

Deliberately not done: cancellation. P4 deferred it for Code Health on a measurement
of 1.3 s; this measures 18-68 s, which is a different answer to the same question, so
it wants deciding rather than inheriting — and wiring the token alone would map a
cancel to `PD-INT-001` and render "PipDock hit an internal error", which P4 also
recorded. It belongs with the bridge command, where there is a session to cancel.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 10:55:11 +07:00
poli0981andClaude Opus 5 5023e39485 feat(core): the pip-audit parser, and SP-4's fixture at last
SP-4's exit criterion was "command line + JSON fixture pinned". The command line was
pinned in prose in Phase 0; the fixture never was, so every claim about pip-audit's
output in PRD, SECURITY and CODE-HEALTH-SPEC has been unchecked since. It is captured
now, from the pinned 2.10.1 against the spike's own `urllib3==2.0.0` environment, and
`crates/pipdock-core/src/audit.rs` is written against it rather than against the
documents.

Four things running it settled, none of which reading could:

- **No severity exists, under either service.** The vuln object is exactly `id`,
  `fix_versions`, `aliases`, `description`; pip-audit's service model has no severity
  field at all. PRD P1-1's "severity-sorted" and SECURITY §6's "(CVE/GHSA id,
  severity, fixed-in)" were both written against a field that has never existed. The
  next commit corrects them; `sort_advisories` orders by package, then by whether
  anything *fixes* it, then by id — the one distinction that changes what a user can
  do. Deriving a severity from the id's year or the prose would be a number PipDock
  invented, shown beside real ones.
- **The ids are `PYSEC-*`, so the default service is PyPI**, and the CVE is an alias.
  Leaving that default is what keeps `legal/PRIVACY-POLICY.md` §3's "exactly one
  destination" true — and it costs nothing: the same environment under
  `--vulnerability-service osv` returns the *same eight advisories*, set difference
  empty in both directions.
- **Ids repeat**, so dedup is load-bearing rather than tidy. Ten rows for eight
  advisories under PyPI; sixteen for the same eight under OSV. Keyed on `(pkg, id)`,
  because one advisory can legitimately apply to two installed packages.
- **stderr carries a `pip-compile` advisory on every run**, so stdout is parsed first
  and failure classified only if that fails — SP-1's rule for uv, which writes its
  plan to stderr for the same reason.

`advisory_url` builds the OSV link from a **validated** id rather than taking a URL
out of the tool's JSON. That is the difference between this and `PdHealthReport`'s
`finding.url`, which `capabilities/external-links.json` calls out as the only URL in
the application derived from a third party's output: a whitelist of ASCII alphanumerics
and `-` cannot produce a `/`, `?`, `#`, `:` or `%`, so nothing that passes can be
anything but a path segment under one host. Ten hostile ids are asserted to get no
link at all.

No wire registration yet — the types derive `JsonSchema` but stay out of
`SCHEMA_TYPES` until a command returns one, exactly as P2 held `ToolsManifest` back
until P3 had a use for it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 10:55:11 +07:00
poli0981andClaude Opus 5 8d9a28dc03 refactor(health): the tools venv takes a tool list, and pip-audit gets its own
P1-1's blocking decision, settled: pip-audit does **not** become a fourth entry in
`HEALTH_TOOLS`. `HEALTH_TOOLS` gave two reasons for excluding it and only one
survives the Security tab existing — "a feature they cannot reach" stops being true,
but `pip-audit`'s closure still contains `msgpack`, which publishes no universal
wheel and would hard-fail under `--only-binary=:all:` on a new CPython. Installed
alongside the three, that failure takes the **whole** sync down, and Code Health with
it, over a package Code Health does not use.

So the bootstrap is parameterised rather than duplicated. `pins_for(tools)`,
`sync_steps(tools)`, `needs_sync(dir, tools)`, `sync_tools_venv(dir, python, tools,
sink)` and `verify_tools` all take the set; `audit_dir` is a sibling of `tools_dir`,
not a directory inside it, so `cache::Target` can resolve them separately. Everything
below the tool list — the manifest, the pin hash, the requirements rendering, the
rebuild-don't-repair rule — is shared, so there is one implementation to keep right
rather than two that drift.

Rendering per set is what makes the two hashes independent, which is the property
that matters in practice: a Dependabot bump to `pip-audit` must not re-sync Code
Health, and a bump to `ruff` must not re-sync the audit venv. Asserted.

The three tests that policed the old rule are rewritten rather than deleted, because
the rule changed shape rather than going away. "pip-audit reaches no venv" becomes
**"the two sets are disjoint"** — which is the property that actually keeps one
tool's wheel availability from breaking the other's feature — plus the two directions
the old tests did not cover: rendering the audit set produces pip-audit and none of
Code Health's, and the hashes differ. Mutation-checked by adding `ruff` to
`AUDIT_TOOLS`, which fails the disjointness assertion by name.

Nothing creates the audit venv yet; `audit::run` is the next commit, and the cache
manager gains the directory when there is one to report — the `LOG_RETENTION_DAYS`
rule, applied in the other direction.

One trap worth the line: clippy's `tabs_in_doc_comments` caught a literal tab that a
patch script had put in `tools_dir`'s doc where a `\t` was meant, and looking for it
turned up a **BEL** in `audit_dir`'s from the same cause. The tab was visible in a
lint; the BEL was visible in nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 10:55:11 +07:00
poli0981andClaude Opus 5 0057d5c41e docs: Slice 0 recorded, and the three rules it leaves behind
The stage table in ROADMAP's Post-1.0 section, plus three entries in CLAUDE.md that
are not derivable from the diff:

- a hand-written fixture that matches the documentation while the code does not is
  worse than none, because it makes a test asserting the right thing prove the wrong
  one — which is exactly how the doubled blocker sentence shipped for two milestones
  under a green `PdPreviewDiff.test.tsx`;
- a sentence assembled in Rust is a sentence the other head assembles again, so
  invariant 4 is not only about translation;
- `sed -i` must never touch `tests/fixtures/`: Git Bash rewrites in text mode and
  strips the CRs that `.gitattributes`' `-text` exists to preserve.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 09:05:59 +07:00