54 Commits
Author SHA1 Message Date
dependabot[bot] fdc51a8f2a build(deps): Bump rusqlite from 0.42.0 to 0.43.0 (#114)
Bumps [rusqlite](https://github.com/rusqlite/rusqlite) from 0.42.0 to 0.43.0.
- [Release notes](https://github.com/rusqlite/rusqlite/releases)
- [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md)
- [Commits](https://github.com/rusqlite/rusqlite/compare/v0.42.0...v0.43.0)

---
updated-dependencies:
- dependency-name: rusqlite
  dependency-version: 0.42.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-21 23:54:33 +07:00
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
dependabot[bot] efee3ca8d9 build(deps): Bump taiki-e/install-action (#103)
Bumps the actions group with 1 update in the / directory: [taiki-e/install-action](https://github.com/taiki-e/install-action).


Updates `taiki-e/install-action` from 2.89.1 to 2.90.0
- [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/682ce6c3c696a4cd5168a05f98e51aa02b877941...b80e2bb2635f28eb98b9fce1e2f0887e1535c6b2)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-10 20:18:52 +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
dependabot[bot] 17031c871d build(deps): Bump taiki-e/install-action (#99)
Bumps the actions group with 1 update in the / directory: [taiki-e/install-action](https://github.com/taiki-e/install-action).


Updates `taiki-e/install-action` from 2.87.32 to 2.88.0
- [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/5488ac5a951645ce95062214902ac4b6bc1a1037...86f7a0ffb25f40114606501a311ebcfaf882ea32)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-04 10:37:06 +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
dependabot[bot] df1ad1518d build(deps): Bump rfd (#96)
Bumps the cargo-minor-patch group with 1 update: [rfd](https://github.com/PolyMeilex/rfd).


Updates `rfd` from 0.16.0 to 0.16.1
- [Release notes](https://github.com/PolyMeilex/rfd/releases)
- [Changelog](https://github.com/PolyMeilex/rfd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PolyMeilex/rfd/commits)

---
updated-dependencies:
- dependency-name: rfd
  dependency-version: 0.16.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-28 09:33:31 +07:00
dependabot[bot] d8ef9c4e99 build(deps): Bump the npm-minor-patch group with 4 updates (#95)
Bumps the npm-minor-patch group with 4 updates: [@tanstack/react-virtual](https://github.com/TanStack/virtual/tree/HEAD/packages/react-virtual), [i18next](https://github.com/i18next/i18next), [react-i18next](https://github.com/i18next/react-i18next) and [zustand](https://github.com/pmndrs/zustand).


Updates `@tanstack/react-virtual` from 3.14.21 to 3.14.22
- [Release notes](https://github.com/TanStack/virtual/releases)
- [Changelog](https://github.com/TanStack/virtual/blob/main/packages/react-virtual/CHANGELOG.md)
- [Commits](https://github.com/TanStack/virtual/commits/@tanstack/react-virtual@3.14.22/packages/react-virtual)

Updates `i18next` from 26.5.4 to 26.5.7
- [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.5.4...v26.5.7)

Updates `react-i18next` from 17.1.0 to 17.1.5
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v17.1.0...v17.1.5)

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

---
updated-dependencies:
- dependency-name: "@tanstack/react-virtual"
  dependency-version: 3.14.22
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: i18next
  dependency-version: 26.5.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: react-i18next
  dependency-version: 17.1.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: zustand
  dependency-version: 5.0.16
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-28 09:31:33 +07:00
dependabot[bot] 8cc0323c59 build(deps): Bump the code-health group in /tools with 3 updates (#94)
Bumps the code-health group in /tools with 3 updates: [certifi](https://github.com/certifi/python-certifi), [filelock](https://github.com/tox-dev/py-filelock) and [platformdirs](https://github.com/tox-dev/platformdirs).


Updates `certifi` from 2026.7.22 to 2026.10.18
- [Commits](https://github.com/certifi/python-certifi/compare/2026.07.22...2026.10.18)

Updates `filelock` from 4.2.1 to 4.2.4
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/py-filelock/compare/4.2.1...4.2.4)

Updates `platformdirs` from 4.13.4 to 4.13.5
- [Release notes](https://github.com/tox-dev/platformdirs/releases)
- [Changelog](https://github.com/tox-dev/platformdirs/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/platformdirs/compare/4.13.4...4.13.5)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2026.10.18
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: code-health
- dependency-name: filelock
  dependency-version: 4.2.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: code-health
- dependency-name: platformdirs
  dependency-version: 4.13.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: code-health
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-28 09:17:41 +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
dependabot[bot] 41ab1e8085 build(deps): Bump the cargo-minor-patch group across 1 directory with 3 updates (#92)
Bumps the cargo-minor-patch group with 3 updates in the / directory: [tokio](https://github.com/tokio-rs/tokio), [tauri](https://github.com/tauri-apps/tauri) and [tauri-build](https://github.com/tauri-apps/tauri).


Updates `tokio` from 1.53.3 to 1.54.1
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.53.3...tokio-1.54.1)

Updates `tauri` from 2.12.4 to 2.12.5
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-v2.12.4...tauri-v2.12.5)

Updates `tauri-build` from 2.7.3 to 2.7.4
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-build-v2.7.3...tauri-build-v2.7.4)

---
updated-dependencies:
- dependency-name: tokio
  dependency-version: 1.54.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor-patch
- dependency-name: tauri
  dependency-version: 2.12.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor-patch
- dependency-name: tauri-build
  dependency-version: 2.7.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-25 07:47:00 +07:00
dependabot[bot] aaa97f1b02 build(deps): Bump the npm-minor-patch group with 5 updates (#89)
Bumps the npm-minor-patch group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [i18next](https://github.com/i18next/i18next) | `26.4.7` | `26.5.4` |
| [react-i18next](https://github.com/i18next/react-i18next) | `17.0.20` | `17.1.0` |
| [@tauri-apps/cli](https://github.com/tauri-apps/tauri) | `2.12.3` | `2.12.4` |
| [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.71.2` | `8.72.0` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `8.3.4` | `8.3.5` |


Updates `i18next` from 26.4.7 to 26.5.4
- [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.4.7...v26.5.4)

Updates `react-i18next` from 17.0.20 to 17.1.0
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v17.0.20...v17.1.0)

Updates `@tauri-apps/cli` from 2.12.3 to 2.12.4
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/@tauri-apps/cli-v2.12.3...@tauri-apps/cli-v2.12.4)

Updates `typescript-eslint` from 8.71.2 to 8.72.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.72.0/packages/typescript-eslint)

Updates `vite` from 8.3.4 to 8.3.5
- [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.5/packages/vite)

---
updated-dependencies:
- dependency-name: i18next
  dependency-version: 26.5.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: react-i18next
  dependency-version: 17.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@tauri-apps/cli"
  dependency-version: 2.12.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: typescript-eslint
  dependency-version: 8.72.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: vite
  dependency-version: 8.3.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-25 07:35:07 +07:00
dependabot[bot] 56ba7dcadd build(deps): Bump the code-health group in /tools with 2 updates (#88)
Bumps the code-health group in /tools with 2 updates: [filelock](https://github.com/tox-dev/py-filelock) and [platformdirs](https://github.com/tox-dev/platformdirs).


Updates `filelock` from 4.2.0 to 4.2.1
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/py-filelock/compare/4.2.0...4.2.1)

Updates `platformdirs` from 4.13.3 to 4.13.4
- [Release notes](https://github.com/tox-dev/platformdirs/releases)
- [Changelog](https://github.com/tox-dev/platformdirs/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/platformdirs/compare/4.13.3...4.13.4)

---
updated-dependencies:
- dependency-name: filelock
  dependency-version: 4.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: code-health
- dependency-name: platformdirs
  dependency-version: 4.13.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: code-health
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-25 07:34:59 +07:00
dependabot[bot] 0085eae1ca build(deps): Bump taiki-e/install-action (#87)
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.87.28 to 2.87.29
- [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/1168f6810a3cb30a3514bf5756a3b7f0422c6df8...8cca0918f8471c33515202b73f56ab27f2bed283)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-25 07:34:51 +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
dependabot[bot] a3146895a0 build(deps): Bump taiki-e/install-action (#81)
Bumps the actions group with 1 update in the / directory: [taiki-e/install-action](https://github.com/taiki-e/install-action).


Updates `taiki-e/install-action` from 2.87.27 to 2.87.28
- [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/ab6895351a88b908e96a4697860d4ffea5e57dbe...1168f6810a3cb30a3514bf5756a3b7f0422c6df8)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-20 06:52:52 +00:00
dependabot[bot] 3d45f2e936 build(deps): Bump the npm-minor-patch group across 1 directory with 2 updates (#82)
Bumps the npm-minor-patch group with 2 updates in the / directory: [react-i18next](https://github.com/i18next/react-i18next) and [eslint](https://github.com/eslint/eslint).


Updates `react-i18next` from 17.0.19 to 17.0.20
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v17.0.19...v17.0.20)

Updates `eslint` from 10.12.0 to 10.13.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.12.0...v10.13.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: react-i18next
  dependency-version: 17.0.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-20 06:50:00 +00: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
dependabot[bot] 8c5f7e0b95 build(deps): Bump taiki-e/install-action (#79)
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.87.22 to 2.87.27
- [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/83ac0ad63c0167e6f06796fab0fce28db1bf3db0...ab6895351a88b908e96a4697860d4ffea5e57dbe)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-17 01:12:59 +07:00
170 changed files with 12850 additions and 2281 deletions

No files matched your search

+23 -2
View File
@@ -8,8 +8,9 @@
# individually rather than switched off as a class, so a new one still fails CI and has to be
# looked at rather than silently absorbed.
#
# Review obligation: when Tauri drops GTK3, or a `unic-*` dependent moves on, delete the
# corresponding lines. A stale ignore is how a real advisory eventually gets waved through.
# Review obligation: when Tauri drops GTK3, its plugins move to zbus 6, or a `unic-*` dependent
# moves on, delete the corresponding lines. A stale ignore is how a real advisory eventually gets
# waved through.
[advisories]
ignore = [
@@ -33,6 +34,26 @@ ignore = [
# PipDock's as this file used to say (`cargo tree -i proc-macro-error --target all`).
"RUSTSEC-2024-0370", # proc-macro-error — unmaintained
# --- zbus 5's D-Bus stack (Linux only) -----------------------------------
# zbus 6 (2026-10-16) folded these three crates into itself, and the advisories were filed the
# same day. zbus reaches the tree only through tauri-plugin-opener and
# tauri-plugin-single-instance, which use D-Bus on Linux alone: `cargo tree -i zbus --target
# x86_64-pc-windows-msvc` prints nothing. Every release of both plugins — 2.x and the 3.0
# alphas alike — still requires zbus ^5.9, so there is no update to take. Delete these lines
# when the plugins move to zbus 6, or at P2-1 with the GTK3 block above.
"RUSTSEC-2026-0370", # zvariant — unmaintained, merged into zbus 6
"RUSTSEC-2026-0371", # zbus_names — unmaintained, merged into zbus 6
"RUSTSEC-2026-0372", # zvariant_derive — unmaintained, merged into zbus 6
# --- chrono, listed and never compiled ----------------------------------
# Cargo.lock names chrono only because serde_with 3.24's `std` feature carries the weak
# features `chrono_0_4?/clock` and `chrono_0_4?/std`, and Cargo's lock resolution records an
# optional dependency that a weak feature mentions even when nothing enables it. serde_with
# comes in through tauri-utils; `cargo tree -i chrono --target all` prints nothing, so no
# target — the shipped Windows one included — compiles it. PipDock's own dates are jiff, the
# advisory's first recommendation. Delete this line when Cargo.lock stops listing chrono.
"RUSTSEC-2026-0543", # chrono — unmaintained
# --- unic-* Unicode tables ----------------------------------------------
# Superseded upstream but functionally frozen data tables, reached transitively. Nothing here
# parses untrusted input on PipDock's behalf.
+66
View File
@@ -0,0 +1,66 @@
name: Accessibility barrier
description: Something in PipDock is hard or impossible to use with a keyboard, a screen reader, high contrast or larger text
title: "[A11y]: "
labels: ["accessibility", "triage"]
body:
- type: markdown
attributes:
value: |
Thank you for telling us. You do not need to know the cause, name a WCAG criterion or
suggest a fix — what you were trying to do and what happened is a complete report.
If filling in a form is itself the barrier, write to **accessibility@poli0981.dev**
instead. Vui lòng viết bằng English hoặc Tiếng Việt đều được.
- type: textarea
id: what-happened
attributes:
label: What were you trying to do, and what happened instead?
placeholder: "I tabbed to a package row and could not reach the Remove button."
validations:
required: true
- type: dropdown
id: impact
attributes:
label: How much does it get in your way?
description: This decides how soon it is fixed. A barrier that stops you goes into the next release.
options:
- "It stops me — I cannot do this at all"
- "I can do it, but only with real difficulty or a workaround"
- "It slows me down or is confusing"
- "It is a small annoyance"
validations:
required: true
- type: input
id: assistive-tech
attributes:
label: Assistive technology and version, if any
placeholder: "Narrator (Windows 11 24H2) · NVDA 2026.3 · a contrast theme · 200% display scale · keyboard only"
- type: dropdown
id: where
attributes:
label: Where in PipDock?
options:
- "The desktop application"
- "The pipdock command line"
- "The installer"
- "The documentation or this repository"
validations:
required: true
- type: input
id: pd-version
attributes:
label: PipDock version
placeholder: "x.y.z — shown under About → This build"
validations:
required: true
- type: input
id: os
attributes:
label: Windows version
placeholder: "Windows 11 24H2 (26100.x)"
- type: textarea
id: steps
attributes:
label: Steps to reproduce (optional)
description: The keys you pressed, or what your screen reader said, in order. A recording is welcome and not required.
placeholder: "1. Ctrl+2 … 2. Tab to the first row … 3. …"
+4
View File
@@ -9,6 +9,10 @@ body:
Thanks for the report! If you came here from the in-app **Report bug** button, most fields
are prefilled and the full log was copied to your clipboard — paste it below if asked.
Vui lòng viết bằng English hoặc Tiếng Việt đều được.
PipDock is in **maintenance mode**: bugs, UI/UX defects and accessibility barriers are
exactly what it is maintained for. A feature request filed here is closed automatically —
see CONTRIBUTING.md, "Scope in maintenance mode".
- type: input
id: pd-version
attributes:
+6 -3
View File
@@ -3,9 +3,12 @@
blank_issues_enabled: false
contact_links:
- name: Feature request — not accepted during maintenance
url: https://github.com/poli0981org/pipdock/blob/main/CONTRIBUTING.md#scope-in-maintenance-mode
about: Since 1.6.0 PipDock takes fixes, not features. An issue or pull request asking for one is closed automatically; this explains what is accepted, and where to argue that something is truly necessary.
- name: Question or idea
url: https://github.com/poli0981/pipdock/discussions
about: Ask about usage, propose a feature, or share a workflow.
url: https://github.com/poli0981org/pipdock/discussions
about: Ask about usage or share a workflow. Ideas are welcome to discuss, but during maintenance they are not on a roadmap.
- name: Security vulnerability
url: https://github.com/poli0981/pipdock/security/advisories/new
url: https://github.com/poli0981org/pipdock/security/advisories/new
about: Report privately via GitHub Security Advisories. Please do not open a public issue.
+52
View File
@@ -0,0 +1,52 @@
name: Wording or translation problem
description: Text in PipDock that is wrong, misleading, misspelt, or reads badly in English or Vietnamese — Câu chữ hoặc bản dịch sai, gây hiểu nhầm, sai chính tả hay không tự nhiên
title: "[Wording]: "
labels: ["i18n", "triage"]
body:
- type: markdown
attributes:
value: |
PipDock is in maintenance mode, and fixing words is part of it: a sentence that misleads, a
spelling mistake that changes the meaning, or a translation that does not sound like
Vietnamese as people speak it is a bug worth a report. Quote the text exactly as it
appears — that is how it is found in the catalogues.
PipDock đang ở giai đoạn bảo trì, và sửa câu chữ là một phần việc đó: một câu dễ gây hiểu
nhầm, lỗi chính tả làm sai nghĩa, hay bản dịch không giống cách người Việt vẫn nói đều đáng
được báo. Hãy chép nguyên văn đoạn chữ như nó hiện trên màn hình.
- type: dropdown
id: language
attributes:
label: Which language? / Ngôn ngữ nào?
options:
- "English"
- "Tiếng Việt"
- "Both / Cả hai"
validations:
required: true
- type: textarea
id: current
attributes:
label: The text as it is now / Đoạn chữ hiện tại
description: Exactly as it appears, and where — the screen, the dialog, or the CLI command.
placeholder: "Environments → the button beside Rescan: \"…\""
validations:
required: true
- type: textarea
id: problem
attributes:
label: What is wrong with it / Vấn đề là gì
description: Misleading, wrong, misspelt, unnatural — and, if it misleads, what you understood from it.
validations:
required: true
- type: textarea
id: suggestion
attributes:
label: A better wording, if you have one / Cách viết tốt hơn, nếu có
- type: input
id: pd-version
attributes:
label: PipDock version
placeholder: "x.y.z — shown under About → This build"
validations:
required: true
+49
View File
@@ -0,0 +1,49 @@
<!--
One pull request is one slice: a single thing, taken deep, with its tests. CONTRIBUTING.md has the
details. Delete the sections that do not apply.
PipDock is in maintenance mode (CONTRIBUTING.md, "Scope in maintenance mode"): a pull request that
adds a feature is closed automatically, and so is one titled `feat:`.
-->
## What kind of change
- [ ] A bug fix
- [ ] A UI/UX defect
- [ ] An accessibility barrier
- [ ] Wording or a translation (English or Vietnamese)
- [ ] A dependency, runtime or toolchain update
- [ ] A security fix
- [ ] Documentation
## What this changes
<!-- What a user or a script would notice, and why. Link the issue or the docs/ROADMAP.md entry. -->
## How it was checked
<!-- The commands you ran, and what you did in the running app. "Tests pass" is not the whole answer:
most defects in this project were found by running it. -->
- [ ] A test fails without this change and passes with it
- [ ] `npm run lint`, `npm run typecheck`, `npm test`
- [ ] `cargo fmt --check`, `cargo clippy --workspace --all-targets -- -D warnings`, `cargo test --workspace --locked`
## If it touches…
- [ ] **A Rust type that crosses to the UI** — bindings regenerated (`cargo run -p xtask -- bindings`)
- [ ] **CLI output** — goldens re-blessed deliberately, and the diff is the change you meant
- [ ] **User-visible text** — added to both `ui/src/locales/en` and `ui/src/locales/vi`; nothing phrased in Rust
- [ ] **A new error code** — every place `CLAUDE.md` lists, both `errors.json` included
- [ ] **Behaviour a user reads about** — `docs/` updated, and `legal/` checked separately
- [ ] **Something a user would notice** — an entry in `changelog/`
## Accessibility (for any change to the interface)
- [ ] Everything new can be reached and operated with the keyboard alone
- [ ] Focus is visible, and goes somewhere sensible when the screen changes or a dialog closes
- [ ] Controls that show only a symbol have an accessible name; inputs have labels
- [ ] Nothing is said by colour alone, and a destructive button carries `data-destructive`
- [ ] Checked once with a screen reader, or said here that it was not
<!-- ACCESSIBILITY.md is the statement these keep true. -->
+2 -2
View File
@@ -4,13 +4,13 @@
The latest release gets fixes. The previous minor gets security-only patches for 90 days. There is
no update channel — PipDock does not update itself, so a fix reaches you when you download the new
build from [Releases](https://github.com/poli0981/pipdock/releases).
build from [Releases](https://github.com/poli0981org/pipdock/releases).
## Reporting a vulnerability
**Do not open a public issue.** Use either:
- [GitHub Security Advisories](https://github.com/poli0981/pipdock/security/advisories/new) — preferred
- [GitHub Security Advisories](https://github.com/poli0981org/pipdock/security/advisories/new) — preferred
- `code@poli0981.dev`
Target acknowledgment is 7 days. Coordinated disclosure is preferred; tell us if you have a
+24 -4
View File
@@ -1,8 +1,7 @@
# Dependency updates — docs/RELEASE-CI.md §2.
#
# Dependabot, not Renovate: there is no Renovate configuration anywhere in the poli0981/.github
# ops repo, and that repo ships a dependabot-summary.yml, which makes Dependabot the portfolio
# standard.
# Dependabot, not Renovate: Dependabot was the standard of the owner's ops repo when the CI was
# set up, and it still is across the poli0981org organization.
#
# Weekly grouped PRs per ecosystem, with Code Health's pins kept apart so a tool bump is reviewed
# on its own. Security advisories bypass grouping and schedule — that is Dependabot's default for
@@ -19,6 +18,13 @@
# its Tauri packages into one PR, and ci-node.yml's `tauri lockstep` job fails either PR until its
# counterpart is merged beside it.
#
# **A group's position decides nothing.** Dependabot gives a dependency to the *most specific*
# group that matches it, and a group with `update-types` counts as more specific than one with
# patterns alone: on 2026-11-21 its log read "Skipping tauri-plugin-dialog for group 'tauri' -
# belongs to more specific group 'cargo-minor-patch'", and every Tauri bump of that week (#116,
# #118) landed in the catch-all groups. This file said the order kept them out. What does is
# `exclude-patterns` on each catch-all, below.
#
# The labels below must exist in the repository, or Dependabot opens its PRs without them.
version: 2
@@ -33,12 +39,20 @@ updates:
cooldown:
default-days: 3
semver-major-days: 14
ignore:
# src-tauri takes rfd only because tauri-plugin-dialog already compiles it, and 2.8.4 — the
# newest — still requires rfd ^0.17, so rfd 0.18 alone (#112) would put a second rfd in the
# binary. Remove this when tauri-plugin-dialog moves to rfd 0.18, and bump both together:
# `cargo tree -i rfd --target all` must still show one rfd. (The same ignore, at 0.17, went
# on 2026-11-04 when its own condition was met.)
- dependency-name: rfd
versions: ['>=0.18.0']
groups:
# First, so a Tauri crate never lands in the catch-all group below.
tauri:
patterns: ['tauri', 'tauri-*']
cargo-minor-patch:
update-types: [minor, patch]
exclude-patterns: ['tauri', 'tauri-*']
labels: [dependencies, rust]
- package-ecosystem: npm
@@ -58,8 +72,14 @@ updates:
groups:
tauri:
patterns: ['@tauri-apps/*']
# @vitest/coverage-v8 peers `vitest` at its exact version, so the two must move in one PR —
# majors included, which is why this group names no update-types: a vitest major bumped
# alone fails `npm ci` with ERESOLVE, as the typescript one below would.
vitest:
patterns: ['vitest', '@vitest/*']
npm-minor-patch:
update-types: [minor, patch]
exclude-patterns: ['@tauri-apps/*', 'vitest', '@vitest/*']
labels: [dependencies, frontend]
- package-ecosystem: github-actions
+164
View File
@@ -0,0 +1,164 @@
#!/usr/bin/env python3
"""Post PipDock's release announcements and CI-failure alerts to Discord webhooks.
Vendored on 2026-11-21, when the repository moved to the poli0981org organization: until then the
notifier was a reusable workflow in the owner's personal ops repo (`poli0981/.github`), which checked
out that repo's `main` and ran *its* copy of a script like this one with PipDock's webhooks in the
environment. A project in the organization no longer runs code another account can change, so the
script lives here — adapted from OmniDeck's self-contained notifier.
Standard library only, so the workflow needs no setup step. Every input comes from environment
variables set by `notify.yml`, never from `${{ }}` interpolated into a shell:
release GITHUB_REPOSITORY, GH_TOKEN, TAG, DISCORD_WEBHOOK, DISCORD_WEBHOOK_EXTRA (optional)
failure GITHUB_REPOSITORY, WORKFLOW_NAME, RUN_URL, BRANCH, COMMIT_SHA, COMMIT_MESSAGE, ACTOR,
EVENT, DISCORD_WEBHOOK
A missing webhook (a fork, or a secret not set) is a notice, not a failure. DRY_RUN=1 prints the
payload instead of posting it, which is how the script is checked without telling Discord anything.
"""
from __future__ import annotations
import json
import os
import sys
import urllib.error
import urllib.parse
import urllib.request
COLOR_RELEASE = 0x57F287 # green
COLOR_PRERELEASE = 0xFEE75C # yellow
COLOR_FAILURE = 0xED4245 # red
# Discord's edge rejects Python's default user agent.
USER_AGENT = "PipDock-notify (+https://github.com/poli0981org/pipdock)"
# The release's downloads, in the order a reader wants them: the installer most people need, the
# MSI for managed deployment, and the checksums both are verified against.
ASSET_SUFFIXES = ("_x64-setup.exe", "_x64_en-US.msi", "SHA256SUMS.txt")
def env(name: str) -> str:
return os.environ.get(name, "").strip()
def truncate(text: str, limit: int) -> str:
return text if len(text) <= limit else text[: limit - 1].rstrip() + "…"
def compact(embed: dict) -> dict:
return {key: value for key, value in embed.items() if value}
def get_release(repository: str, tag: str, token: str) -> dict:
url = f"https://api.github.com/repos/{repository}/releases/tags/{urllib.parse.quote(tag, safe='')}"
headers = {
"Accept": "application/vnd.github+json",
"User-Agent": USER_AGENT,
"X-GitHub-Api-Version": "2022-11-28",
}
if token:
headers["Authorization"] = f"Bearer {token}"
with urllib.request.urlopen(urllib.request.Request(url, headers=headers), timeout=20) as response:
return json.load(response)
def downloads(assets: list[dict]) -> str:
lines = []
for suffix in ASSET_SUFFIXES:
asset = next((a for a in assets if a.get("name", "").endswith(suffix)), None)
if asset:
lines.append(f"[{asset['name']}]({asset['browser_download_url']})")
return "\n".join(lines)
def release_payload() -> dict:
repository, tag = env("GITHUB_REPOSITORY"), env("TAG")
if not tag:
raise ValueError("TAG is empty")
release = get_release(repository, tag, env("GH_TOKEN"))
prerelease = bool(release.get("prerelease"))
fields = [{"name": "Type", "value": "Pre-release" if prerelease else "Stable", "inline": True}]
files = downloads(release.get("assets") or [])
if files:
fields.append({"name": "Downloads", "value": files, "inline": False})
embed = {
"title": f"PipDock {tag}" + (" (pre-release)" if prerelease else ""),
"url": release.get("html_url"),
"description": truncate(release.get("body") or "", 1500),
"color": COLOR_PRERELEASE if prerelease else COLOR_RELEASE,
"fields": fields,
"footer": {"text": repository},
"timestamp": release.get("published_at"),
}
return {"username": "Release Bot", "embeds": [compact(embed)]}
def failure_payload() -> dict:
repository, sha = env("GITHUB_REPOSITORY"), env("COMMIT_SHA")
message_lines = env("COMMIT_MESSAGE").splitlines()
commit = f"[{sha[:7]}](https://github.com/{repository}/commit/{sha})" if sha else "?"
embed = {
"title": f"{env('WORKFLOW_NAME') or 'Workflow'} failed: {repository}",
"url": env("RUN_URL"),
"description": truncate(message_lines[0], 300) if message_lines else "",
"color": COLOR_FAILURE,
"fields": [
{"name": "Ref", "value": env("BRANCH") or "?", "inline": True},
{"name": "Event", "value": env("EVENT") or "?", "inline": True},
{"name": "Commit", "value": commit, "inline": True},
{"name": "Actor", "value": env("ACTOR") or "?", "inline": True},
],
"footer": {"text": repository},
}
return {"username": "CI Bot", "embeds": [compact(embed)]}
def post(webhook: str, payload: dict) -> None:
request = urllib.request.Request(
webhook,
data=json.dumps(payload).encode("utf-8"),
headers={"Content-Type": "application/json", "User-Agent": USER_AGENT},
method="POST",
)
with urllib.request.urlopen(request, timeout=20):
pass # urlopen raises HTTPError for any non-2xx answer
def webhooks(kind: str) -> list[str]:
hooks = [env("DISCORD_WEBHOOK")]
if kind == "release":
# The releases channel and the repository's own channel both hear about a release, as they
# did under the ops-repo announcer.
hooks.append(env("DISCORD_WEBHOOK_EXTRA"))
return [hook for hook in hooks if hook]
def main(argv: list[str]) -> int:
if len(argv) != 2 or argv[1] not in ("release", "failure"):
print("usage: discord_notify.py release|failure", file=sys.stderr)
return 2
kind = argv[1]
targets = webhooks(kind)
dry_run = env("DRY_RUN") == "1"
if not targets and not dry_run:
print("::notice::No Discord webhook is available to this run; nothing was posted.")
return 0
try:
payload = release_payload() if kind == "release" else failure_payload()
if dry_run:
print(json.dumps(payload, indent=2, ensure_ascii=False))
return 0
for target in targets:
post(target, payload)
except (urllib.error.URLError, ValueError, KeyError) as error:
# Never print a webhook URL: it is a secret.
print(f"::error::Discord {kind} notification failed: {error}")
return 1
print(f"Posted the {kind} notification to {len(targets)} Discord webhook(s).")
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv))
+154
View File
@@ -0,0 +1,154 @@
/**
* Maintenance-mode triage — run by .github/workflows/triage.yml through actions/github-script.
*
* Since 1.6.0 PipDock takes bug fixes, UI/UX and accessibility problems, wording and translation
* fixes, and dependency and security updates, and no new features (CONTRIBUTING.md, "Scope in
* maintenance mode"). A feature request is labelled `enhancement` and `out-of-scope`, answered in
* English and Vietnamese, and closed as not planned.
*
* **Only on signals that cannot be a bug report**, because closing a real report would be worse
* than leaving a request open: a title that says it is a feature (`[Feature]`, `Feature request:`,
* `[Tính năng]` …), a pull request titled with the Conventional Commits `feat` type the repository
* uses, or the `enhancement` label being put on. Words in a body decide nothing.
*
* **Never** for the owner, members and collaborators, for bots (Dependabot), or for anything
* labelled `policy-exception` — the maintainer's way of keeping open a feature judged truly
* necessary, which the policy allows.
*
* `classify` is pure and tested with `node --test` (triage.test.cjs); `run` is the thin part that
* talks to GitHub.
*/
'use strict'
const MAINTAINERS = new Set(['OWNER', 'MEMBER', 'COLLABORATOR'])
const EXEMPT = 'policy-exception'
const FEATURE_LABEL = 'enhancement'
const OUT_OF_SCOPE = 'out-of-scope'
const POLICY_URL =
'https://github.com/poli0981org/pipdock/blob/main/CONTRIBUTING.md#scope-in-maintenance-mode'
const IDEAS_URL = 'https://github.com/poli0981org/pipdock/discussions/categories/ideas'
/** `[Feature] …`, `[Feature request]: …`, `Feature request: …`, `[Tính năng] …`, `Đề xuất tính năng: …`. */
const FEATURE_TITLE =
/^\s*(?:\[\s*(?:feature(?:\s+request)?|enhancement|request|tính năng|đề xuất(?:\s+tính năng)?)\s*\]|(?:feature\s+request|feature|enhancement|đề xuất tính năng|tính năng mới)\s*:)/iu
/** `feat: …`, `feat(ui): …`, `feat!: …` — the Conventional Commits type this repository uses. */
const FEAT_COMMIT = /^\s*feat(?:\([^)]*\))?!?:/i
/**
* Whether an issue or pull request is a feature request this policy closes.
*
* @param {object} item
* @param {'issue'|'pull_request'} item.kind
* @param {string} item.title
* @param {string[]} item.labels Names of the labels it carries now.
* @param {string} item.association The author's `author_association`.
* @param {boolean} item.authorIsBot
* @param {string} item.state `open` or `closed`.
* @param {string|null} item.addedLabel The label a `labeled` event put on, else null.
* @returns {{close: boolean, reason: string}}
*/
function classify(item) {
if (item.state !== 'open') return { close: false, reason: 'not open' }
if (item.authorIsBot) return { close: false, reason: 'opened by a bot' }
if (MAINTAINERS.has(item.association)) return { close: false, reason: 'opened by a maintainer' }
if (item.labels.includes(EXEMPT)) return { close: false, reason: `labelled ${EXEMPT}` }
if (item.labels.includes(OUT_OF_SCOPE)) return { close: false, reason: 'already handled' }
if (item.addedLabel === FEATURE_LABEL) return { close: true, reason: `labelled ${FEATURE_LABEL}` }
if (item.addedLabel !== null) return { close: false, reason: `labelled ${item.addedLabel}` }
if (item.kind === 'pull_request' && FEAT_COMMIT.test(item.title)) {
return { close: true, reason: 'a feat: pull request' }
}
if (FEATURE_TITLE.test(item.title)) return { close: true, reason: 'titled as a feature request' }
return { close: false, reason: 'not a feature request' }
}
/** The answer left on a closed request, in both of the project's languages. */
function comment(kind) {
const what = kind === 'pull_request' ? 'pull request' : 'issue'
const whatVi = kind === 'pull_request' ? 'Pull request' : 'Issue'
return [
'Thanks for taking the time to write this.',
'',
`PipDock has been in **maintenance mode** since 1.6.0: it takes bug fixes, UI/UX and accessibility problems, wording and translation fixes, and dependency and security updates — and no new features. This ${what} reads as a feature request, so it has been labelled \`${OUT_OF_SCOPE}\` and closed. [CONTRIBUTING.md](${POLICY_URL}) says what is accepted and why.`,
'',
`If it is really a bug or a barrier, say so in a comment and it will be looked at again. If you believe the feature is truly necessary, make the case in [Discussions → Ideas](${IDEAS_URL}).`,
'',
'---',
'',
`Cảm ơn bạn đã dành thời gian viết. Từ bản 1.6.0, PipDock ở **giai đoạn bảo trì**: chỉ nhận sửa lỗi, lỗi UI/UX và khả năng tiếp cận, sửa câu chữ và bản dịch, cập nhật phụ thuộc và bảo mật — không nhận tính năng mới. ${whatVi} này là một đề xuất tính năng, nên đã được gắn nhãn \`${OUT_OF_SCOPE}\` và đóng lại. Nếu đây thật ra là lỗi, hãy bình luận để được xem lại; nếu bạn tin tính năng này thật sự cần thiết, hãy trình bày ở [Discussions → Ideas](${IDEAS_URL}).`,
].join('\n')
}
/** The item an `issues` or `pull_request_target` event is about, in `classify`'s shape. */
function itemOf(payload) {
const kind = payload.pull_request ? 'pull_request' : 'issue'
const raw = payload.pull_request ?? payload.issue
return {
kind,
number: raw.number,
title: raw.title ?? '',
labels: (raw.labels ?? []).map((l) => l.name),
association: raw.author_association ?? 'NONE',
authorIsBot: raw.user?.type === 'Bot',
state: raw.state,
addedLabel: payload.action === 'labeled' ? (payload.label?.name ?? null) : null,
}
}
/** Entry point for actions/github-script. */
async function run({ github, context, core }) {
if (context.eventName === 'workflow_dispatch') {
// A dry run: classify what the inputs describe and say so. Nothing is touched.
const inputs = context.payload.inputs ?? {}
const item = {
kind: inputs.kind === 'pull_request' ? 'pull_request' : 'issue',
title: inputs.title ?? '',
labels: (inputs.labels ?? '').split(',').map((s) => s.trim()).filter(Boolean),
association: inputs.association ?? 'NONE',
authorIsBot: false,
state: 'open',
addedLabel: null,
}
const verdict = classify(item)
core.notice(`${verdict.close ? 'would close' : 'would leave open'}: ${verdict.reason}`)
core.summary.addRaw(`**${verdict.close ? 'Would close' : 'Would leave open'}** — ${verdict.reason}`)
await core.summary.write()
return verdict
}
const item = itemOf(context.payload)
const verdict = classify(item)
core.info(`#${item.number}: ${verdict.close ? 'closing' : 'leaving open'} — ${verdict.reason}`)
if (!verdict.close) return verdict
const { owner, repo } = context.repo
await github.rest.issues.addLabels({
owner,
repo,
issue_number: item.number,
labels: [FEATURE_LABEL, OUT_OF_SCOPE],
})
await github.rest.issues.createComment({
owner,
repo,
issue_number: item.number,
body: comment(item.kind),
})
if (item.kind === 'pull_request') {
await github.rest.pulls.update({ owner, repo, pull_number: item.number, state: 'closed' })
} else {
await github.rest.issues.update({
owner,
repo,
issue_number: item.number,
state: 'closed',
state_reason: 'not_planned',
})
}
return verdict
}
module.exports = { classify, comment, itemOf, run, FEATURE_TITLE, FEAT_COMMIT }
+129
View File
@@ -0,0 +1,129 @@
// `node --test .github/scripts/*.test.cjs` — Node's built-in runner, as for scripts/*.test.mjs.
'use strict'
const assert = require('node:assert/strict')
const { test } = require('node:test')
const { classify, comment, itemOf } = require('./triage.cjs')
const base = {
kind: 'issue',
title: '',
labels: [],
association: 'NONE',
authorIsBot: false,
state: 'open',
addedLabel: null,
}
const item = (over) => ({ ...base, ...over })
test('a title that says it is a feature request is closed, in either language', () => {
for (const title of [
'[Feature] Dark/light theme toggle',
'[Feature request]: conda support',
'[Enhancement] faster search',
'[Request] macOS build',
'Feature request: export to Poetry',
'feature: portable mode',
'[Tính năng] Hỗ trợ conda',
'[Đề xuất tính năng] chế độ portable',
'Đề xuất tính năng: giao diện sáng',
]) {
assert.equal(classify(item({ title })).close, true, title)
}
})
test('a bug report is never closed, whatever words it uses', () => {
for (const title of [
'[Bug]: crash when adding an interpreter',
'The feature to roll back is broken',
'Rollback feature does nothing',
'Request timed out while searching',
'Enhancement of the dock bay stopped working after 1.6.0',
'[Accessibility]: Remove from list has no focus ring',
]) {
assert.equal(classify(item({ title })).close, false, title)
}
})
test('a pull request titled feat: is closed; fix:, docs: and build(deps): are not', () => {
for (const title of ['feat: conda envs', 'feat(ui): light theme', 'feat!: drop pip']) {
assert.equal(classify(item({ kind: 'pull_request', title })).close, true, title)
}
for (const title of ['fix(ui): focus ring', 'docs: typo', 'build(deps): Bump vite', 'i18n(vi): sửa lỗi chính tả']) {
assert.equal(classify(item({ kind: 'pull_request', title })).close, false, title)
}
// An issue titled like a commit is a person's wording, not a commit type.
assert.equal(classify(item({ kind: 'issue', title: 'feat: something' })).close, false)
})
test('putting the enhancement label on closes it; any other label does not', () => {
assert.equal(classify(item({ title: 'Make it faster', addedLabel: 'enhancement' })).close, true)
// A label event is about the label: a feature title already open and now labelled `bug` was
// let through when it was opened, and re-judging it on every label would close it late.
assert.equal(classify(item({ title: '[Feature] x', addedLabel: 'bug' })).close, false)
})
test('maintainers, bots and policy exceptions are never closed', () => {
for (const association of ['OWNER', 'MEMBER', 'COLLABORATOR']) {
assert.equal(classify(item({ title: '[Feature] x', association })).close, false, association)
}
assert.equal(classify(item({ kind: 'pull_request', title: 'feat: x', authorIsBot: true })).close, false)
assert.equal(
classify(item({ title: '[Feature] x', labels: ['policy-exception'], addedLabel: 'enhancement' })).close,
false,
)
})
test('what is closed or already handled is left alone', () => {
assert.equal(classify(item({ title: '[Feature] x', state: 'closed' })).close, false)
assert.equal(classify(item({ title: '[Feature] x', labels: ['out-of-scope'] })).close, false)
})
test('the answer is in both languages and says what kind of item it is', () => {
const pr = comment('pull_request')
assert.match(pr, /This pull request reads as a feature request/)
assert.match(pr, /Pull request này/)
assert.match(pr, /CONTRIBUTING\.md#scope-in-maintenance-mode/)
assert.match(comment('issue'), /This issue reads as a feature request/)
})
test('an event payload becomes an item, the added label included', () => {
const fromIssue = itemOf({
action: 'labeled',
label: { name: 'enhancement' },
issue: {
number: 7,
title: 'Make it faster',
labels: [{ name: 'triage' }, { name: 'enhancement' }],
author_association: 'NONE',
user: { type: 'User' },
state: 'open',
},
})
assert.deepEqual(fromIssue, {
kind: 'issue',
number: 7,
title: 'Make it faster',
labels: ['triage', 'enhancement'],
association: 'NONE',
authorIsBot: false,
state: 'open',
addedLabel: 'enhancement',
})
const fromPr = itemOf({
action: 'opened',
pull_request: {
number: 9,
title: 'feat: x',
labels: [],
author_association: 'FIRST_TIME_CONTRIBUTOR',
user: { type: 'User' },
state: 'open',
},
})
assert.equal(fromPr.kind, 'pull_request')
assert.equal(fromPr.addedLabel, null)
assert.equal(classify(fromPr).close, true)
})
-28
View File
@@ -1,28 +0,0 @@
# Caller into the ops repo's Discord announcer.
#
# docs/RELEASE-CI.md §1 originally described a `notify.yml` cross-posting to six platforms; the
# ops repo has no such workflow. Announcements are Discord-only, via
# poli0981/.github/.github/scripts/discord_notify.py.
name: Announce Release
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Tag to announce (for re-runs)
required: true
type: string
permissions:
contents: read
actions: read
jobs:
announce:
uses: poli0981/.github/.github/workflows/announce-release.yml@main
with:
tag_override: ${{ inputs.tag || '' }}
secrets: inherit
+6 -6
View File
@@ -81,12 +81,12 @@ jobs:
python: ['3.10', '3.14']
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v7
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ matrix.python }}
@@ -100,7 +100,7 @@ jobs:
shell: pwsh
- name: Cache cargo
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry
@@ -400,7 +400,7 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
@@ -408,7 +408,7 @@ jobs:
# Python 3.12.x environment", so a floating `3.12` turns every runner-image Python bump into
# a fixture diff that says nothing about pip or uv. Bump it deliberately, and re-capture.
- name: Setup Python
uses: actions/setup-python@v7
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: '3.12.10'
@@ -429,7 +429,7 @@ jobs:
# (another interpreter, another network, another day's index).
- name: Upload the captured fixtures
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: captured-fixtures
path: |
+73 -25
View File
@@ -1,11 +1,15 @@
# Caller into the ops repo's React reusable, plus local jobs.
# The frontend's checks, all project-local.
#
# The reusable runs Node 24, `npm ci`, then lint / typecheck / test when the matching npm script
# exists, then the build. It has no `npm audit` step, so that gate lives here — see
# docs/RELEASE-CI.md §1.
# Until the move to poli0981org (2026-11-21) the `lint · typecheck · test · build` job was a caller
# into the owner's personal ops repo — `poli0981/.github`'s reusable-web-react.yml, at `@main`,
# unpinned. A project in the organization no longer runs a workflow another account can change, so
# the job's steps live here, pinned like every other action in this repository. Two things went
# with the reusable: the `pages: write` and `id-token: write` grants its always-skipped Pages job
# forced on the caller, and the `dist` artifact nothing downloaded.
#
# It also has no working-directory input, which is why package.json sits at the repo root with
# Vite configured `root: './ui'` (ARCHITECTURE §2).
# package.json still sits at the repository root with Vite's `root: './ui'` (ARCHITECTURE §2). The
# reusable's missing `working-directory` input was the original reason and is gone; SonarCloud,
# Qodana, the scripts below and Tauri's own configuration all assume the root now.
name: CI / Node
@@ -23,22 +27,40 @@ concurrency:
jobs:
web:
# A required check under exactly this name (RELEASE-CI.md §2): renaming it means changing the
# branch protection payload in the same breath.
name: lint · typecheck · test · build
# The reusable declares a Pages-deploy job needing `pages: write` and `id-token: write`. It is
# skipped here (`deploy-pages: false`), but permissions are validated at startup regardless of
# `if:`, so a caller that grants less than the callee declares is rejected before it runs.
# Granted on this job only, not the workflow: the other jobs here never need to write.
permissions:
contents: read
pages: write
id-token: write
uses: poli0981/.github/.github/workflows/reusable-web-react.yml@main
with:
node-version: '24'
package-manager: npm
build-command: npm run build
dist-dir: dist
deploy-pages: false
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '26'
cache: npm
# No install script runs: the only package in the lockfile that has one is fsevents, which
# is macOS-only, and a lifecycle script is how a compromised dependency runs on the runner
# (SonarCloud githubactions:S6505). `npm licences` and `npm audit` never needed them either.
- name: Install
run: npm ci --ignore-scripts
- name: Lint
run: npm run lint
- name: Typecheck
run: npm run typecheck
- name: Test
run: npm test
- name: Build
run: npm run build
audit:
name: npm audit
@@ -46,14 +68,14 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '24'
node-version: '26'
cache: npm
# The audit reads the lockfile; nothing is built, so no install script has a reason to run.
@@ -63,13 +85,39 @@ jobs:
- name: Audit
run: npm audit --audit-level=high
licences:
# The npm half of what deny.toml does for the crates: every package the production build can
# bundle must carry a GPL-3.0-compatible licence (THIRD-PARTY-NOTICES, SECURITY §7). It reads
# package-lock.json and installs nothing.
name: npm licences
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '26'
# The repository's own CI scripts — this checker, and the maintenance-mode triage beside the
# workflows — test themselves with Node's built-in runner, so they need no dependency either.
- name: Test the CI scripts
run: node --test scripts/*.test.mjs .github/scripts/*.test.cjs
- name: Production dependencies under GPL-3.0-compatible licences
run: node scripts/check-licenses.mjs
lockstep:
name: tauri lockstep
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
+7 -8
View File
@@ -1,5 +1,4 @@
# Project-local: the ops repo (poli0981/.github) has no reusable Rust workflow, and only its
# desktop-csharp reusable runs on Windows. See docs/RELEASE-CI.md §1.
# Project-local, like every workflow here since the move to poli0981org (RELEASE-CI.md §1).
#
# Windows runner because the environment-discovery module reads the PEP 514 registry and the `py`
# launcher — a Linux run would skip exactly the code most likely to break.
@@ -29,7 +28,7 @@ jobs:
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
@@ -41,7 +40,7 @@ jobs:
cargo --version
- name: Cache cargo
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry
@@ -70,7 +69,7 @@ jobs:
RUSTUP_TOOLCHAIN: stable
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
@@ -78,7 +77,7 @@ jobs:
# on Node 20, needed a check-run write token, and on a pull request failed only on
# "critical" — so the advisories that turned `main` red in September passed every PR.
- name: Install cargo-audit
uses: taiki-e/install-action@83ac0ad63c0167e6f06796fab0fce28db1bf3db0 # v2.87.22
uses: taiki-e/install-action@4a76afe23f9e08d2d9550fb56e556444e8611d21 # v2.90.4
with:
tool: cargo-audit
@@ -96,12 +95,12 @@ jobs:
RUSTUP_TOOLCHAIN: stable
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install cargo-deny
uses: taiki-e/install-action@83ac0ad63c0167e6f06796fab0fce28db1bf3db0 # v2.87.22
uses: taiki-e/install-action@4a76afe23f9e08d2d9550fb56e556444e8611d21 # v2.90.4
with:
tool: cargo-deny
+41 -19
View File
@@ -1,14 +1,18 @@
# Caller into the ops repo's CodeQL reusable.
# CodeQL, project-local since the move to poli0981org (2026-11-21).
#
# Three languages. **Rust** — CodeQL analyses it without a build (`build-mode: none`, which the
# reusable passes for every language outside its autobuild list); this file said for six releases
# that CodeQL had no Rust support, which stopped being true in 2025. **Actions** — the workflows
# themselves: the class of mistake SonarCloud kept finding by hand (write permissions at workflow
# level, unpinned third-party actions). **JavaScript/TypeScript** — the frontend, and the one
# whose check name `main`'s protection requires, so it keeps its exact name.
# It was a caller into the owner's personal ops repo (`poli0981/.github`'s reusable-codeql.yml, at
# `@main`), whose steps used `github/codeql-action@v4` by tag. The same analysis runs here with the
# action pinned by commit, and the write permission on the one job that uploads.
#
# The reusable notes that repo Settings → Advanced Security → CodeQL "Default setup" must be
# DISABLED, or this advanced-setup workflow is rejected at upload time.
# Three languages, all `build-mode: none`. **Rust** — CodeQL analyses it without a build; this
# file said for six releases that CodeQL had no Rust support, which stopped being true in 2025.
# **Actions** — the workflows themselves: write permissions at workflow level, unpinned
# third-party actions, untrusted input in a `run:`. **JavaScript/TypeScript** — the frontend, and
# a required check under exactly the name `Analyze (javascript-typescript)` (RELEASE-CI.md §2).
# The `category` values are the reusable's, so existing alerts keep their history.
#
# Settings → Advanced Security → CodeQL "Default setup" must stay disabled, or this advanced
# setup is rejected at upload time.
name: CodeQL
@@ -20,18 +24,36 @@ on:
# Weekly, offset off the hour to avoid the top-of-hour scheduling pileup.
- cron: '37 4 * * 1'
# A caller cannot grant a called workflow less than its jobs declare, or the run is rejected before
# it starts. reusable-codeql.yml's analyze job asks for `packages: read` to fetch internal CodeQL
# packs, so omitting it here produced a startup_failure with no logs to explain it — the same
# permissions trap RELEASE-CI.md §1 records, from the other direction.
permissions:
actions: read
contents: read
packages: read
security-events: write
jobs:
analyze:
uses: poli0981/.github/.github/workflows/reusable-codeql.yml@main
with:
languages: '["javascript-typescript", "rust", "actions"]'
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
actions: read
contents: read
packages: read # CodeQL's own query packs
security-events: write # upload the results
strategy:
fail-fast: false
matrix:
language: [javascript-typescript, rust, actions]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
languages: ${{ matrix.language }}
build-mode: none
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
category: /language:${{ matrix.language }}
-29
View File
@@ -1,29 +0,0 @@
# Caller into the ops repo's Discord CI-failure notifier.
#
# **Listed by name.** `workflows: ['*']`, which the ops repo's own example suggests, is not a
# wildcard to `workflow_run`: it matched nothing, so `main` stayed red from 2026-09-23 with every
# failure unreported — the only runs this ever saw were Dependabot's. Adding a workflow means
# adding its `name:` here, exactly.
#
# CodeQL and Release are deliberately absent: the reusable skips workflows with dedicated
# notifiers by name ('odeQL', 'elease', …), so listing them would only create skipped runs.
name: Notify CI Failure
on:
workflow_run:
workflows:
- CI / Rust
- CI / Node
- CI / Integration
- Security scan
types: [completed]
permissions:
contents: read
actions: read
jobs:
notify:
uses: poli0981/.github/.github/workflows/notify-ci-failure.yml@main
secrets: inherit
+98
View File
@@ -0,0 +1,98 @@
# Discord notifications, self-contained in this repository since the move to poli0981org
# (2026-11-21). They were two callers into the owner's personal ops repo, whose notifier checked
# out *that* repo's `main` and ran its script with PipDock's webhooks in the environment; the
# script is vendored now (.github/scripts/discord_notify.py, standard library only).
#
# - ci-failure: a run of a listed workflow failed outside a pull request — a push to `main`, the
# daily or weekly schedule, a dispatch, a release tag -> DISCORD_CI_WEBHOOK. Pull-request runs
# report on the pull request, and a fork's or Dependabot's get no secrets anyway. The filter is
# on the event alone, never on a branch name or a login, which a fork controls. **Triage is the
# one exception**: it runs on `pull_request_target`, against a stranger's pull request, where
# nobody watching can fix it — and a broken triage leaves feature PRs open with nobody told. Its
# name is safe to filter on because a `pull_request_target` run's workflow file comes from the
# base branch, never from the fork; the failure is posted as an embed, which pings nobody.
# - announce: a release was published, or re-announced with a dispatch -> DISCORD_RELEASES_WEBHOOK
# and DISCORD_REPO_WEBHOOK. Publishing the draft (RELEASE-CI.md §3) is done with a person's token,
# which does fire `release: published`; a release published with GITHUB_TOKEN would not.
#
# **The list is by exact `name:`.** `workflows: ['*']`, which the ops repo's own example
# suggested, is not a wildcard to `workflow_run`: it matched nothing, and `main` was red for three
# weeks in September with nobody told. A new workflow is added here by name. Unlike the ops-repo
# reusable, which skipped anything named like CodeQL or Release because they had "dedicated
# notifiers" PipDock never had, CodeQL, Qodana and Release are listed: a failed Release run used
# to reach no channel at all.
name: Notify
on:
workflow_run:
workflows:
- CI / Rust
- CI / Node
- CI / Integration
- CodeQL
- Qodana
- Release
- Security scan
- SonarCloud
- Triage
types: [completed]
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Release tag to announce again (e.g. v1.6.0)
required: true
type: string
permissions:
contents: read
jobs:
ci-failure:
if: >-
github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'failure' &&
github.event.workflow_run.event != 'pull_request' &&
(github.event.workflow_run.event != 'pull_request_target' ||
github.event.workflow_run.name == 'Triage')
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
sparse-checkout: .github/scripts
- name: Post the failure to Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_CI_WEBHOOK }}
WORKFLOW_NAME: ${{ github.event.workflow_run.name }}
RUN_URL: ${{ github.event.workflow_run.html_url }}
BRANCH: ${{ github.event.workflow_run.head_branch }}
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
COMMIT_MESSAGE: ${{ github.event.workflow_run.head_commit.message }}
ACTOR: ${{ github.event.workflow_run.actor.login }}
EVENT: ${{ github.event.workflow_run.event }}
run: python3 .github/scripts/discord_notify.py failure
announce:
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
sparse-checkout: .github/scripts
- name: Announce on Discord
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name || inputs.tag }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELEASES_WEBHOOK }}
DISCORD_WEBHOOK_EXTRA: ${{ secrets.DISCORD_REPO_WEBHOOK }}
run: python3 .github/scripts/discord_notify.py release
+187
View File
@@ -0,0 +1,187 @@
# JetBrains Qodana, in two parts — added 2026-11-21 with the move to poli0981org.
#
# **A monorepo to Qodana.** The repository holds a Rust workspace and a TypeScript frontend, and
# Qodana Cloud has a project for each, with its own token (QODANA_TOKEN_RUST, QODANA_TOKEN_TS_JS)
# and its own configuration (qodana-rust.yaml, qodana-js.yaml): JetBrains' layout for a monorepo.
# The two jobs below never inspect the same file.
#
# **Rust runs in Docker, TypeScript natively.** qodana-rust has no native mode; it is RustRover in
# a Linux container, so `#[cfg(windows)]` code is invisible to it — clippy, CodeQL and SonarQube
# Cloud, all on Windows, cover that. qodana-js runs on the runner after `npm ci`, so it resolves
# the node_modules the build does, with the Node every other workflow uses.
#
# **No token, no analysis**, the way sonar.yml does it: Dependabot's and a fork's pull requests get
# no repository secrets, so their runs are skipped rather than failed.
#
# **No caches** (`use-caches: false`). The repository's Actions cache is near its 10 GB limit, and
# a Qodana cache — an IDE's indexes, and Cargo's registry inside the container — would evict the
# cargo caches the required checks restore. A run is slower for it, and it is not a required
# check (RELEASE-CI.md §2): a failure on `main` reaches Discord through notify.yml.
#
# **Every run is a full scan, and only a new problem fails it.** `pr-mode` is off: a whole scan is
# two to three minutes a part, so analysing only a pull request's files would save little and make
# a result depend on which files happened to change. `.qodana/rust.sarif.json` is the baseline —
# the 62 problems the first real run found, triaged on 2026-11-21 (ROADMAP: two Critical that are
# RustRover misreading what rustc compiles, and 60 Moderate style findings), trimmed to the results
# and their fingerprints. `--fail-threshold 0` then fails on anything outside it. The TypeScript
# half has no baseline because it has no accepted problem: the six it found were fixed.
#
# **Only new problems reach Code scanning**, under `qodana-rust` and `qodana-js` — a baseline
# problem is triaged already, and alerting on it again would bury the next real one.
name: Qodana
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: qodana-${{ github.ref }}
cancel-in-progress: true
jobs:
tokens:
name: tokens present
runs-on: ubuntu-latest
timeout-minutes: 2
outputs:
rust: ${{ steps.check.outputs.rust }}
js: ${{ steps.check.outputs.js }}
steps:
# `secrets` cannot be read in an `if:`, so presence becomes an output. Only the emptiness test
# sees the values; nothing is checked out and nothing else runs.
- name: Check
id: check
env:
RUST: ${{ secrets.QODANA_TOKEN_RUST }}
JS: ${{ secrets.QODANA_TOKEN_TS_JS }}
run: |
for part in RUST JS; do
name=$(echo "$part" | tr '[:upper:]' '[:lower:]')
if [ -n "${!part}" ]; then
echo "$name=true" >> "$GITHUB_OUTPUT"
else
echo "$name=false" >> "$GITHUB_OUTPUT"
echo "::notice::No Qodana token for the $name part in this run (a Dependabot or fork pull request); it is skipped."
fi
done
rust:
name: qodana · rust
needs: tokens
if: needs.tokens.outputs.rust == 'true'
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
checks: write # annotations
pull-requests: write # the summary comment
security-events: write # new problems to Code scanning
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# The pull request's own head, and the history pull-request mode diffs against.
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- name: Qodana
uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_RUST }}
# The container runs as the runner's user, and the image's CARGO_HOME (/usr/local/cargo)
# belongs to root, so `cargo metadata` could not write the registry it downloads and
# RustRover loaded no Cargo project — 0 problems from 0 files analysed. /data/cache is
# the container's mount of the action's cache directory, which this user owns.
CARGO_HOME: /data/cache/cargo-home
with:
args: --config qodana-rust.yaml --linter qodana-rust --baseline .qodana/rust.sarif.json --fail-threshold 0
env-vars-to-linter: CARGO_HOME
pr-mode: false
use-caches: false
upload-result: true
artifact-name: qodana-rust
- name: Keep the problems outside the baseline
id: filter
if: ${{ !cancelled() }}
env:
SARIF: ${{ runner.temp }}/qodana/results/qodana.sarif.json
run: |
if [ ! -f "$SARIF" ]; then echo "::notice::The scan left no SARIF."; exit 0; fi
jq '.runs |= map(.results |= map(select((.baselineState // "new") != "unchanged" and (.baselineState // "new") != "absent")))' \
"$SARIF" > "$RUNNER_TEMP/qodana-rust.sarif"
echo "ready=true" >> "$GITHUB_OUTPUT"
- name: Upload to Code scanning
if: ${{ !cancelled() && steps.filter.outputs.ready == 'true' }}
uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
sarif_file: ${{ runner.temp }}/qodana-rust.sarif
category: qodana-rust
js:
name: qodana · ts/js
needs: tokens
if: needs.tokens.outputs.js == 'true'
runs-on: ubuntu-latest
timeout-minutes: 45
permissions:
contents: read
checks: write # annotations
pull-requests: write # the summary comment
security-events: write # new problems to Code scanning
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '26'
cache: npm
# No install script runs: the only package in the lockfile that has one is fsevents, which
# is macOS-only, and a lifecycle script is how a compromised dependency runs on the runner
# (SonarCloud githubactions:S6505). `npm licences` and `npm audit` never needed them either.
- name: Install
run: npm ci --ignore-scripts
- name: Qodana
uses: JetBrains/qodana-action@3e8d76ff0e0241618abd808682f426afe84bab3f # v2026.2.2
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_TS_JS }}
with:
args: --config qodana-js.yaml --linter qodana-js --within-docker false --fail-threshold 0
pr-mode: false
use-caches: false
upload-result: true
artifact-name: qodana-js
- name: Keep the problems outside the baseline
id: filter
if: ${{ !cancelled() }}
env:
SARIF: ${{ runner.temp }}/qodana/results/qodana.sarif.json
run: |
if [ ! -f "$SARIF" ]; then echo "::notice::The scan left no SARIF."; exit 0; fi
jq '.runs |= map(.results |= map(select((.baselineState // "new") != "unchanged" and (.baselineState // "new") != "absent")))' \
"$SARIF" > "$RUNNER_TEMP/qodana-js.sarif"
echo "ready=true" >> "$GITHUB_OUTPUT"
- name: Upload to Code scanning
if: ${{ !cancelled() && steps.filter.outputs.ready == 'true' }}
uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
sarif_file: ${{ runner.temp }}/qodana-js.sarif
category: qodana-js
+18 -12
View File
@@ -1,8 +1,8 @@
# Project-local: the ops repo has no reusable Tauri/build workflow (docs/RELEASE-CI.md §1).
# Project-local, like every workflow here (RELEASE-CI.md §1).
#
# Builds the NSIS .exe and .msi, attests where they were built, publishes SHA256SUMS.txt and leaves
# a DRAFT release. Publishing is a separate, human-directed step (RELEASE-CI.md §3.4), and
# announce-release.yml fires on `release: published`.
# notify.yml's announcement fires on `release: published`.
#
# **Two jobs, so the token that can write releases never runs the build.** Building executes
# third-party code — every crate's build script, every npm package's — and gets a read-only token
@@ -54,7 +54,7 @@ jobs:
tag: ${{ steps.version.outputs.tag }}
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.tag || github.ref }}
persist-credentials: false
@@ -92,13 +92,13 @@ jobs:
"tag=v$v" >> $env:GITHUB_OUTPUT
- name: Setup Node.js
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '24'
node-version: '26'
cache: npm
- name: Cache cargo
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry
@@ -107,8 +107,12 @@ jobs:
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}
restore-keys: ${{ runner.os }}-cargo-release-
# No install script runs: the only package in the lockfile that has one is fsevents, which
# is macOS-only, and a lifecycle script is how a compromised dependency runs on the runner
# (SonarCloud githubactions:S6505). The bundle does not need them: Tauri's CLI arrives as
# an optional platform package, not a download in a postinstall.
- name: Install frontend dependencies
run: npm ci
run: npm ci --ignore-scripts
# One script owns the recipe (`package.json` → `bundle`), so the workflow cannot drift
# from what a developer runs locally. It stages the CLI sidecar, then bundles with the
@@ -149,7 +153,7 @@ jobs:
Get-Content release-artifacts\SHA256SUMS.txt
- name: Upload the build
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: release-artifacts
path: release-artifacts/*
@@ -167,15 +171,17 @@ jobs:
attestations: write
steps:
- name: Download the build
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: release-artifacts
path: release-artifacts
# Build provenance for the two installers: `gh attestation verify <file> --repo
# poli0981/pipdock` proves an installer came from this workflow, at this commit — which a
# poli0981org/pipdock` proves an installer came from this workflow, at this commit — which a
# checksum published beside the file cannot, since whoever could replace one could replace
# both.
# both. An attestation stays with the account that made it: those of 1.4.0 and 1.5.0, made
# before the repository moved to the organization, verify with `--owner poli0981
# --signer-repo poli0981/pipdock` and no longer with any `--repo` (README, Install).
- name: Attest provenance
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
@@ -184,7 +190,7 @@ jobs:
release-artifacts/*.msi
- name: Draft GitHub release
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
uses: softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3.0.4
with:
tag_name: ${{ needs.build.outputs.tag }}
draft: true # reviewed, then published; publishing triggers the announcement
+5 -5
View File
@@ -28,12 +28,12 @@ jobs:
RUSTUP_TOOLCHAIN: stable
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install cargo-audit
uses: taiki-e/install-action@83ac0ad63c0167e6f06796fab0fce28db1bf3db0 # v2.87.22
uses: taiki-e/install-action@4a76afe23f9e08d2d9550fb56e556444e8611d21 # v2.90.4
with:
tool: cargo-audit
@@ -46,14 +46,14 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '24'
node-version: '26'
cache: npm
# Nothing is built here, so no package's install script has a reason to run.
+151
View File
@@ -0,0 +1,151 @@
# SonarQube Cloud, CI-based. sonar-project.properties says what is analysed, and why this replaced
# automatic analysis: that could not build, so it saw no Rust and imported no coverage.
#
# **One Windows job**, for the reason ci-rust.yml is on Windows: the Rust suite exercises the PEP 514
# registry and the `py` launcher, so coverage measured on Linux would be coverage of a different
# program. Scanning on the runner that produced the reports also means both LCOV files name paths
# the scanner can resolve, with nothing rewritten in between.
#
# **The token reaches one step.** Producing the reports runs third-party code — every crate's build
# script, every npm package's — so SONAR_TOKEN is in no environment but the scanner's, the same
# reasoning that keeps release.yml's write token away from its build.
#
# **No token, no analysis.** Dependabot's pull requests are given Dependabot secrets only, and a
# fork's none, so on those `secrets.SONAR_TOKEN` is empty and the job is skipped instead of failing
# on a missing token. Adding SONAR_TOKEN as a Dependabot secret as well brings their PRs back in.
#
# Not a required check. The quality gate is still reported as SonarCloud's own check on the PR, and
# `sonar.qualitygate.wait` makes this job fail with it — which is what lets a red gate on `main`
# reach Discord through notify-ci-failure.yml, where this workflow is listed by name.
name: SonarCloud
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: sonar-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
# ci-rust.yml's, so the clippy run below matches the fingerprints in the cache it restores.
RUSTFLAGS: -D warnings
jobs:
token:
name: token present
runs-on: ubuntu-latest
timeout-minutes: 2
outputs:
present: ${{ steps.check.outputs.present }}
steps:
# `secrets` cannot be read in an `if:`, so its presence is turned into an output here. Only
# the emptiness test sees the value; nothing is checked out and nothing else runs.
- name: Check
id: check
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
if [ -n "$SONAR_TOKEN" ]; then
echo "present=true" >> "$GITHUB_OUTPUT"
else
echo "present=false" >> "$GITHUB_OUTPUT"
echo "::notice::No SONAR_TOKEN for this run (a Dependabot or fork pull request); the analysis is skipped."
fi
analyze:
name: coverage · analysis
needs: token
# A dispatch from any branch but `main` would be a *branch* analysis, which this organization's
# plan does not offer: the report uploads, and then the gate check fails with "not allowed to
# access data from non main branches" (tried 2026-10-25). Pull requests and `main` are the two
# analyses there are.
if: >-
needs.token.outputs.present == 'true' &&
(github.event_name != 'workflow_dispatch' || github.ref == 'refs/heads/main')
runs-on: windows-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# Full history: new code is decided by blame, and a shallow clone has none to give.
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '26'
cache: npm
# No install script runs: the only package in the lockfile that has one is fsevents, which
# is macOS-only, and a lifecycle script is how a compromised dependency runs on the runner
# (SonarCloud githubactions:S6505). `npm licences` and `npm audit` never needed them either.
- name: Install frontend dependencies
run: npm ci --ignore-scripts
- name: TypeScript coverage
run: npm run test:coverage
# Restore only, from ci-rust.yml's key. The registry and clippy's build are reused from it;
# the instrumented build lands in target/llvm-cov-target and is rebuilt every run, because
# saving a fourth multi-GB cargo cache would evict the three the required checks depend on.
- name: Restore cargo cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}
restore-keys: ${{ runner.os }}-cargo-
# For the toolchain rust-toolchain.toml pins, which installs itself on the first cargo call;
# adding the component there instead would make every contributor download it.
- name: Add llvm-tools
run: rustup component add llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@4a76afe23f9e08d2d9550fb56e556444e8611d21 # v2.90.4
with:
tool: cargo-llvm-cov
- name: Rust coverage
run: cargo llvm-cov --workspace --locked --lcov --output-path target/lcov-rust.info
# The same invocation as ci-rust.yml's gate, as JSON. That job is what fails on a finding;
# this one only records it, so a red clippy still leaves a report for the scanner to import.
- name: Clippy report
shell: pwsh
run: |
cargo clippy --workspace --all-targets --locked --message-format=json -- -D warnings |
Out-File -Encoding utf8NoBOM target/clippy.json
exit 0
# package.json is one of the five places the version lives, and a tag cannot be pushed while
# they disagree (release.yml), so any of them would do. Checked against a version's shape
# because it is spliced into the scanner's argv below, in the step that holds the token.
- name: Project version
id: version
shell: pwsh
run: |
$v = (Get-Content package.json -Raw | ConvertFrom-Json).version
if ($v -notmatch '^\d+\.\d+\.\d+(-[0-9A-Za-z.]+)?$') { throw "package.json version '$v' is not a version" }
"version=$v" >> $env:GITHUB_OUTPUT
- name: Scan
uses: SonarSource/sonarqube-scan-action@59202af334b4ba7b5db01b701b8e79f8b3bef0f4 # v8.5.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.projectVersion=${{ steps.version.outputs.version }}
-Dsonar.qualitygate.wait=true
+71
View File
@@ -0,0 +1,71 @@
# Maintenance-mode triage, from 1.6.0 (CONTRIBUTING.md, "Scope in maintenance mode").
#
# A feature request — titled as one, a `feat:` pull request, or labelled `enhancement` — is labelled
# `enhancement` and `out-of-scope`, answered in English and Vietnamese, and closed as not planned.
# Never one opened by a maintainer or a bot, or labelled `policy-exception`, the maintainer's way of
# keeping open a feature judged truly necessary. .github/scripts/triage.cjs holds the rules and says
# why they are only ever the unmistakable ones; its tests run in ci-node.yml's `npm licences` job.
#
# **`pull_request_target` checks out the base branch and nothing else.** That event runs with a
# write token even for a fork's pull request, which is the reason it is used here — a plain
# `pull_request` from a fork gets a read-only token and could not label or close anything — and
# exactly why nothing from the pull request is checked out or executed: the script reads the
# event's title and labels as data.
#
# `workflow_dispatch` is a dry run: it classifies the title and labels it is given and touches
# nothing, which is how the rules are tried without opening a public issue.
name: Triage
on:
issues:
types: [opened, labeled]
pull_request_target:
types: [opened, labeled]
workflow_dispatch:
inputs:
kind:
description: What to classify
type: choice
options: [issue, pull_request]
default: issue
title:
description: Its title
required: true
type: string
labels:
description: Its labels, comma-separated
required: false
type: string
default: ''
association:
description: The author's association
type: choice
options: [NONE, CONTRIBUTOR, FIRST_TIME_CONTRIBUTOR, COLLABORATOR, MEMBER, OWNER]
default: NONE
permissions:
contents: read
jobs:
policy:
name: maintenance policy
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
issues: write # label, comment, close
pull-requests: write # the same on a pull request
steps:
- name: Checkout the base branch's scripts
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
sparse-checkout: .github/scripts
- name: Apply the policy
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const triage = require('./.github/scripts/triage.cjs')
await triage.run({ github, context, core })
+5 -3
View File
@@ -8,6 +8,8 @@ node_modules/
dist/
dist-ssr/
.vite/
# `npm run test:coverage` (vitest's LCOV, read by sonar.yml).
/coverage/
*.tsbuildinfo
# Tauri build output
@@ -16,9 +18,9 @@ dist-ssr/
# Environments (test venvs created by the integration suite / spikes)
.venv/
venv/
# Scratch venvs for verifying by hand. Note that the GUI will only ever *see* one named exactly
# `.venv`, `venv`, `env` or `.env` in the working directory — `envs::venv_scan` matches that fixed
# list and `env_add_manual` (Browse…) is still owed — so a suffixed one here is CLI-only.
# Scratch venvs for verifying by hand. Discovery only *finds* one named exactly `.venv`, `venv`,
# `env` or `.env` in the working directory (`envs::venv_scan`'s fixed list); a suffixed one here has
# to be added — Add interpreter… in the GUI, `pipdock env add` in the CLI.
/.venv-*/
__pycache__/
*.py[cod]
+1 -1
View File
@@ -1 +1 @@
24
26
File diff suppressed because it is too large. Load diff
+210
View File
@@ -0,0 +1,210 @@
# Accessibility
PipDock is meant to be usable by someone who uses a keyboard and no mouse, by someone who uses a
screen reader, and by someone who needs high contrast or larger text. This document says what that
means in practice, what has actually been tested and what has not, what is known not to work, and
how to tell us when something gets in your way.
**If you have hit a barrier, skip to [Reporting a barrier](#reporting-a-barrier).** You do not need
a GitHub account, and you do not need to diagnose the problem first.
## What we are working toward
The target is [WCAG 2.2](https://www.w3.org/TR/WCAG22/) Level AA, applied to a desktop application
and a command-line tool.
**This is a target, not a conformance claim.** PipDock has not been audited by anyone independent,
and the sections below list things that are known to fall short. What it has is a set of rules the
code is held to, tests that hold some of them, and one person's hands-on testing.
The priorities, in the order they are defended:
1. **Everything works from the keyboard.** No function needs a pointer.
2. **A screen reader is told what is on screen and what just changed.**
3. **Nothing is said by colour alone**, and text has enough contrast to read.
4. **The system's own settings are respected** — contrast themes, reduced motion, language.
## What is supported
### Keyboard
Every control is reachable and operable from the keyboard. The focus ring is a 2 px outline and is
never removed.
| Keys | What they do |
|---|---|
| `Tab` / `Shift+Tab` | Move between controls. In the package table each row is one stop |
| `Ctrl+1` … `Ctrl+9` | Go to a sidebar tab, by key position (works on layouts where digits need Shift) |
| `Ctrl+K` | Open the command palette; type to filter, `↑` `↓` to move, `Enter` to run, `Esc` to close |
| `/` | Go to Search and put the cursor in its field |
| `Space` | On a package row: select or deselect it |
| `Ctrl+A` | In the package table: select every row the screen is showing |
| `Enter` | On a package row: pin or unpin it. Never removes anything |
| `←` `→` | On a package row: move through its buttons (dependencies, pin, remove) |
| `←` `→` `Home` `End` | In Code Health: move between the tool tabs |
| `←` `→` `↑` `↓` | In a version conflict: move between *Keep compatible*, *Skip* and *Force latest*. Nothing is chosen until you press `Space` or `Enter` |
| `Esc` | Close a dialog, the palette or the console drawer; inside a package row, return to the row |
When the screen changes — a new tab, a plan's preview, its summary, the dependency view — focus
moves to the new screen's heading. So it does when *Remove from list* takes away the row whose
button you pressed (1.6.0). When a dialog, the palette or the console drawer closes, focus
returns to what opened it. A button that is busy after you press it stays where focus is. Every
confirmation that removes, forces or rewrites something opens with focus on **Cancel**.
The full map and the reasoning behind it are in [`docs/UI-SPEC.md`](docs/UI-SPEC.md) §8.
### Screen readers
- Each screen has landmarks (header, navigation, main, footer) and one top-level heading.
- The package table is exposed as a grid with column headers, a row count and selection state.
- Buttons that show only a symbol have names. Status chips say what they mean in text.
- Dialogs are named by their heading and described by their body.
- A run announces its progress ("3 of 15 complete") once, not once per output line. Search
announces that it is searching, how many results came back, and when nothing matched.
- On Environments, adding or removing an interpreter is said in a status line ("Added … to the
list."). *Remove from list* is named with the path it removes, beginning with the words on the
button. The file picker *Add interpreter…* opens is Windows' own dialog, with Windows' own
accessibility.
- Error messages are announced when they appear, and carry a code (`PD-XXX-000`) you can quote.
- The interface is in English and Vietnamese, and the document language follows the one in use.
### High contrast
Under a Windows contrast theme (forced colours), every colour in the interface is replaced by the
system's own. Because that removes every tint, the things a tint used to say are drawn another way:
destructive buttons get a double border, and the selected row, the selected search result and the
current sidebar tab get an outline.
PipDock follows the Windows display scale (Settings → Display → Scale), which enlarges the whole
window. It has no zoom of its own yet — see the limitations below.
### Colour, contrast and motion
- Text and status chips are checked against their backgrounds for at least 4.5:1 by a test that
runs on every change. Status is always a word or a symbol as well as a colour.
- There is no animation in the interface. `prefers-reduced-motion` is honoured for anything that
is ever added.
### The command line
`pipdock` prints plain text with no colour, no spinners and no lines that rewrite themselves. Every
command takes `--json` for one machine-readable document on standard output and `--quiet` to drop
progress; prompts, progress and warnings go to standard error; failures use documented exit codes.
Most of what the GUI does is available there — [`docs/CLI-GUIDE.md`](docs/CLI-GUIDE.md) lists the
few things that are not — so it is often a workable alternative while a GUI barrier is being fixed.
## What has been tested, and how
Honesty about this matters more than a long list.
| What | How | By whom, when |
|---|---|---|
| Every main flow with the mouse unplugged | By hand, on the installed 1.4.0 build, Windows 11 | The maintainer, November 2026. No blocking problem found |
| The same flows with Narrator | By hand, on the installed 1.4.0 build, Windows 11 | The maintainer, November 2026. No blocking problem found |
| Structure: roles, names, required parts | [axe-core](https://github.com/dequelabs/axe-core) over every screen, on every change | Automated, from 1.5.0 |
| Keyboard behaviour and where focus goes | Unit tests, on every change | Automated |
| Text contrast | Computed from the design tokens, on every change | Automated |
| Where focus goes, what the accessibility tree exposes, forced colours | In the installed build, driven by real key presses over the webview's debugging port, with forced colours emulated | During the 1.5.0 release. It found defects no test had; all are fixed |
**Not tested, and said so rather than implied:**
- **Narrator has not been run again on 1.5.0 or 1.6.0.** 1.5.0 changed what a screen reader hears
in several places (see the [changelog](changelog/1.x.md)), and 1.6.0 added *Add interpreter…* and
*Remove from list*. Those were checked against the accessibility tree, which says what is
exposed — not against speech, which is what you hear.
- **NVDA and JAWS** have not been used with PipDock at all. Reports from people who use them are
especially welcome.
- **Each Windows contrast theme by hand.** Forced colours were emulated; the four built-in themes
were not each switched on.
- **Windows 10.** PipDock supports it, and the testing above was on Windows 11.
- **The installers.** The setup program and the MSI are produced by NSIS and WiX, and their
accessibility is whatever those tools provide. It has not been assessed.
- Voice control, switch access and screen magnifiers.
## Known limitations
These are real, they are tracked in [`docs/ROADMAP.md`](docs/ROADMAP.md) under *Audit backlog*, and
where there is a workaround it is given.
- **One theme.** The interface is dark, with no light theme. A Windows contrast theme, light ones
included, replaces every colour.
- **The package table is one tab stop per row.** There is no `↑` / `↓` between rows yet, so
passing a long table by `Tab` is slow. *Workaround:* `Ctrl+1` … `Ctrl+9` jump past it, and the
Updates tab lists only what is outdated.
- **Only the rows on screen exist.** The table draws about 25 rows at a time, so a screen reader's
own "list all rows" finds only those. The row count and each row's position are exposed.
- **Live output is not read line by line.** The console drawer shows an engine's output as it
arrives and deliberately does not announce it; progress is announced instead. The text is there
to read at your own pace.
- **Some announcements are unverified.** A few status messages appear together with the part of
the screen that carries them, and several errors can appear at once after a failed batch.
Whether a screen reader says them, and in what order, has not been confirmed on 1.5.0.
- **A few failures say nothing.** If saving a report, copying to the clipboard or opening a file
picker fails, the screen does not change. Nothing is lost, but nothing tells you either.
- **Why a control is disabled is sometimes only in a tooltip**, which a keyboard cannot reach
because a disabled control cannot be focused.
- **No zoom inside the application.** It was built for 1.5.0 and held back: at 200 % in the
default window the package-name column collapsed to nothing and the last sidebar tabs were cut
off, which is worse than no zoom. *Workaround:* the Windows display scale enlarges everything
correctly.
- **Long paths and package names are cut off** rather than wrapped in a few places, most of all
in a narrow window.
- **Dates and sizes are not formatted for the interface language.**
- **`Ctrl+K` is matched by the letter the layout types**, unlike the digit shortcuts, so it moves
on a layout where K is elsewhere.
- **The legal documents open in your browser**, on GitHub, rather than inside the application.
## Reporting a barrier
Either of these reaches the same person:
- **[Open an accessibility issue](https://github.com/poli0981org/pipdock/issues/new?template=accessibility.yml)**
on GitHub, or
- write to **[accessibility@poli0981.dev](mailto:accessibility@poli0981.dev)** — no account needed.
Write in English or Vietnamese — tiếng Việt cũng được. It helps to include:
- what you were trying to do, and what happened instead;
- the PipDock version (**About → This build**) and your Windows version;
- the assistive technology you use and its version, if any — Narrator, NVDA, a contrast theme,
display scale, keyboard only;
- whether it stops you completely or slows you down.
You do not have to work out the cause, name a WCAG criterion or propose a fix. "I could not get
past the first screen" is a complete report.
### What happens next
- **You get an answer within 7 days**, the same commitment as for security reports.
- A barrier that stops someone using PipDock is treated as a bug of the highest priority and goes
into the next release. Others are scheduled like any other defect and recorded in the roadmap.
- If there is a workaround — often the command line — you will be told what it is straight away.
- You will be told when a fix ships, and asked whether it worked for you.
**There is no fixed deadline for a fix.** PipDock is made by one person, and a promised date that
slips is worse than none. What is promised is the answer, the priority, and that a report is never
closed as "works for me" without being tried the way you described it.
## For contributors
A change to the interface is not finished until it works without a mouse.
[`CONTRIBUTING.md`](CONTRIBUTING.md) has the checklist, and the pull request template repeats it.
In short: reach it and operate it by keyboard, keep the focus ring, put focus somewhere sensible
when the screen changes, name anything that shows only a symbol, never say something by colour
alone, mark a destructive button `data-destructive`, add copy in both languages, and keep
`npm test` green — it runs axe over every screen.
## Ownership
Accessibility reports go to the maintainer, [@poli0981](https://github.com/poli0981), who triages
them, keeps the list of known limitations above true, and updates this document with each release
that changes it.
Last reviewed: 2026-11-10, for PipDock 1.5.0.
---
The structure of this document follows the
[Accessibility Toolkit's `ACCESSIBILITY.md`](https://github.com/open-source-accessibility/accessibility-toolkit/blob/main/ACCESSIBILITY.md)
(MIT), following GitHub's
[guide to accessibility in open source](https://opensource.guide/accessibility-best-practices-for-your-project/).
+121 -24
View File
@@ -1,7 +1,7 @@
# PipDock — working notes for Claude
Windows GUI + CLI for bulk-managing Python packages. Tauri 2 + Rust core + React 19.
Repo `poli0981/pipdock` · GPL-3.0-only · **Status: 1.4.0. M1, M2, Phase 3, Phase 4, the P1 wave, the Security tab and the dependency view are all complete.** 1.0.0 shipped the release pipeline, a protected `main`, the manual charter and legal documents that match the code; 1.1.0 added pin auto-suggest, requirements export/import, the cache manager and the `Ctrl+K` palette; 1.2.0 added the Security tab (PRD P1-1); 1.3.0 added the dependency view (P1-6), which is a *mode of the package screen* rather than a tab and adds no runtime dependency — read its ROADMAP record before touching `graph/`, because the shape of the screen is a consequence of measurements rather than of taste. 1.4.0 added no feature: it is the audit release — about 170 findings, every Critical and High fixed with a test that failed first, and the rest in ROADMAP's **Audit backlog**, with file:line and a reason each. Read that table before starting a slice; most of what is wrong with the codebase is already written down there. **What is left of Post-1.0 is one thing** — the scheduled check (P1-7) — and `docs/ROADMAP.md` now carries the survey of what blocks it, which for two versions it was cited for and did not contain: no toast component, no notification/autostart/tray plugin, nothing on a timer, and no surface that can report a background failure.
Repo `poli0981org/pipdock` (moved from `poli0981/pipdock` on 2026-11-21) · GPL-3.0-only · **Status: 1.6.0, and in maintenance mode since that release.** M1, M2, Phase 3, Phase 4, the P1 wave, the Security tab and the dependency view are all complete, and 1.6.0 closed the last P0 gap, *Browse…* (`env_add_manual`). **Read ROADMAP's *Maintenance mode* section before starting anything**: dependency, security, major-upgrade, defect and wording work is taken; features are not, and `triage.yml` closes requests for them. 1.0.0 shipped the release pipeline, a protected `main`, the manual charter and legal documents that match the code; 1.1.0 added pin auto-suggest, requirements export/import, the cache manager and the `Ctrl+K` palette; 1.2.0 added the Security tab (PRD P1-1); 1.3.0 added the dependency view (P1-6), which is a *mode of the package screen* rather than a tab and adds no runtime dependency — read its ROADMAP record before touching `graph/`, because the shape of the screen is a consequence of measurements rather than of taste. 1.4.0 added no feature: it is the audit release — about 170 findings, every Critical and High fixed with a test that failed first, and the rest in ROADMAP's **Audit backlog**, with file:line and a reason each. Read that table before starting a slice; most of what is wrong with the codebase is already written down there. 1.5.0 added no feature either: it is the accessibility pass (backlog U45, U47, U48) — focus, names, keyboard patterns and high contrast, axe-core in the suite, and `ACCESSIBILITY.md`, which is a *record of what was tested* and has to be kept true like one. 1.6.0 added *Add interpreter…* (GUI) and `pipdock env add`/`env remove` (CLI) over a `manual_envs` table and `envs::validate_interpreter`, moved the repository to the poli0981org organization with CI that calls nothing outside it, and put the project in maintenance mode. **Nothing is left of Post-1.0**: the scheduled check (P1-7) was closed as not planned, for the reasons ROADMAP's survey of it gives — no toast component, no notification/autostart/tray plugin, nothing on a timer, and no surface that can report a background failure.
## Read the docs before changing anything
@@ -47,7 +47,8 @@ failed package never aborts a batch (skip-and-continue, then a `"13 successful,
`--dry-run --report -` crashes on Windows/cp1252 (pip 25 *and* 26), data-dependently.
8. **uv writes its plan to stderr**, so classify errors only after a plan-parse attempt.
9. **`env_hash` lowercases the interpreter path on Windows**, or one env splits its pins and
snapshots in two.
snapshots in two — and since 1.6.0 stops at a venv's own `python.exe`, or a `--symlinks` venv
files its pins and snapshots under the Python it was made from.
10. **PipDock enforces `Requires-Python` itself** (`src/compat.rs`) — the engines disagree, and the
preview must not depend on which one is selected.
@@ -64,9 +65,9 @@ failed package never aborts a batch (skip-and-continue, then a `"13 successful,
- Crates `pipdock-*`; React components prefixed `Pd` (`PdPackageRow`, `PdConflictRow`)
- Tauri identifier `com.skullmute.pipdock`; CLI binary `pipdock`
- Frontend lives in `ui/`, but `package.json` sits at the **repo root** so the ops-repo
`reusable-web-react.yml` (which has no `working-directory` input) works unmodified; Vite is
configured with `root: './ui'`
- Frontend lives in `ui/`, but `package.json` sits at the **repo root** — first for the ops
repo's reusable CI workflow, which had no `working-directory` input, and now because SonarCloud,
Qodana, the scripts and Tauri's config all assume it; Vite is configured with `root: './ui'`
- Rust ↔ TS types are generated by `cargo run -p xtask -- bindings` over `schemars` — never
hand-mirror a type. (ARCHITECTURE §9 originally said `specta`/`tauri-specta`; `bindings.rs` records
why it is not, and drift is a `cargo test` failure rather than a compile error)
@@ -74,21 +75,54 @@ failed package never aborts a batch (skip-and-continue, then a `"13 successful,
## CI reality
`docs/RELEASE-CI.md` is authoritative *as corrected*: the ops repo `poli0981/.github` has **no
reusable Rust or Tauri workflow**, its notifiers are **Discord-only**, dependency bumps are
**Dependabot** (not Renovate), and its CodeQL reusable *lists* no Rust but passes `languages`
straight to codeql-action, which analyses Rust and Actions without a build — `codeql.yml` asks for
both. So `ci-rust.yml`, `release.yml` and `security-scan.yml` are project-local; `ci-node.yml`,
`codeql.yml` and the notifiers are callers. Every caller needs an explicit `permissions:` block —
callers without one default to `none` — and a write permission belongs on the job that needs it,
not the workflow.
`docs/RELEASE-CI.md` is authoritative. **Every workflow is project-local since 2026-11-21**, when
the repository moved to the poli0981org organization: `ci-node.yml`'s web job, `codeql.yml` and the
Discord notifier were callers into the owner's personal ops repo (`poli0981/.github`, at `@main`)
until then, and a project in the organization no longer runs code another account can change.
**Every action is pinned by commit** with its version in a comment, GitHub's own included, and a
write permission belongs on the job that needs it, not the workflow. Dependency bumps are
**Dependabot** (not Renovate); notifications are **Discord-only**, through the vendored
`.github/scripts/discord_notify.py` (`DRY_RUN=1` prints instead of posting).
**`notify-ci-failure.yml` lists its workflows by name, and a new workflow has to be added to it.**
`workflows: ['*']` — the ops repo's own example — is not a wildcard to `workflow_run`: it matched
**Eight checks are required on `main`** — `fmt · clippy · test`, `cargo audit`, `cargo deny`,
`lint · typecheck · test · build`, `npm audit`, `npm licences`, `tauri lockstep`,
`Analyze (javascript-typescript)` — and a required name is this repository's own now, so renaming a
job means changing the protection payload in the same change (RELEASE-CI §2). `npm licences` is the
npm half of `deny.toml`: `scripts/check-licenses.mjs` with the same allowlist, entry for entry.
**`notify.yml` lists its workflows by name, and a new workflow has to be added to it.**
`workflows: ['*']` — the ops repo's old example — is not a wildcard to `workflow_run`: it matched
nothing, and `main` was red from 2026-09-23 for three weeks with no one told. Start any CI
question with `gh run list --branch main`, and remember that `security-scan.yml` exists for the
case no PR will catch: an advisory against something already merged.
**Dependabot gives a dependency to the *most specific* group, not the first.** A group with
`update-types` beats one with patterns alone, so the `tauri` groups caught nothing until the
catch-alls got `exclude-patterns` (2026-11-21); the order of groups in `dependabot.yml` decides
nothing. Its log says which group took what ("belongs to more specific group").
**Qodana runs as two Qodana Cloud projects** — `qodana-rust.yaml` (RustRover in Docker; it cannot
see `#[cfg(windows)]` code) and `qodana-js.yaml` (WebStorm, native), one token each — and is not a
required check. A new workflow cannot be dispatched before it exists on `main`, so a workflow's
first full run happens in its own PR.
**An attestation stays with the account that made it.** After the transfer, 1.4.0 and 1.5.0 verify
only with `gh attestation verify <file> --owner poli0981 --signer-repo poli0981/pipdock`; every
`--repo` form returns 404 for them. 1.6.0 on verifies with `--repo poli0981org/pipdock`.
**SonarQube Cloud is CI-based since 2026-10-25** — `sonar.yml` and `sonar-project.properties`;
since 2026-11-21 the project is `poli0981org_pipdock` in the `poli0981org` organization (the old
`poli0981_pipdock` keeps the history to 1.5.0). Automatic analysis is off in the project's settings
and must stay off, or the CI analysis is refused. Automatic analysis never analysed a line of Rust and imported no coverage, which is why it
went. The gate's "new code" is *previous version*, with the version from `package.json`, and a
bump takes effect **one analysis late**: the analysis that first sent `1.4.0` still measured from
2026-09-27, and the next measured from the last analysis of the version before it (2026-10-20,
`a314689`). So the merge carrying a release bump is gated on the whole previous period, and
`periods` in `api/qualitygates/project_status` says which baseline a gate used. New code needs
80 % coverage and no new issue, so a slice whose new lines no test reaches turns `main`'s gate red,
and so does a `std::fs` call inside an `async fn` (`rust:S7493`) or a tracing field named
`message` (`rust:S6677`). Dependabot PRs have no `SONAR_TOKEN` and skip the analysis.
## Current state
**M1 and M2 complete** (IPC bridge 2026-07-30; Installed+Updates, the mutation spine
@@ -124,10 +158,11 @@ wrong; the record says why). P1 closed **P0-10**: pip's version is on every Envi
screen, the gated `ruff --fix` — and are recorded in ROADMAP. P2 touched no `NOT_YET` entry: it is CLI-only on purpose, so P3's `health_run` owns the
implicit sync rather than the frontend getting two ways to reach one operation.
**`NOT_YET` is one**: `env_add_manual` — *Browse…*, and the next slice. `logs_tail` shipped in
1.4.0 together with the log it tails. `NOT_YET` in `src-tauri/src/lib.rs` is the authority and
three tests keep it honest in both directions — this file has said "four", "two" and "two" in
different paragraphs at once, each true when written and none updated.
**`NOT_YET` is empty since 1.6.0**: `env_add_manual` shipped with *Add interpreter…*, beside a
second command, `env_remove_manual`. `NOT_YET` in `src-tauri/src/lib.rs` is the authority and three
tests keep it honest in both directions — this file has said "four", "two" and "two" in different
paragraphs at once, each true when written and none updated. A future command that is declared
before it is built goes back on that list, not into a sentence here.
**1.4.0, the audit release, left these behind** — most found by running rather than by reading, and each
rule below backed by a test where a test can hold it:
@@ -149,7 +184,8 @@ rule below backed by a test where a test can hold it:
- **Data drift and format drift look identical in a red drift job.** Seven weeks of red were two
causes: PyPI data (idna's newest release, scipy's version list) and uv 0.13 rewriting its error
rendering. Data is redacted in `capture.py`; a format change gets a frozen corpus of its own
(`tests/fixtures/uv-0.11/`, the last miette-style uv) beside the live one (`uv/`).
(`tests/fixtures/uv-0.11/`, the last miette-style uv) beside the live one (`uv/`) — or, when
only some scenarios moved, a partial one: `pip-26.2/` holds the one capture pip 26.3 re-rendered.
- **Normalise everything you hash, not most of it.** The legal-docs hash normalised CRLF in the
content and hashed the raw length, so a Windows checkout re-showed the gate for nothing.
- **`--json` is one document.** Scripts parse stdout with one `ConvertFrom-Json`; prose, prompts
@@ -159,6 +195,66 @@ rule below backed by a test where a test can hold it:
could not fail. Write such files with the Write/Edit tools, then check the failing-first run
actually failed.
**1.5.0, the accessibility pass, left these behind** — the first found by reading, the rest by
driving the installed build:
- **jsdom is wrong about focus and blind to the cascade, and both cost a shipped defect.** A
browser takes focus from a control that becomes `disabled`; jsdom does not. So nine buttons that
disabled themselves when pressed dropped focus to `<body>` with every test green. **Busy is
`aria-disabled` plus a click guard; `disabled` is for unavailable.** And jsdom applies no
stylesheet: the forced-colors border on destructive buttons sat in `@layer base`, lost to
Tailwind's `border` utility in a later layer, and had never been drawn. **A rule that must beat
a utility goes outside every `@layer`**, and `destructive.test.ts` counts the braces.
- **The recipe that found them.** Install the bundle, launch with
`WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=<n>` and a scratch
`LOCALAPPDATA` (a release build honours it), and speak CDP to `http://127.0.0.1:<n>/json`:
`Input.dispatchKeyEvent` for real key presses (`Enter` needs a `char` event with `\r`),
`Runtime.evaluate` for `document.activeElement`, `Accessibility.getFullAXTree` for names, and
`Emulation.setEmulatedMedia` with `forced-colors: active`. No system setting changes. It cannot
hear a screen reader — say so wherever the result is written down. **A scratch profile still
discovers the owner's real interpreters**: select the scratch venv before starting any plan.
- **Anything that replaces what `<main>` shows without changing `nav` belongs in `App.tsx`'s
second focus effect.** There were four; the legal gate was a fifth, found after the first four
were fixed and tested. The effect acts only when focus was lost, so adding a dependency is safe.
- **A destructive button carries `data-destructive`**, whatever colour it is drawn in, and a test
reads the source for it. Do not add a `data-action` to a stylesheet list; there is no list.
- **An accessible name is assembled without spaces.** Inline spans join as `Updates(5)`; put a
literal `{' '}`. A browser *adds* one before visually-hidden text, so `: numpy` in an `sr-only`
span read "Remove packages : numpy" — use `aria-label` for a name with punctuation in it.
- **`sr-only` text needs a positioned parent.** It is `position: absolute`, so with no positioned
ancestor it is laid out against the viewport, outside every scroller: a list of pin chips on
Pins made the whole window scroll. Put `relative` on whatever holds the hidden text.
- **`ACCESSIBILITY.md` is hand-kept and says who tested what.** A change to keyboard, focus,
names or contrast is a change to it, the way a behaviour change is a change to `legal/`. It
currently says Narrator was not re-run on 1.5.0, and only a person can change that sentence.
- **`eslint-plugin-jsx-a11y` peers ESLint 9 at most**, like `react/jsx-no-literals`. axe-core is
called directly from `ui/src/test/axe.ts`; `color-contrast` is off there, and is
`tokens.test.ts`'s job.
- **Zoom is off on a measurement** (`zoomHotkeysEnabled`): at 200 % in the default window the
table's name column collapses to zero. Backlog A5 says what has to change first.
**1.6.0, *Add interpreter…*, left these behind** — found by an independent review after every suite
and the installed-build smoke were green:
- **The path you check is not the path you run.** `validate_interpreter` canonicalized to compare
against PipDock's own venvs and returned that, so a `--symlinks` venv — whose `python.exe` links
to its base — was run and stored as the base, and `--env .venv update --all` would have changed
the system Python. Resolve to *decide*; run and store what was given, made absolute. **The
identity followed the same link**: `env_hash` filed a linked venv's pins, snapshots and reports
under its base, which nothing showed while no screen could list the two apart. A venv's own
interpreter (recognised by `pyvenv.cfg`) is now resolved only up to its folder. Rows are still
matched by path, never by hash: two names for one Python share one.
- **Anything that resolves a path needs a fallback to the path.** A Microsoft Store Python is an
app-execution alias that `canonicalize()` refuses (os error 1920). `canonical_interpreter` always
fell back; the new validator did not, and `env use` would have broken for every Store user.
- **A check made once is a claim about the past.** An added entry is validated again on every
listing (`envs::probe_listed`, both heads), and the CLI's stored default when it is used: a link
can be re-pointed after it was accepted.
- **Remove a row by what it shows, not by an identity recomputed from it.** For a file that is
gone, `env_hash` hashes the stored text, which is not the identity it was added under whenever
canonicalizing changed it (a share: `UNC\server\…`); removal by hash reported success, and the
row came back on the next scan.
Three rules P1 left behind, all found by running rather than reading:
- **A venv is never externally managed**, and `sysconfig.get_path("stdlib")` inside one resolves to
@@ -166,9 +262,10 @@ Three rules P1 left behind, all found by running rather than reading:
with, so every venv built from a uv-managed, Debian, Homebrew or Fedora Python refused every
mutation. Anything reading a path out of `sysconfig` inside a venv is asking about the base.
- **`envs::venv_scan` matches exactly `.venv`, `venv`, `env`, `.env`.** A scratch venv named
anything else is invisible to `env list` and to the GUI, and `env_add_manual` (*Browse…*) is
still owed — so hand-verification of any environment feature needs one of those four names in
the working directory.
anything else is not *discovered*; since 1.6.0 it can be *added* — *Add interpreter…* in the GUI,
`pipdock env add` in the CLI — and that is how hand-verification reaches a venv outside the
working directory. A path a person supplies goes through `envs::validate_interpreter` (named like
Python, not PipDock's own venvs) before anything runs it; the picker is not the check.
- **Every pip below 22.2 is broken on Python 3.12+** (`distutils`, `pkgutil.ImpImporter`), so the
one case *Upgrade pip* exists for is also a pip that cannot run. `upgrade_pip` falls back to
`ensurepip`, and decides by asking `pip --version` rather than matching a traceback.
@@ -238,7 +335,7 @@ Things worth knowing before you change any of it:
- **`cargo test` fails when `ui/src/ipc/generated.ts` is stale.** Fix with
`cargo run -p xtask -- bindings`; the failure names that command and the first differing line.
- **The L4 goldens (`crates/pipdock-cli/tests/golden.rs`, 68 snapshots at 1.4.0) are the CLI's output
- **The L4 goldens (`crates/pipdock-cli/tests/golden.rs`, 70 snapshots at 1.6.0) are the CLI's output
contract.** A diff there is a real behaviour change — re-bless deliberately, never reflexively.
They are what made the `core::flow` refactor provably behaviour-preserving.
- **Two tests hold the wire format**: `Code::ALL` must serialize as `as_str()`, and no
+84
View File
@@ -0,0 +1,84 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [contact@poli0981.dev](mailto:contact@poli0981.dev). All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of actions.
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
+198
View File
@@ -0,0 +1,198 @@
# Contributing to PipDock
Thank you for wanting to help. PipDock is made by one person, so the most useful contributions are
the ones that arrive easy to say yes to: a bug report that reproduces, or a pull request that does
one thing and proves it.
By taking part you agree to the [Code of Conduct](CODE_OF_CONDUCT.md).
## Scope in maintenance mode
**Since 1.6.0 (2026-11), PipDock is maintained rather than developed.** It does what it was
designed to do — the last missing core feature, adding an interpreter by path, shipped in 1.6.0 —
and from here the work is keeping it correct, safe and current. What that takes in:
- **Regular dependency updates** — Rust crates, npm packages, GitHub Actions and the Code Health
tool pins, the way Dependabot proposes them.
- **Security fixes** — a dependency with a High or Critical advisory, or a serious security problem
in a runtime or toolchain PipDock is built with (Node, Rust, WebView2), fixed promptly and
released when it reaches the shipped program.
- **Major language, runtime and framework upgrades** — Node 26 to 28, TypeScript 6 to 7, a Rust
edition, Tauri 2 to 3 — when they arrive and are stable.
- **Bugs, UI/UX defects and accessibility barriers** — anything that does not work as the docs
describe, gets in someone's way, or cannot be used with a keyboard, a screen reader or high
contrast.
- **Wording and translation** — English or Vietnamese text that is wrong, misspelt in a way that
changes the meaning, misleading, or does not read the way people actually speak. There is an
issue form for it.
**New features are not taken**, as issues or as pull requests. One that asks for a feature — titled
as a feature request, a `feat:` pull request, or labelled `enhancement` — is labelled
`out-of-scope` and closed automatically, with this section linked. That is not a judgement of the
idea. If you believe something is **truly necessary** — it fixes data loss, a security hole, or
makes the program unusable for someone without it — make the case in
[Discussions → Ideas](https://github.com/poli0981org/pipdock/discussions/categories/ideas); the
maintainer can keep an item open with the `policy-exception` label.
What is planned, and what was deliberately not built, is in [`docs/ROADMAP.md`](docs/ROADMAP.md)
under *Maintenance mode*.
## Before you write code
- **A bug** — [open an issue](https://github.com/poli0981org/pipdock/issues/new/choose). The in-app
*Report bug* button fills most of the form in for you.
- **Something that gets in your way as a keyboard, screen-reader or high-contrast user** — see
[ACCESSIBILITY.md](ACCESSIBILITY.md). That report does not need a diagnosis.
- **A security problem** — do not open an issue; follow the [security policy](.github/SECURITY.md).
- **Wrong or misleading text, in either language** — the *Wording or translation problem* form.
- **A question** — [Discussions](https://github.com/poli0981org/pipdock/discussions).
- **A feature** — not during maintenance; see [above](#scope-in-maintenance-mode). The design is
written down in `docs/`, and a fix that contradicts it will be asked to change the docs first,
which is a conversation better had before the code.
## Setting up
PipDock is a Windows application: a Rust core, a Tauri 2 shell and a React 19 frontend.
| You need | Version |
|---|---|
| Windows | 10 or 11, with the WebView2 runtime (Windows 11 has it) |
| Rust | the toolchain in `rust-toolchain.toml`; `rustup` installs it on first use |
| Node.js | the major in `.nvmrc` |
| Python | 3.10 or newer, for the tests that drive a real pip |
| Build tools | the MSVC C++ build tools, as [Tauri requires](https://tauri.app/start/prerequisites/) |
```bash
npm ci
```
```bash
npm run tauri dev
```
`package.json` sits at the repository root although the frontend lives in `ui/`; that is deliberate
and Vite is configured for it.
## The checks, which are the ones CI runs
```bash
npm run lint
```
```bash
npm run typecheck
```
```bash
npm test
```
```bash
cargo fmt --all -- --check
```
```bash
cargo clippy --workspace --all-targets --locked -- -D warnings
```
```bash
cargo test --workspace --locked
```
```bash
node scripts/check-licenses.mjs
```
A pull request needs eight checks green before it can merge — `fmt · clippy · test`, `cargo audit`,
`cargo deny`, `lint · typecheck · test · build`, `npm audit`, `npm licences`, `tauri lockstep` and
CodeQL for JavaScript/TypeScript. Several more run and are read before merging (CodeQL for Rust and
Actions, the real-engine integration tests, SonarQube Cloud, Qodana). New code is expected to be
covered by tests; the SonarQube gate asks for 80 % on new lines. A new dependency the app ships must
be under a licence `deny.toml` allows — the two licence checks fail otherwise, and widening the list
is a licensing decision, not a CI fix.
## What a pull request should look like
**One pull request, one thing, taken all the way.** Not several shallow changes. The
[template](.github/PULL_REQUEST_TEMPLATE.md) is a checklist of the rest; the parts that surprise
people are below.
- **A test that fails first.** Write the test, watch it fail for the reason you expect, then make
the change. A test that has never failed has not been shown to test anything.
- **Run it.** Nearly every unplanned defect in this project was found by running the application or
the CLI against a real environment, not by a passing suite. Say in the pull request what you ran.
- **Commit subjects follow [Conventional Commits](https://www.conventionalcommits.org/)** —
`fix:`, `feat:`, `docs:`, `test:`, `build(deps):`, `ci:`. Nothing is generated from them; they
are for the person reading the log.
- **`main` has linear history**, so pull requests are squashed or rebased, never merge-committed.
- **If a user would notice, add a changelog entry** in [`changelog/`](changelog/README.md), written
for that user. Internals belong in the pull request and in `docs/ROADMAP.md`.
### Things that will fail CI if you forget them
- **Rust types that cross to the UI are generated, never hand-copied.** After changing one:
```bash
cargo run -p xtask -- bindings
```
`cargo test` fails while `ui/src/ipc/generated.ts` is stale, and names that command.
- **The CLI's output is a contract.** `crates/pipdock-cli/tests/golden.rs` holds a snapshot of every
command. A diff there is a real behaviour change: re-bless it because you meant it, never to make
the suite green.
- **Every piece of user-visible text lives in both languages** — `ui/src/locales/en` and
`ui/src/locales/vi`. A string literal in JSX is a lint error, and a key missing from either
language fails `i18n.test.ts`. Rust emits codes and data; it never phrases a sentence.
- **Never rewrite a file under `tests/fixtures/` with a text-mode tool.** They are byte-exact
captures of engine output, line endings included.
## The rules that are not negotiable
These are what make PipDock safe to point at an environment someone depends on. A change that
weakens one will not be merged, however useful it is otherwise.
1. **Nothing mutates an environment without a plan the user accepted and a snapshot that was
written.** If the snapshot fails, nothing runs.
2. **Subprocesses are started with argument arrays, never through a shell**, and package names and
versions are validated before they reach one.
3. **PipDock does not resolve dependencies.** pip or uv resolves; PipDock explains.
4. **`--break-system-packages` is never passed unless the user turned the override on.**
5. **One failed package never aborts a batch**, and every failure carries exactly one catalog code.
[`docs/DATA-FLOW.md`](docs/DATA-FLOW.md) §9 and [`docs/SECURITY.md`](docs/SECURITY.md) are the full
statements.
## Accessibility
A change to the interface is not done until it works without a mouse. Before you open the pull
request:
- reach and operate everything new with the keyboard alone;
- check that focus is visible, and that it lands somewhere sensible when the screen changes or a
dialog closes — never on nothing;
- give any control that shows only a symbol an accessible name, and every input a label;
- do not say anything by colour alone, and put `data-destructive` on a button that removes, forces
or rewrites, so high contrast can still tell it from Cancel;
- keep `npm test` green: it runs [axe-core](https://github.com/dequelabs/axe-core) over every
screen. axe checks structure; it cannot tell you what a screen reader says, so try one if you
can — Narrator is `Ctrl+Win+Enter` — and say in the pull request if you could not.
[ACCESSIBILITY.md](ACCESSIBILITY.md) is the statement these keep true, and
[`docs/UI-SPEC.md`](docs/UI-SPEC.md) §8 is the keyboard map.
## Where things are
| Path | What is there |
|---|---|
| `crates/pipdock-core` | Everything that touches an environment: engines, plans, snapshots, the error catalog |
| `crates/pipdock-cli` | The `pipdock` command line, and its golden tests |
| `src-tauri` | The desktop shell and the IPC commands |
| `ui/src` | The React frontend; nothing in it calls Tauri's `invoke` directly, only the wrappers in `ui/src/ipc` |
| `docs/` | The design: read [`ARCHITECTURE.md`](docs/ARCHITECTURE.md) before a structural change |
| `legal/` | What a user agrees to. Edits here re-show the first-run screen once, by design |
## Licence
PipDock is [GPL-3.0-only](LICENSE). By contributing you agree that your contribution is licensed
under the same terms. Parts of PipDock were written with an AI assistant under human review;
[`docs/AI-DISCLOSURE.md`](docs/AI-DISCLOSURE.md) says how.
Generated
+253 -472
View File
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -3,11 +3,11 @@ resolver = "3"
members = ["crates/pipdock-core", "crates/pipdock-cli", "src-tauri", "xtask"]
[workspace.package]
version = "1.4.0"
version = "1.6.0"
edition = "2024"
rust-version = "1.99"
license = "GPL-3.0-only"
repository = "https://github.com/poli0981/pipdock"
repository = "https://github.com/poli0981org/pipdock"
authors = ["Kokone (poli0981)"]
# Applications, not libraries: nothing here belongs on crates.io, and cargo-deny treats a
# publishable crate's licence and path dependencies as a published one's (deny.toml).
+41 -16
View File
@@ -1,14 +1,16 @@
# PipDock
[![CI · Rust](https://github.com/poli0981/pipdock/actions/workflows/ci-rust.yml/badge.svg)](https://github.com/poli0981/pipdock/actions/workflows/ci-rust.yml)
[![CI · Node](https://github.com/poli0981/pipdock/actions/workflows/ci-node.yml/badge.svg)](https://github.com/poli0981/pipdock/actions/workflows/ci-node.yml)
[![CodeQL](https://github.com/poli0981/pipdock/actions/workflows/codeql.yml/badge.svg)](https://github.com/poli0981/pipdock/actions/workflows/codeql.yml)
[![Release](https://img.shields.io/github/v/release/poli0981/pipdock?display_name=tag&sort=semver)](https://github.com/poli0981/pipdock/releases)
[![CI · Rust](https://github.com/poli0981org/pipdock/actions/workflows/ci-rust.yml/badge.svg)](https://github.com/poli0981org/pipdock/actions/workflows/ci-rust.yml)
[![CI · Node](https://github.com/poli0981org/pipdock/actions/workflows/ci-node.yml/badge.svg)](https://github.com/poli0981org/pipdock/actions/workflows/ci-node.yml)
[![CodeQL](https://github.com/poli0981org/pipdock/actions/workflows/codeql.yml/badge.svg)](https://github.com/poli0981org/pipdock/actions/workflows/codeql.yml)
[![Release](https://img.shields.io/github/v/release/poli0981org/pipdock?display_name=tag&sort=semver)](https://github.com/poli0981org/pipdock/releases)
[![License: GPL-3.0](https://img.shields.io/badge/license-GPL--3.0-blue)](LICENSE)
**A friendly dock for your Python environments.** Inspect, install, update, and clean up Python packages in bulk — through a keyboard-first GUI or a scriptable CLI — without ever hand-typing another `pip install` incantation or guessing why an upgrade broke your project.
> Repo: `poli0981/pipdock` · License: **GPL-3.0-only** · Platform: **Windows 10/11** · Contact: [contact@poli0981.dev](mailto:contact@poli0981.dev) · [other channels](https://poli0981.dev/links/)
> Repo: `poli0981org/pipdock` · License: **GPL-3.0-only** · Platform: **Windows 10/11** · Contact: [contact@poli0981.dev](mailto:contact@poli0981.dev) · [other channels](https://poli0981.dev/links/)
> **Status: maintenance mode, since 1.6.0.** PipDock is complete for what it set out to do, and is kept correct, safe and current rather than extended: dependency and security updates, major runtime upgrades, bug, UI/UX and accessibility fixes, and wording fixes in either language — no new features. [CONTRIBUTING.md](CONTRIBUTING.md#scope-in-maintenance-mode) says what is accepted. The repository moved from `poli0981/pipdock` to the **poli0981org** organization on 2026-11-21; the old address redirects.
---
@@ -50,7 +52,7 @@
| Area | What you get |
|---|---|
| Environments | Auto-discovery of installed Pythons — the Windows registry (PEP 514), the `py` launcher and the Pythons `uv python list` reports — plus a `.venv`, `venv`, `env` or `.env` folder in the folder PipDock was started from. Adding an environment by path is not in the app yet; the CLI takes any interpreter or environment folder with `--env` |
| Environments | Auto-discovery of installed Pythons — the Windows registry (PEP 514), the `py` launcher and the Pythons `uv python list` reports — plus a `.venv`, `venv`, `env` or `.env` folder in the folder PipDock was started from. **Add interpreter…** puts any other Python or virtual environment on the list (`pipdock env add` in the CLI), and *Remove from list* takes it off |
| PEP 668 guard | Pythons marked externally managed are refused by default. An override in Settings, off by default, asks before it turns on, and while it applies every screen that can change that Python says so |
| Installed | Full package list per env; up-to-date packages dimmed, outdated badged |
| Updates | Bulk update with group dry-run resolve, held-back explanations, 3-way conflict choices. The preview names every package *Force latest* would break, anything left out because it needs a different Python, and withdrawn (yanked) releases |
@@ -65,7 +67,7 @@
| pip upkeep | Check & update pip itself per environment |
| CLI | `pipdock` — full parity for core operations, JSON output, CI-friendly exit codes |
| Requirements | Export an environment as `requirements.txt`; import one and preview what it would install, with every line it will not use reported by number |
| Disk usage | Everything PipDock writes is under `%LOCALAPPDATA%\PipDock\data\`. Settings shows it and clears the parts that are safe to clear — snapshots (`snapshots\`), the Code Health tools environment (`tools\`) and the Security tab's audit environment (`audit\`). `index.db` (package index, settings, pins, your acceptance of the legal documents) is shown but never cleared; the logs (`logs\`) are deleted automatically after 14 days |
| Disk usage | Everything PipDock writes is under `%LOCALAPPDATA%\PipDock\data\`. Settings shows it and clears the parts that are safe to clear — snapshots (`snapshots\`), the Code Health tools environment (`tools\`) and the Security tab's audit environment (`audit\`). `index.db` (package index, settings, pins, the interpreters you added, your acceptance of the legal documents) is shown but never cleared; the logs (`logs\`) are deleted automatically after 14 days |
| Logs | PipDock keeps its own log, one file per day in `data\logs\`, and never sends it anywhere. It records the commands PipDock ran, so it holds package names and file paths. Settings shows the folder and copies the recent lines for a bug report |
| Keyboard | `Ctrl+K` command palette, `Ctrl+1`–`Ctrl+9` tabs (by key position, so AZERTY and other layouts work too), `/` for Search, full keyboard traversal |
| i18n | English + Tiếng Việt, remembered across restarts |
@@ -73,7 +75,7 @@
## Install
Download the installer (NSIS `.exe` or `.msi`) from [GitHub Releases](https://github.com/poli0981/pipdock/releases).
Download the installer (NSIS `.exe` or `.msi`) from [GitHub Releases](https://github.com/poli0981org/pipdock/releases).
PipDock does not update itself — grab a new build from the same page when you want one. That is deliberate: a self-updater is a standing remote-code-execution path into a tool that already runs subprocesses against your interpreters, and it is not worth the convenience (see [docs/SECURITY.md](docs/SECURITY.md) §5).
@@ -88,10 +90,16 @@ PipDock does not update itself — grab a new build from the same page when you
> From 1.4.0 the `.exe` and `.msi` also carry a build-provenance attestation. A checksum published beside a file cannot prove where the file came from — whoever could replace one could replace both — but the attestation proves the installer was built by this repository's release workflow. With the [GitHub CLI](https://cli.github.com/):
>
> ```powershell
> gh attestation verify .\PipDock_<version>_x64-setup.exe --repo poli0981/pipdock
> gh attestation verify .\PipDock_<version>_x64-setup.exe --repo poli0981org/pipdock
> ```
>
> It succeeds only when GitHub holds an attestation from this repository for that exact file. If it fails, do not run the file.
> That is for 1.6.0 and later. **1.4.0 and 1.5.0 were built before the repository moved to the poli0981org organization** (2026-11-21), and their attestations stayed with the account that made them, so `--repo` finds none for them. Verify those against that account and the repository's old name instead:
>
> ```powershell
> gh attestation verify .\PipDock_1.5.0_x64-setup.exe --owner poli0981 --signer-repo poli0981/pipdock
> ```
>
> Either succeeds only when GitHub holds an attestation from this repository's release workflow for that exact file. If it fails, do not run the file.
## Quick start
@@ -115,10 +123,10 @@ pipdock snapshot rollback latest
## Documentation
**Using PipDock?** The [wiki](https://github.com/poli0981/pipdock/wiki) is the user-facing set —
[Getting Started](https://github.com/poli0981/pipdock/wiki/Getting-Started),
[Troubleshooting](https://github.com/poli0981/pipdock/wiki/Troubleshooting) and an
[FAQ](https://github.com/poli0981/pipdock/wiki/FAQ) that explains the design decisions rather than
**Using PipDock?** The [wiki](https://github.com/poli0981org/pipdock/wiki) is the user-facing set —
[Getting Started](https://github.com/poli0981org/pipdock/wiki/Getting-Started),
[Troubleshooting](https://github.com/poli0981org/pipdock/wiki/Troubleshooting) and an
[FAQ](https://github.com/poli0981org/pipdock/wiki/FAQ) that explains the design decisions rather than
just stating them. Everything below is for reading the code.
| Doc | Purpose |
@@ -134,14 +142,27 @@ just stating them. Everything below is for reading the code.
| [docs/ERROR-CATALOG.md](docs/ERROR-CATALOG.md) | Error codes, stderr detection patterns, user guidance |
| [docs/SECURITY.md](docs/SECURITY.md) | Threat model, PEP 668 policy, supply-chain hygiene |
| [docs/TESTING.md](docs/TESTING.md) | Test strategy incl. disposable-venv integration tests |
| [docs/RELEASE-CI.md](docs/RELEASE-CI.md) | CI callers into `poli0981/.github`, release pipeline |
| [docs/RELEASE-CI.md](docs/RELEASE-CI.md) | Workflows, branch protection, Dependabot, release pipeline |
| [docs/I18N.md](docs/I18N.md) | EN/VI localization rules |
| [docs/ROADMAP.md](docs/ROADMAP.md) | Spike week, milestones, exit criteria |
| [ACCESSIBILITY.md](ACCESSIBILITY.md) | What is supported, what has been tested, what is known not to work, and how to report a barrier |
| [CONTRIBUTING.md](CONTRIBUTING.md) | Setting up, the checks CI runs, and what a pull request needs |
| [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) | Contributor Covenant 2.1 |
| [legal/](legal/) | EULA, Disclaimer, Privacy Policy, Third-Party Notices (linked by the in-app legal gate) |
## Accessibility
PipDock is built to work with a keyboard alone, with a screen reader and under a Windows contrast theme, and `pipdock` on the command line is plain text with no colour and nothing that animates. The target is WCAG 2.2 AA; it is a target and not a conformance claim, and [ACCESSIBILITY.md](ACCESSIBILITY.md) says exactly what has been tested, by whom, and what is known to fall short.
If something gets in your way, [open an accessibility issue](https://github.com/poli0981org/pipdock/issues/new?template=accessibility.yml) or write to [accessibility@poli0981.dev](mailto:accessibility@poli0981.dev) — in English or Vietnamese, with no GitHub account needed and no diagnosis expected.
## Contributing
Bug reports, accessibility reports and pull requests are welcome. [CONTRIBUTING.md](CONTRIBUTING.md) covers setup, the checks, and the handful of rules that are not negotiable; everyone taking part is expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md). Security problems go through the [security policy](.github/SECURITY.md), not a public issue.
## How this was built
PipDock was written with substantial help from an AI coding assistant — **Claude Opus 5** through 1.3.0 and **Claude Opus 5.5** from 1.4.0, made by [Anthropic](https://www.anthropic.com), through [Claude Code](https://claude.com/claude-code) — under human review. It wrote source code, tests, debugging work and the Vietnamese translation. Every change reached `main` through a pull request, and `main` is protected and cannot be bypassed. Through 1.3.0 the maintainer read and merged each one, and drove the built application by hand on three machines before 1.0.0 shipped; 1.4.0 was released by the assistant on the maintainer's written instruction, once its checks had passed.
PipDock was written with substantial help from an AI coding assistant — **Claude Opus 5** through 1.3.0, **Claude Opus 5.5** for 1.4.0 and **Claude Fable 5.2** for 1.5.0, made by [Anthropic](https://www.anthropic.com), through [Claude Code](https://claude.com/claude-code) — under human review. It wrote source code, tests, debugging work and the Vietnamese translation. Every change reached `main` through a pull request, and `main` is protected and cannot be bypassed. Through 1.3.0 the maintainer read and merged each one, and drove the built application by hand on three machines before 1.0.0 shipped; 1.4.0 and 1.5.0 were released by the assistant on the maintainer's written instruction — a plan the maintainer approved — once the checks had passed.
That review mattered: **thirty-five defects** reached or nearly reached `main`, and not one was caught by the test suite that was green at the time. They were found by running the thing.
@@ -158,3 +179,7 @@ PipDock is an independent project. It is not affiliated with or endorsed by the
## Tiếng Việt (tóm tắt)
PipDock là ứng dụng Windows (GUI + CLI) giúp kiểm tra, cài đặt, cập nhật và gỡ **hàng loạt** gói thư viện Python một cách an toàn: luôn chạy dry-run xem trước thay đổi, xử lý xung đột phiên bản với 3 lựa chọn rõ ràng, tự chụp snapshot trước mỗi lần chạy để rollback một chạm, cảnh báo khi gỡ gói mà gói khác đang phụ thuộc, và tổng kết "13 thành công, 2 thất bại" kèm lý do từng gói. Hỗ trợ engine pip hoặc uv (chọn trong Settings), tìm gói tức thì nhờ cache chỉ mục PyPI, kèm module Code Health (deptry/vulture/ruff) để dọn dependency thừa và dead code. Không thu thập dữ liệu. Giấy phép GPL-3.0.
**Trạng thái: giai đoạn bảo trì, từ bản 1.6.0.** PipDock đã làm đủ những gì nó đặt ra, và từ nay được giữ cho đúng, an toàn và cập nhật chứ không mở rộng thêm: cập nhật phụ thuộc định kỳ, sửa lỗi bảo mật (CVE mức High trở lên hoặc lỗi nghiêm trọng của runtime), nâng cấp lớn ngôn ngữ/runtime/framework, sửa lỗi, lỗi UI/UX và rào cản tiếp cận, sửa câu chữ hoặc bản dịch dễ gây hiểu nhầm — **không nhận tính năng mới**; issue hay PR đề xuất tính năng sẽ tự động được gắn nhãn và đóng. Repo đã chuyển từ `poli0981/pipdock` sang tổ chức **poli0981org** ngày 2026-11-21; địa chỉ cũ vẫn tự chuyển hướng. Chi tiết trong [CONTRIBUTING.md](CONTRIBUTING.md#scope-in-maintenance-mode).
**Khả năng tiếp cận:** PipDock dùng được chỉ với bàn phím, với trình đọc màn hình (đã thử với Narrator) và ở chế độ tương phản cao của Windows. Chi tiết, kể cả những gì chưa được kiểm thử, nằm trong [ACCESSIBILITY.md](ACCESSIBILITY.md). Nếu gặp rào cản, hãy [mở issue](https://github.com/poli0981org/pipdock/issues/new?template=accessibility.yml) hoặc viết tới [accessibility@poli0981.dev](mailto:accessibility@poli0981.dev) — tiếng Việt cũng được.
+136
View File
@@ -3,6 +3,142 @@
Newest first. See [`README.md`](README.md) for the conventions, and `docs/ROADMAP.md` for what each
slice cost and what it taught — that is a different document for a different reader.
## 1.6.0 — 2026-11-21
**Add any Python, and the move to maintenance mode.** PipDock can now manage a virtual environment
wherever it lives — the one core feature that was still missing — and with this release it moves
from being developed to being maintained. ([#119](https://github.com/poli0981org/pipdock/pull/119),
[#120](https://github.com/poli0981org/pipdock/pull/120))
### Added
- **Add interpreter…** on Environments — beside *Rescan*, in the empty screen, and in `Ctrl+K`.
Pick any `python.exe`, typically the one in a virtual environment's `Scripts` folder, and it is
added to the list, selected, and remembered across restarts. Until now the app only found a venv
named `.venv`, `venv`, `env` or `.env` in the folder it was started from, which for an installed
app is its own install folder — so most project environments were out of reach.
- **Remove from list** on every interpreter you added. It only forgets the entry; nothing on disk is
touched, and the environment's pins and snapshots are kept for when you add it again. An added
environment that has since been deleted stays listed with its error, so you can remove it.
- The same from the command line: `pipdock env add <path>` and `pipdock env remove <path>`, and
`pipdock env list` shows what you added after what it discovered.
### Changed
- **PipDock checks a path you give it before running anything.** An interpreter you pick, or pass
with `--env`, `env use` or `env add`, has to be a file named `python.exe` (or `python3.exe`,
`python3.12.exe`, the free-threaded `python3.14t.exe`), and cannot be one of PipDock's own tool
environments. Anything else is refused
with `PD-ENV-001`, whose message now reads "That interpreter is missing, or PipDock cannot run it."
An interpreter you added is checked again whenever the list is read, and a default set with
`env use` before 1.6.0 is checked when it is used — if it is refused, it is skipped with a
warning, as a deleted one already was.
- **A virtual environment made with `--symlinks` is its own environment.** Its pins, snapshots and
reports were filed under the Python it was made from, because its `python.exe` is a link to that
Python. They are kept apart now; any made before 1.6.0 stay with that Python.
- **The repository moved to `github.com/poli0981org/pipdock`.** The bug-report button, the legal
documents, About and the docs point there; the old address redirects.
- **The first-run screen asks once more.** The privacy policy now names the interpreter paths you
add (kept until you remove them) and the repository's new address, so the documents changed.
### Verifying a download
`gh attestation verify .\PipDock_1.6.0_x64-setup.exe --repo poli0981org/pipdock` verifies this
release and later ones. **The command in earlier READMEs no longer works for 1.4.0 and 1.5.0**: an
attestation stays with the account that made it, so verify those with
`--owner poli0981 --signer-repo poli0981/pipdock` instead.
### What maintenance mode means for you
- Bugs, UI/UX problems and accessibility barriers are what PipDock is now maintained for, along
with dependency and security updates, major runtime upgrades and wording fixes. There is a new
issue form for wrong or misleading text, in English or Vietnamese.
- **New features are not taken.** An issue or pull request asking for one is labelled and closed
automatically, with a link explaining why. `CONTRIBUTING.md` says what is accepted.
## 1.5.0 — 2026-11-10
**The accessibility release.** PipDock could already be driven from the keyboard and read by
Narrator from end to end — that was tested by hand on 1.4.0, and nothing blocked. This release fixes
the places where it worked but made you work for it, and writes down honestly what is and is not
supported. ([#107](https://github.com/poli0981/pipdock/pull/107))
### If you use the keyboard
- **Focus no longer disappears when the screen changes.** Starting an update, a run reaching its
summary, opening a package's dependencies or opening an environment each replaced the screen and
left focus on nothing, so the next `Tab` started again from the top of the window. Focus now
lands on the new screen's heading. Closing the console drawer returns it to the button that
opened the drawer.
- **Code Health's tabs are one tab stop**, moved through with `←` `→` `Home` `End`. They were three.
- **A version conflict's three choices are one tab stop**, moved through with the arrow keys.
Nothing is chosen until you press `Space` or `Enter` — an arrow key will never open *Force
latest*'s confirmation.
- **The command palette scrolls with its selection.** Past the ninth action the highlight used to
leave the visible list.
- **A button you have just pressed keeps focus while it works.** *Use*, *Rescan*, *Run*, *Run
audit*, *Add*, *Download the index* and *Stop* used to drop it the moment they went busy.
- **The focus ring on a package row is complete.** Three of its four sides were being cut off.
- The first-run screen puts focus on its heading rather than nowhere, and accepting it puts focus
on the first screen.
### If you use a screen reader
- **Dialogs say what they are asking.** A confirmation used to be announced by the package name
alone — "numpy, dialog", then "Cancel". It is now named by its heading and described by its text.
- **Search tells you what it is doing**: that it is searching, how many results came back, and when
nothing matched. Which result's details are showing is announced, not only coloured.
- **Code Health's tabs are named for what you see** — `deptry 3`, followed by what the tool checks —
so "click deptry" works with voice control too.
- **A pin's lock chip says what it means.** A held pin used to read as a bare version number; the
explanation was a mouse-only tooltip.
- **The package table is a well-formed grid**: every column has a header, the checkbox is in a cell,
and the table says more than one row can be selected.
- The console drawer's close button is called *Close console*. It was called *Cancel*, next to a
*Stop* button that cancels the run.
- Each sidebar tab exposes its `Ctrl+1`…`Ctrl+9` shortcut.
### If you use a Windows contrast theme
- **Every destructive button is marked, with a double border.** High contrast removes the red,
and a button that removes, forces or rewrites was then drawn exactly like the *Cancel* beside
it. A border was meant to mark them and, it turns out, had never actually been drawn.
- **The current sidebar tab is outlined.** It was indistinguishable from the rest.
### For everyone
- The sidebar's shortcut hints (`^1`…`^9`) are no longer drawn at half strength.
- The link to vulture's whitelist is underlined all the time, not only under the mouse.
- The remove button in Search's install list is large enough to hit.
### Added
- **[ACCESSIBILITY.md](../ACCESSIBILITY.md)** — what is supported, exactly what has been tested and
by whom, what has *not* been tested, the known limitations, and how to report a barrier. The
target is WCAG 2.2 AA; it is a target, not a claim of conformance.
- **An Accessibility section in About**, with a button that opens the statement and a new address,
`accessibility@poli0981.dev`, for anyone who would rather not use GitHub.
- **An accessibility issue form** that asks what got in your way, not what caused it.
- [CONTRIBUTING.md](../CONTRIBUTING.md) and a [Code of Conduct](../CODE_OF_CONDUCT.md), for anyone
who wants to help.
### Worth knowing
- **There is no zoom yet.** It was built for this release and held back, because at 200 % in the
default window the package names disappeared. The Windows display scale works as before.
- **Narrator has not been run again on this release.** The changes above were checked in the
running application against what it exposes to assistive technology, and by automated tests —
not by listening. If something sounds wrong, that is exactly the report the new address is for.
- The legal documents did not change, so the first-run screen does not reappear.
- Also in this build since 1.4.0: pip 26.3's new wording for an unloadable build backend is
recognised (it was reported under a neighbouring error code, with the same advice), and
dependencies are current.
### Verifying a download
As for 1.4.0: check the installer against `SHA256SUMS.txt`, or run
`gh attestation verify <file> --repo poli0981/pipdock`.
## 1.4.0 — 2026-10-17
**No new feature: everything PipDock already did, made to do what it said.** A review of the whole
+14 -2
View File
@@ -275,13 +275,23 @@ enum Command {
#[derive(Debug, Subcommand)]
enum EnvCommand {
/// List discovered environments, their sources and PEP 668 flags.
/// List discovered environments and the ones added with `env add`, their sources and PEP 668 flags.
List,
/// Set the default environment.
Use {
/// Interpreter or environment directory.
path: PathBuf,
},
/// Add an interpreter discovery does not find to the list (the GUI's Add interpreter…).
Add {
/// Interpreter or environment directory.
path: PathBuf,
},
/// Take an interpreter added with `env add` off the list. Nothing on disk is touched.
Remove {
/// Interpreter or environment directory, as it was added.
path: PathBuf,
},
}
#[derive(Debug, Subcommand)]
@@ -395,6 +405,8 @@ async fn main() -> ExitCode {
}
Command::Schema { type_name } => run::schema(type_name),
Command::Env(EnvCommand::Use { path }) => run::env_use(&cli.global, path).await,
Command::Env(EnvCommand::Add { path }) => run::env_add(&cli.global, path).await,
Command::Env(EnvCommand::Remove { path }) => run::env_remove(&cli.global, path),
Command::Audit => run::audit(&cli.global).await,
Command::PipUpgrade => run::pip_upgrade(&cli.global).await,
Command::Snapshot(SnapshotCommand::Rollback { id }) => {
@@ -428,7 +440,7 @@ async fn main() -> ExitCode {
match result {
Ok(exit) => exit.into(),
Err(e) => {
tracing::error!(target: "pipdock::cli", code = %e.code, message = %e.message, "failed");
tracing::error!(target: "pipdock::cli", code = %e.code, error = %e.message, "failed");
let exit = run::exit_for(e.code);
// ERROR-CATALOG §3: `error[PD-XXX-NNN]: <one-liner>` on stderr, or the JSON envelope.
if cli.global.json {
+155 -46
View File
@@ -217,8 +217,8 @@ pub async fn select_env(opts: &GlobalOpts) -> Result<PyEnv> {
/// CLI-SPEC §2 and `--env`'s own help text: `--env` wins; then the default `env use` set; then a
/// `.venv` in the working directory. The default was written by `env use` and read by nothing, so
/// `env use` reported success and every later command ignored it (X3). A default whose interpreter
/// is gone is said on stderr and skipped, rather than failing a command the user ran somewhere a
/// `.venv` would have answered.
/// is gone, or that [`envs::validate_interpreter`] refuses, is said on stderr and skipped, rather
/// than failing a command the user ran somewhere a `.venv` would have answered.
///
/// Returns the probe, not just the `PyEnv`, so a command that needs the listing does not probe a
/// second time — `list` did, and paid twice on every invocation (X28).
@@ -228,7 +228,8 @@ pub async fn select_env(opts: &GlobalOpts) -> Result<PyEnv> {
/// default that mutates the wrong environment.
pub async fn select(opts: &GlobalOpts) -> Result<envs::ProbeResult> {
if let Some(path) = &opts.env {
return envs::probe(&interpreter_in(path), EnvSource::Manual).await;
let interpreter = envs::validate_interpreter(&envs::interpreter_in(path), &app_data_dir())?;
return envs::probe(&interpreter, EnvSource::Manual).await;
}
let stored = Store::open(&app_data_dir())
@@ -237,12 +238,23 @@ pub async fn select(opts: &GlobalOpts) -> Result<envs::ProbeResult> {
if let Some(default) = stored {
let interpreter = PathBuf::from(&default.interpreter);
if interpreter.is_file() {
return envs::probe(&interpreter, EnvSource::Manual).await;
// Checked like `--env`: a default written by 1.5.0 or earlier never was, and the file
// may have changed since. Refused, it is skipped with a warning, as a gone one is.
match envs::validate_interpreter(&interpreter, &app_data_dir()) {
Ok(checked) => return envs::probe(&checked, EnvSource::Manual).await,
Err(e) => eprintln!(
"warning: the default environment is not used: {}; `pipdock env use` sets \
another",
e.message
),
}
} else {
eprintln!(
"warning: the default environment ({}) no longer exists; `pipdock env use` sets \
another",
default.interpreter
);
}
eprintln!(
"warning: the default environment ({}) no longer exists; `pipdock env use` sets another",
default.interpreter
);
}
let cwd = std::env::current_dir().unwrap_or_default();
@@ -257,35 +269,29 @@ pub async fn select(opts: &GlobalOpts) -> Result<envs::ProbeResult> {
))
}
/// Accept either an interpreter path or an environment directory, as CLI-SPEC §2 promises.
fn interpreter_in(path: &Path) -> PathBuf {
if path.is_file() {
return path.to_path_buf();
}
let exe: PathBuf = if cfg!(windows) {
["Scripts", "python.exe"].iter().collect()
} else {
["bin", "python"].iter().collect()
};
let candidate = path.join(&exe);
if candidate.is_file() {
candidate
} else {
path.to_path_buf()
}
}
/// `pipdock env list`
///
/// # Errors
/// Never fails as a whole: an interpreter that cannot be probed is reported in place rather than
/// aborting the listing, because one broken environment must not hide the rest.
pub async fn env_list(opts: &GlobalOpts) -> Result<Exit> {
let candidates = envs::scan().await;
// The interpreters `env add` (or the GUI's Add interpreter…) put on the list, after discovery's
// own. A store that cannot be read costs those rows, not the listing.
let manual: Vec<PathBuf> = Store::open(&app_data_dir())
.and_then(|store| store.manual_envs())
.unwrap_or_default()
.into_iter()
.map(|m| PathBuf::from(m.interpreter))
.collect();
let candidates = envs::scan_with(&manual).await;
// Through `probe_listed`, as the GUI's `env_scan` goes: an added entry is checked again before
// it runs, because what it was when added says nothing about what it is now.
let app_data = app_data_dir();
let mut rows = Vec::new();
for Candidate { path, source } in candidates {
let probed = envs::probe(&path, source).await;
for candidate in candidates {
let probed = envs::probe_listed(&candidate, &app_data).await;
let Candidate { path, source } = candidate;
rows.push((path, source, probed));
}
@@ -293,20 +299,7 @@ pub async fn env_list(opts: &GlobalOpts) -> Result<Exit> {
let payload: Vec<serde_json::Value> = rows
.iter()
.map(|(path, source, probed)| match probed {
Ok(p) => serde_json::json!({
"interpreter": path,
"source": source,
"python": p.env.python_version,
"externallyManaged": p.env.externally_managed,
"hiddenUserSite": p.env.hidden_user_site,
"packages": p.dists.len(),
"envHash": envs::env_hash(path),
// Same field the GUI's EnvRow carries, out of the same list, so `env list`
// and the Environments screen cannot disagree about which pip is installed.
"pipVersion": p.dists.iter()
.find(|d| d.name.as_str() == "pip")
.map(|d| d.version.0.clone()),
}),
Ok(p) => env_json(path, *source, p),
Err(e) => serde_json::json!({
"interpreter": path,
"source": source,
@@ -1020,7 +1013,7 @@ pub fn schema(type_name: &str) -> Result<Exit> {
/// `PD-ENV-001` when the path is not a usable interpreter — chosen deliberately over accepting it
/// silently, because a default that does not work fails on every later command instead of this one.
pub async fn env_use(opts: &GlobalOpts, path: &Path) -> Result<Exit> {
let interpreter = interpreter_in(path);
let interpreter = envs::validate_interpreter(&envs::interpreter_in(path), &app_data_dir())?;
let probed = envs::probe(&interpreter, EnvSource::Manual).await?;
let store = Store::open(&app_data_dir())?;
@@ -1043,6 +1036,110 @@ pub async fn env_use(opts: &GlobalOpts, path: &Path) -> Result<Exit> {
Ok(Exit::Success)
}
/// One probed environment as `env list --json` prints it — and `env add --json`, which promises the
/// same element, so the two are built here once rather than kept in step by hand.
fn env_json(path: &Path, source: EnvSource, probed: &envs::ProbeResult) -> serde_json::Value {
serde_json::json!({
"interpreter": path,
"source": source,
"python": probed.env.python_version,
"externallyManaged": probed.env.externally_managed,
"hiddenUserSite": probed.env.hidden_user_site,
"packages": probed.dists.len(),
"envHash": envs::env_hash(path),
// Same field the GUI's EnvRow carries, out of the same list, so `env list` and the
// Environments screen cannot disagree about which pip is installed.
"pipVersion": probed.dists.iter()
.find(|d| d.name.as_str() == "pip")
.map(|d| d.version.0.clone()),
})
}
/// `pipdock env add <path>` — the GUI's *Add interpreter…* (PRD P0-1).
///
/// Validated, probed, then stored, so the list never gains an entry that was refused or broken on
/// arrival. `--json` prints the entry in the shape of an `env list --json` element — not always the
/// element `env list` will show, which takes the discovered source and spelling when discovery also
/// finds the interpreter.
///
/// # Errors
/// `PD-ENV-001` when the path is missing, not named like a Python interpreter, or one of PipDock's
/// own environments; `PD-ENV-003` when the probe fails; `PD-INT-001` when the store cannot be
/// written.
pub async fn env_add(opts: &GlobalOpts, path: &Path) -> Result<Exit> {
let interpreter = envs::validate_interpreter(&envs::interpreter_in(path), &app_data_dir())?;
let probed = envs::probe(&interpreter, EnvSource::Manual).await?;
Store::open(&app_data_dir())?.add_manual_env(
&envs::env_hash(&interpreter),
&interpreter.display().to_string(),
&jiff::Timestamp::now().to_string(),
)?;
if opts.json {
print_json(&env_json(&interpreter, EnvSource::Manual, &probed));
} else if !opts.quiet {
println!(
"added: {} (Python {})",
interpreter.display(),
probed.env.python_version
);
}
Ok(Exit::Success)
}
/// `pipdock env remove <path>`
///
/// Matched by identity, and by the path as stored when the file is gone — a deleted venv cannot be
/// canonicalized into the identity it was added under, and it is exactly the entry someone wants
/// gone. A directory is matched as the venv whose interpreter it would hold, existing or not:
/// `interpreter_in` resolves only what is there, and the first version of this command answered
/// "not on the list" for the one case it exists for — found by its own test. Not being on the list
/// is not an error: the list is what was asked about, and it is right.
///
/// What was typed is made absolute first — `env add .venv` stores an absolute path, so `env remove
/// .venv` has to compare one, and a relative path never matched (independent review, 1.6.0).
///
/// # Errors
/// `PD-INT-001` when the store cannot be read or written.
pub fn env_remove(opts: &GlobalOpts, path: &Path) -> Result<Exit> {
let store = Store::open(&app_data_dir())?;
let absolute = |p: PathBuf| std::path::absolute(&p).unwrap_or(p);
let interpreter = absolute(envs::interpreter_in(path));
let candidates = [interpreter.clone(), absolute(envs::venv_interpreter(path))];
let entry = store.manual_envs()?.into_iter().find(|m| {
candidates
.iter()
.any(|c| m.env_hash == envs::env_hash(c) || same_path(&m.interpreter, c))
});
let removed = match &entry {
Some(m) => store.remove_manual_env(&m.env_hash, &m.interpreter)?,
None => false,
};
let shown = entry.map_or_else(|| interpreter.display().to_string(), |m| m.interpreter);
if opts.json {
print_json(&serde_json::json!({ "interpreter": shown, "removed": removed }));
} else if !opts.quiet {
if removed {
println!("removed from the list: {shown} (nothing on disk was changed)");
} else {
println!("not on the list: {shown}");
}
}
Ok(Exit::Success)
}
/// Whether a stored path and a typed one name the same file, without asking the file system —
/// which, for a deleted venv, has nothing to say. Case-insensitive on Windows (invariant 9).
fn same_path(stored: &str, typed: &Path) -> bool {
let stored = Path::new(stored);
if cfg!(windows) {
stored.as_os_str().eq_ignore_ascii_case(typed.as_os_str())
} else {
stored == typed
}
}
/// `pipdock tools sync`
///
/// The re-sync `PD-HLT-001`'s shipped copy already tells users to run — until now there was no way
@@ -2270,8 +2367,20 @@ mod tests {
#[test]
fn an_env_directory_resolves_to_its_interpreter() {
// CLI-SPEC §2 accepts "interpreter or env dir"; a non-existent path is passed through so
// the probe reports PD-ENV-001 against what the user actually typed.
// the validator reports PD-ENV-001 against what the user actually typed.
let missing = Path::new("definitely-not-here");
assert_eq!(interpreter_in(missing), missing);
assert_eq!(envs::interpreter_in(missing), missing);
}
#[test]
fn a_stored_path_matches_what_was_typed_in_any_case_on_windows() {
let stored = r"D:\work\proj\myenv\Scripts\python.exe";
assert!(same_path(stored, Path::new(stored)));
assert_eq!(
same_path(stored, Path::new(&stored.to_lowercase())),
cfg!(windows),
"case-folded on Windows only"
);
assert!(!same_path(stored, Path::new(r"D:\work\other\python.exe")));
}
}
+31
View File
@@ -154,6 +154,8 @@ fn subcommand_help_is_stable() {
for (parent, child) in [
("env", "list"),
("env", "use"),
("env", "add"),
("env", "remove"),
("pin", "add"),
("pin", "remove"),
("pin", "list"),
@@ -244,6 +246,35 @@ fn the_human_error_line_carries_its_code() {
);
}
#[test]
fn a_logged_failure_names_its_message() {
// `message = %e.message` beside a format string records two fields called `message`, and the
// text formatter prints that field without its name — so the line read `failed
// code=PD-ENV-001 no interpreter at …`, the error's own words indistinguishable from the
// event's (SonarQube rust:S6677). `error=`, as every other failure in the codebase logs it.
let copy = std::env::temp_dir().join(format!("pd-golden-log-{}.log", std::process::id()));
let _ = std::fs::remove_file(&copy);
let copy_arg = copy.to_string_lossy().into_owned();
code_of(&[
"--log-file",
&copy_arg,
"list",
"--env",
"C:/definitely/not/here",
]);
let log = std::fs::read_to_string(&copy).expect("--log-file wrote its copy");
let _ = std::fs::remove_file(&copy);
let line = log
.lines()
.find(|l| l.contains("PD-ENV-001"))
.unwrap_or_else(|| panic!("the failure was not logged:\n{log}"));
assert!(
line.contains("failed") && line.contains("error=no interpreter at"),
"the error's message must be a field of its own: {line}"
);
}
#[test]
fn an_unknown_schema_type_lists_the_known_ones() {
insta::assert_snapshot!("schema-unknown-type", stderr_of(&["schema", "NoSuchType"]));
+231
View File
@@ -0,0 +1,231 @@
//! `env add`, `env remove` and `env list` over the list the GUI's *Add interpreter…* shares (1.6.0).
//!
//! The paths that need no Python, which are the ones a refactor is likeliest to break unseen: a
//! file that is not an interpreter is refused before anything runs it and nothing is stored; an
//! added interpreter whose file has since gone is still listed — with `PD-ENV-001`, because that is
//! the row a person needs in order to remove it — and is removed by the path it was added under.
//! A stored entry, or a stored default, that is no longer a Python is checked again and never run.
//! The success path of `env add` probes a real interpreter, which `ci-integration.yml` has.
//!
//! Each test has an app-data root of its own: the store is a file, and tests run in parallel.
#![allow(clippy::unwrap_used, clippy::expect_used)]
use std::path::{Path, PathBuf};
use assert_cmd::Command;
use pipdock_core::store::Store;
fn scratch(tag: &str) -> PathBuf {
let dir = std::env::temp_dir().join(format!("pd-manual-{tag}-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(&dir).expect("create scratch dir");
dir
}
/// `%LOCALAPPDATA%\PipDock\data`, as the binary will compute it from `LOCALAPPDATA`.
fn app_data(local: &Path) -> PathBuf {
local
.join(pipdock_core::APP_DATA_DIR_NAME)
.join(pipdock_core::APP_DATA_SUBDIR)
}
fn pipdock(local: &Path) -> Command {
let mut cmd = Command::cargo_bin("pipdock").expect("the `pipdock` binary builds");
cmd.env("NO_COLOR", "1")
.env("COLUMNS", "100")
.env("LOCALAPPDATA", local);
cmd
}
fn manual_rows(local: &Path) -> Vec<serde_json::Value> {
let out = pipdock(local)
.args(["env", "list", "--json"])
.output()
.expect("runs");
assert!(out.status.success(), "env list exits 0");
let all: Vec<serde_json::Value> =
serde_json::from_slice(&out.stdout).expect("env list --json is one JSON document");
all.into_iter()
.filter(|row| row["source"] == "manual")
.collect()
}
#[test]
fn another_program_is_refused_before_it_runs_and_nothing_is_stored() {
let local = scratch("refused");
let other = local.join(if cfg!(windows) {
"notepad.exe"
} else {
"notepad"
});
std::fs::write(&other, "").expect("an empty file that is not Python");
let out = pipdock(&local)
.args(["env", "add"])
.arg(&other)
.output()
.expect("runs");
assert_eq!(
out.status.code(),
Some(3),
"PD-ENV-001 is an environment error"
);
let stderr = String::from_utf8_lossy(&out.stderr);
assert!(stderr.contains("error[PD-ENV-001]"), "{stderr}");
assert!(stderr.contains("is not a Python interpreter"), "{stderr}");
let store = Store::open(&app_data(&local)).expect("the store opens");
assert!(
store.manual_envs().expect("reads").is_empty(),
"a refused path is never listed"
);
}
#[test]
fn an_entry_whose_file_is_gone_is_listed_with_its_error_and_removed_by_its_path() {
let local = scratch("gone");
let gone = local
.join("deleted-venv")
.join("Scripts")
.join("python.exe");
{
let store = Store::open(&app_data(&local)).expect("the store opens");
store
.add_manual_env(
&pipdock_core::envs::env_hash(&gone),
&gone.display().to_string(),
"2026-11-21T00:00:00Z",
)
.expect("added, as a venv later deleted would have been");
}
let rows = manual_rows(&local);
assert_eq!(rows.len(), 1, "{rows:?}");
assert_eq!(rows[0]["interpreter"], gone.display().to_string());
assert_eq!(rows[0]["error"]["code"], "PD-ENV-001");
// By the environment directory, as a person would type it: the file cannot be canonicalized
// any more, so the stored path is what matches.
let venv = local.join("deleted-venv");
let out = pipdock(&local)
.args(["env", "remove"])
.arg(&venv)
.output()
.expect("runs");
assert!(out.status.success());
let stdout = String::from_utf8_lossy(&out.stdout);
assert!(stdout.contains("removed from the list"), "{stdout}");
assert!(manual_rows(&local).is_empty(), "gone from the listing");
// Removing it again is not an error: the list is right.
let out = pipdock(&local)
.args(["env", "remove", "--json"])
.arg(&gone)
.output()
.expect("runs");
assert!(out.status.success());
let doc: serde_json::Value = serde_json::from_slice(&out.stdout).expect("one JSON document");
assert_eq!(doc["removed"], false);
}
#[test]
fn an_entry_is_removed_by_a_relative_path_typed_where_it_lives() {
// `env add .venv` stores an absolute path; `env remove .venv`, typed in the same folder, has to
// reach it. Relative text never matched before the path was made absolute.
let local = scratch("relative");
let stored = local.join("rel-venv").join("Scripts").join("python.exe");
{
let store = Store::open(&app_data(&local)).expect("the store opens");
store
.add_manual_env(
&pipdock_core::envs::env_hash(&stored),
&stored.display().to_string(),
"2026-11-21T00:00:00Z",
)
.expect("added");
}
let out = pipdock(&local)
.current_dir(&local)
.args(["env", "remove", "rel-venv", "--json"])
.output()
.expect("runs");
assert!(out.status.success());
let doc: serde_json::Value = serde_json::from_slice(&out.stdout).expect("one JSON document");
assert_eq!(doc["removed"], true, "{doc}");
let store = Store::open(&app_data(&local)).expect("the store opens");
assert!(store.manual_envs().expect("reads").is_empty());
}
/// An empty file named like another program, which nothing should ever run.
fn not_python(local: &Path) -> PathBuf {
let other = local.join(if cfg!(windows) {
"notepad.exe"
} else {
"notepad"
});
std::fs::write(&other, "").expect("an empty file that is not Python");
other
}
#[test]
fn an_added_entry_that_is_no_longer_python_is_listed_with_its_error_and_never_run() {
// What the file was when it was added says nothing about what it is now: a `python.exe` that is
// a link can be pointed at another program. Written to the store directly, since no `env add`
// would accept it — which is the point: the listing is checked on its own account.
let local = scratch("relisted");
let other = not_python(&local);
{
let store = Store::open(&app_data(&local)).expect("the store opens");
store
.add_manual_env(
&pipdock_core::envs::env_hash(&other),
&other.display().to_string(),
"2026-11-21T00:00:00Z",
)
.expect("stored");
}
let rows = manual_rows(&local);
assert_eq!(
rows.len(),
1,
"still listed, so it can be removed: {rows:?}"
);
assert_eq!(rows[0]["error"]["code"], "PD-ENV-001");
let message = rows[0]["error"]["message"].as_str().unwrap_or_default();
assert!(message.contains("is not a Python interpreter"), "{message}");
}
#[test]
fn a_default_that_is_not_python_is_skipped_with_a_warning() {
// `env use` checked nothing before 1.6.0, so a stored default can name any file.
let local = scratch("default");
let other = not_python(&local);
{
let store = Store::open(&app_data(&local)).expect("the store opens");
store
.remember_env(
&pipdock_core::envs::env_hash(&other),
&other.display().to_string(),
"2026-11-21T00:00:00Z",
true,
)
.expect("stored");
}
let empty = local.join("no-venv-here");
std::fs::create_dir_all(&empty).expect("a folder with nothing to fall back to");
let out = pipdock(&local)
.current_dir(&empty)
.arg("list")
.output()
.expect("runs");
let stderr = String::from_utf8_lossy(&out.stderr);
assert_eq!(out.status.code(), Some(3), "{stderr}");
assert!(
stderr.contains("warning: the default environment is not used"),
"{stderr}"
);
assert!(stderr.contains("is not a Python interpreter"), "{stderr}");
assert!(stderr.contains("error[PD-ENV-001]"), "{stderr}");
}
@@ -0,0 +1,47 @@
---
source: crates/pipdock-cli/tests/golden.rs
expression: "stdout_of(&[parent, child, \"--help\"])"
---
Add an interpreter discovery does not find to the list (the GUI's Add interpreter…)
Usage: pipdock env add [OPTIONS] <PATH>
Arguments:
<PATH>
Interpreter or environment directory
Options:
--env <PATH>
Interpreter or environment directory. Defaults to the one `env use` set, else an auto-detected `.venv` in the working directory
--engine <ENGINE>
Override the configured engine for this invocation
Possible values:
- pip: `<python> -m pip`
- uv: `uv pip --python <python>`
--json
Machine-readable output: exactly one JSON document on stdout (CLI-SPEC §6).
Prompts, warnings and engine output go to stderr. This said "NDJSON for streaming commands" until [VERSION], when several commands printed several documents.
-y, --yes
Assume the default at every prompt: a held-back package keeps its compatible version and an impossible one is skipped. Only `--strategy latest` forces
--quiet
Do not stream engine output to stderr. (The log file is written regardless.)
--verbose
Also write the log to stderr, at debug level
--log-file <PATH>
Also write the log to this file. The daily log in `data\logs\` is always kept
--no-snapshot
DANGEROUS: skip the pre-batch snapshot. CI images only; prints a warning.
This is the sole documented escape from DATA-FLOW §9.2, and it exists because a throwaway CI container has nothing to roll back to.
-h, --help
Print help (see a summary with '-h')
@@ -2,7 +2,7 @@
source: crates/pipdock-cli/tests/golden.rs
expression: "stdout_of(&[parent, child, \"--help\"])"
---
List discovered environments, their sources and PEP 668 flags
List discovered environments and the ones added with `env add`, their sources and PEP 668 flags
Usage: pipdock env list [OPTIONS]
@@ -0,0 +1,47 @@
---
source: crates/pipdock-cli/tests/golden.rs
expression: "stdout_of(&[parent, child, \"--help\"])"
---
Take an interpreter added with `env add` off the list. Nothing on disk is touched
Usage: pipdock env remove [OPTIONS] <PATH>
Arguments:
<PATH>
Interpreter or environment directory, as it was added
Options:
--env <PATH>
Interpreter or environment directory. Defaults to the one `env use` set, else an auto-detected `.venv` in the working directory
--engine <ENGINE>
Override the configured engine for this invocation
Possible values:
- pip: `<python> -m pip`
- uv: `uv pip --python <python>`
--json
Machine-readable output: exactly one JSON document on stdout (CLI-SPEC §6).
Prompts, warnings and engine output go to stderr. This said "NDJSON for streaming commands" until [VERSION], when several commands printed several documents.
-y, --yes
Assume the default at every prompt: a held-back package keeps its compatible version and an impossible one is skipped. Only `--strategy latest` forces
--quiet
Do not stream engine output to stderr. (The log file is written regardless.)
--verbose
Also write the log to stderr, at debug level
--log-file <PATH>
Also write the log to this file. The daily log in `data\logs\` is always kept
--no-snapshot
DANGEROUS: skip the pre-batch snapshot. CI images only; prints a warning.
This is the sole documented escape from DATA-FLOW §9.2, and it exists because a throwaway CI container has nothing to roll back to.
-h, --help
Print help (see a summary with '-h')
@@ -7,9 +7,11 @@ Manage environments
Usage: pipdock env [OPTIONS] <COMMAND>
Commands:
list List discovered environments, their sources and PEP 668 flags
use Set the default environment
help Print this message or the help of the given subcommand(s)
list List discovered environments and the ones added with `env add`, their sources and PEP 668 flags
use Set the default environment
add Add an interpreter discovery does not find to the list (the GUI's Add interpreter…)
remove Take an interpreter added with `env add` off the list. Nothing on disk is touched
help Print this message or the help of the given subcommand(s)
Options:
--env <PATH>
+4 -2
View File
@@ -21,13 +21,15 @@ async-trait = "0.1.92"
jiff = { version = "0.2.38", features = ["serde"] }
nucleo = "0.5.0"
reqwest = { version = "0.13.5", default-features = false, features = ["rustls", "http2", "json", "gzip", "charset"] }
rusqlite = { version = "0.40.2", features = ["bundled"] }
rusqlite = { version = "0.43.0", features = ["bundled"] }
schemars = "1.2.3"
serde = { version = "1.0.229", features = ["derive"] }
serde_json = "1.0.154"
sha2 = "0.11.1"
thiserror = "2.0.21"
tokio = { version = "1.53.3", features = ["rt-multi-thread", "macros", "process", "io-util", "time", "sync"] }
# `fs`: an async fn that touches a file goes through tokio's pool rather than blocking a runtime
# worker (SonarQube rust:S7493).
tokio = { version = "1.53.3", features = ["rt-multi-thread", "macros", "process", "io-util", "time", "sync", "fs"] }
# First-party tokio, for CancellationToken. The alternative was an AtomicBool plus a Notify,
# which is what CancellationToken already is, written worse.
tokio-util = "0.7.20"
-12
View File
@@ -380,18 +380,6 @@ pub struct InstallSet {
pub system: SystemPackages,
}
impl InstallSet {
/// Install `specs`, constraining nothing else.
#[must_use]
pub const fn only(specs: Vec<PinnedSpec>) -> Self {
Self {
specs,
constraints: Vec::new(),
system: SystemPackages::Protected,
}
}
}
/// The requirements (and constraints) files one engine invocation reads, deleted when dropped.
///
/// **Files, not argv.** Every plan restates the whole installed set (SP-1), one argv entry per
+479 -5
View File
@@ -47,7 +47,9 @@ pub struct ProbeResult {
/// Identity of an environment: SHA-256 of the canonicalized interpreter path (ARCHITECTURE §6).
///
/// Case-folded on Windows — see the SP-6 note above. This value keys the pin store, the snapshot
/// Case-folded on Windows — see the SP-6 note above. Links are resolved, except that a venv's own
/// interpreter is resolved only up to its folder (since 1.6.0, [`canonical_interpreter`] says why):
/// a `--symlinks` venv is not the Python it was made from. This value keys the pin store, the snapshot
/// directory and the recents list, so a change here orphans a user's data.
#[must_use]
pub fn env_hash(interpreter: &Path) -> String {
@@ -211,8 +213,159 @@ pub struct Candidate {
/// Sources are queried independently and merged by canonical identity, so a Chocolatey shim and
/// the installation it points at collapse into one entry (SP-6). The **first** source to report a
/// path wins, and sources are ordered so the more authoritative one is asked first.
///
/// Discovery alone: interpreters a person added are not here. Code Health's choice of a Python to
/// build its tools venv with reads this, and should choose among installations, not among whatever
/// the user pointed the Environments screen at.
pub async fn scan() -> Vec<Candidate> {
scan_reporting(&|_| {}).await
scan_reporting(&[], &|_| {}).await
}
/// Discovery plus the interpreters a person added (*Browse…*, `pipdock env add`), for the two
/// listings — the Environments screen and `pipdock env list`.
pub async fn scan_with(manual: &[PathBuf]) -> Vec<Candidate> {
scan_reporting(manual, &|_| {}).await
}
/// Refuse an interpreter path a person supplied before anything runs it (SECURITY §2).
///
/// Discovery finds interpreters where Python installs them. A path from *Browse…*, `pipdock env
/// add`, `env use` or `--env` can name anything, and the probe **runs** the file — so this is the
/// enforcement point, not the picker, which only suggests:
///
/// - it must exist and be a file, or there is nothing to probe;
/// - its name must be `python.exe`, `python3.exe`, `python3.12.exe` or the free-threaded
/// `python3.14t.exe` (`python`, `python3`, … off
/// Windows), so that adding an interpreter is not a way to start any program with PipDock's
/// arguments. `pythonw.exe` is refused too: it has no console, the probe's output would be empty,
/// and the failure would read as a broken environment instead of the wrong file;
/// - it must not be one of PipDock's own environments — Code Health's tools venv or the Security
/// tab's audit venv — which PipDock builds and replaces itself, and which a user's update would
/// quietly break. The check is on resolved paths too, or `..` or a link would walk past it.
///
/// **Returns the path as given, made absolute — never with its links resolved.** A venv made with
/// `--symlinks` has a `Scripts\python.exe` that is a link to the base interpreter, and running the
/// *link* is what makes Python find the venv's `pyvenv.cfg`. The first version returned the
/// canonical path, so `--env .venv` ran — and *Add interpreter…* stored — the base Python instead
/// of the venv: an update meant for a project would have changed the system's Python. Found by an
/// independent review of 1.6.0 and reproduced before fixing. Where the link really points is still
/// checked: a `python.exe` that links to another program is another program, and is refused.
///
/// A Microsoft Store app-execution alias (`%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe`) is a
/// file Windows will not resolve at all (os error 1920); it is judged by its own path, and accepted,
/// as discovery has always listed it.
///
/// # Errors
/// `PD-ENV-001` for each refusal, the message saying which. A missing file reads exactly as the
/// probe's own "no interpreter at …", so a caller that validates first changes no output.
pub fn validate_interpreter(path: &Path, app_data: &Path) -> Result<PathBuf> {
use crate::health::project::plain;
let refuse = |why: String| PdError::new(Code::EnvInterpreterMissing, why);
if !path.is_file() {
return Err(refuse(format!("no interpreter at {}", path.display())));
}
if !is_python_name(path) {
return Err(refuse(format!(
"{} is not a Python interpreter PipDock will run: the file has to be python.exe \
(or python3.exe, python3.12.exe, python3.14t.exe)",
path.display()
)));
}
let absolute = std::path::absolute(path)
.map(plain)
.map_err(|e| refuse(format!("cannot read {}: {e}", path.display())))?;
let target = path.canonicalize().map(plain).ok();
if let Some(target) = &target
&& !is_python_name(target)
{
return Err(refuse(format!(
"{} leads to {}, which is not a Python interpreter PipDock will run",
path.display(),
target.display()
)));
}
let own_dirs: Vec<PathBuf> = [
crate::health::tools_dir(app_data),
crate::health::audit_dir(app_data),
]
.iter()
.flat_map(|dir| {
[
dir.canonicalize().map(plain).ok(),
std::path::absolute(dir).map(plain).ok(),
]
})
.flatten()
.collect();
let inside_own = |p: &Path| own_dirs.iter().any(|own| p.starts_with(own));
if inside_own(&absolute) || target.as_deref().is_some_and(inside_own) {
return Err(refuse(format!(
"{} is one of PipDock's own environments, which it manages itself",
path.display()
)));
}
Ok(absolute)
}
/// `python`, `python3` or `python3.12`, with `.exe` on Windows; any case. A version may end in `t`,
/// the free-threaded build's name (`python3.14t.exe`, PEP 703) — the python.org installer puts one
/// beside `python.exe`, and the registry reports it; refusing it was found by running `env list`
/// against this machine's own Pythons.
fn is_python_name(path: &Path) -> bool {
let Some(name) = path.file_name().and_then(|n| n.to_str()) else {
return false;
};
let name = name.to_ascii_lowercase();
let stem = if cfg!(windows) {
match name.strip_suffix(".exe") {
Some(stem) => stem,
None => return false,
}
} else {
name.as_str()
};
let Some(version) = stem.strip_prefix("python") else {
return false;
};
let version = match version.strip_suffix('t') {
Some(threaded) if !threaded.is_empty() => threaded,
_ => version,
};
version.is_empty()
|| (version.split('.').count() <= 2
&& version
.split('.')
.all(|part| !part.is_empty() && part.bytes().all(|b| b.is_ascii_digit())))
}
/// An interpreter path, or the interpreter inside an environment directory (CLI-SPEC §2).
///
/// `<dir>\Scripts\python.exe` on Windows, `<dir>/bin/python` elsewhere; anything else comes back
/// unchanged, for [`validate_interpreter`] to refuse with the path the person gave.
#[must_use]
pub fn interpreter_in(path: &Path) -> PathBuf {
if path.is_file() {
return path.to_path_buf();
}
let candidate = venv_interpreter(path);
if candidate.is_file() {
candidate
} else {
path.to_path_buf()
}
}
/// Where a virtual environment's interpreter is, whether or not it is there: `<dir>\Scripts\python.exe`
/// on Windows, `<dir>/bin/python` elsewhere. `pipdock env remove <dir>` needs the answer for a venv
/// that has been deleted — exactly the entry someone wants gone, and one [`interpreter_in`] can no
/// longer resolve.
#[must_use]
pub fn venv_interpreter(dir: &Path) -> PathBuf {
if cfg!(windows) {
dir.join("Scripts").join("python.exe")
} else {
dir.join("bin").join("python")
}
}
/// Where a discovery sweep currently is.
@@ -260,11 +413,21 @@ pub enum ScanPhase {
/// How many sources a sweep reads, for the `total` a caller renders against.
const SCAN_SOURCES: usize = 5;
/// Discover environments, reporting progress as each source is read.
/// Discover environments, reporting progress as each source is read, and append the interpreters a
/// person added.
///
/// `manual` comes last, so an interpreter discovery also finds keeps the discovered source — the
/// chip says where Python put it, which is the more useful fact. Unlike every discovered path, a
/// manual one is kept **when its file is gone**: dropping it would make an entry the user added
/// vanish without a word, and with no row there would be nothing to remove it from. Its probe then
/// fails with `PD-ENV-001`, whose remedy is exactly that removal.
///
/// The callback is synchronous and must not block: it is called between sources, on the task
/// driving the scan.
pub async fn scan_reporting(report: &(dyn Fn(ScanProgress) + Sync)) -> Vec<Candidate> {
pub async fn scan_reporting(
manual: &[PathBuf],
report: &(dyn Fn(ScanProgress) + Sync),
) -> Vec<Candidate> {
let step = |phase: ScanPhase, done: usize| ScanProgress {
phase,
done,
@@ -299,8 +462,69 @@ pub async fn scan_reporting(report: &(dyn Fn(ScanProgress) + Sync)) -> Vec<Candi
.or_insert(Candidate { path, source });
}
}
merge_manual(found, manual)
}
found.into_values().collect()
/// Discovered candidates in canonical order, then the manual ones no source already reported, in
/// the order they were added.
///
/// Compared by the path as listed — made absolute, case-folded on Windows — and **not** by
/// [`canonical_interpreter`]: the first version compared identities, and while identity still
/// followed a venv's link, a venv made with `--symlinks` collapsed into the base interpreter its
/// `python.exe` points at and the venv a person added was never listed. Identity resolves other
/// links still, and what a person added is listed as they added it.
fn merge_manual(found: BTreeMap<String, Candidate>, manual: &[PathBuf]) -> Vec<Candidate> {
let mut out: Vec<Candidate> = found.into_values().collect();
let mut seen: std::collections::HashSet<String> =
out.iter().map(|c| listing_key(&c.path)).collect();
for path in manual {
if seen.insert(listing_key(path)) {
out.push(Candidate {
path: path.clone(),
source: EnvSource::Manual,
});
}
}
out
}
/// A path as a listing compares it: absolute, case-folded on Windows, links left alone.
fn listing_key(path: &Path) -> String {
let absolute = std::path::absolute(path).unwrap_or_else(|_| path.to_path_buf());
let text = absolute.display().to_string();
if cfg!(windows) {
text.to_lowercase()
} else {
text
}
}
/// Probe a candidate a listing returned — the one place both heads decide what a listing runs.
///
/// An added interpreter goes through [`validate_interpreter`] again on **every** listing, not only
/// on the day it was added: that check said what the file was then, and a `python.exe` that is a
/// link can be pointed at another program afterwards. `env_scan` and `env list` probed stored
/// entries unchecked until an independent review of 1.6.0 said so. A discovered path is probed as
/// found — discovery read it from where Python installs interpreters, and no person typed it.
///
/// # Errors
/// What [`validate_interpreter`] or [`probe`] reports: `PD-ENV-001` for a file that is gone (in the
/// probe's own words) or is not a Python PipDock will run, `PD-ENV-003` for a probe that fails.
pub async fn probe_listed(candidate: &Candidate, app_data: &Path) -> Result<ProbeResult> {
if candidate.source == EnvSource::Manual {
let path = candidate.path.clone();
let app_data = app_data.to_path_buf();
// On a blocking thread: the check reads the file system (`rust:S7493`).
tokio::task::spawn_blocking(move || validate_interpreter(&path, &app_data))
.await
.map_err(|e| {
PdError::new(
Code::IntUnexpected,
format!("interpreter check stopped: {e}"),
)
})??;
}
probe(&candidate.path, candidate.source).await
}
/// PEP 514 registry entries: `HKCU`, and both views of `HKLM`.
@@ -465,6 +689,223 @@ mod tests {
}
}
fn scratch(name: &str) -> PathBuf {
let dir = std::env::temp_dir().join(format!("pd-envs-{name}-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(&dir).expect("create scratch dir");
dir
}
/// An empty file at `dir/rel`, which is all [`validate_interpreter`] looks at — it never runs it.
fn touch(dir: &Path, rel: &str) -> PathBuf {
let path = dir.join(rel);
std::fs::create_dir_all(path.parent().expect("a parent")).expect("parents");
std::fs::write(&path, "").expect("write");
path
}
fn exe(stem: &str) -> String {
if cfg!(windows) {
format!("{stem}.exe")
} else {
stem.to_owned()
}
}
#[test]
fn only_a_file_named_like_python_is_accepted() {
// The free-threaded build (PEP 703) is `python3.14t.exe`, beside `python.exe` in the same
// install — the registry lists it on this repository's own reference machine.
for name in [
"python",
"PYTHON",
"python3",
"python3.12",
"Python3.14",
"python3.14t",
"python3t",
] {
assert!(is_python_name(Path::new(&exe(name))), "{name}");
}
// pythonw has no console; the rest are other programs, or versions that are not versions.
for name in [
"pythonw",
"pythonw3.14t",
"pythont",
"python3.14tt",
"notepad",
"py",
"python3.12.1",
"python3.",
"python.3",
"python3x",
"mypython",
] {
assert!(!is_python_name(Path::new(&exe(name))), "{name}");
}
if cfg!(windows) {
assert!(
!is_python_name(Path::new("python.bat")),
"a script is not an exe"
);
assert!(
!is_python_name(Path::new("python")),
"Windows needs the .exe"
);
}
}
#[test]
fn a_missing_interpreter_reads_exactly_as_the_probe_says_it() {
// The CLI's error-envelope goldens pin this sentence for `--env C:/definitely/not/here`.
let err = validate_interpreter(Path::new("C:/definitely/not/here"), &scratch("missing"))
.expect_err("nothing there");
assert_eq!(err.code, Code::EnvInterpreterMissing);
assert_eq!(err.message, "no interpreter at C:/definitely/not/here");
}
#[test]
fn another_program_is_refused_before_anything_runs_it() {
let dir = scratch("other");
let notepad = touch(&dir, &exe("notepad"));
let err = validate_interpreter(&notepad, &dir.join("data")).expect_err("not python");
assert_eq!(err.code, Code::EnvInterpreterMissing);
assert!(
err.message.contains("is not a Python interpreter"),
"{}",
err.message
);
}
#[test]
fn a_python_is_accepted_and_comes_back_absolute_and_plain() {
let dir = scratch("ok");
let python = touch(&dir, &format!("proj/.venv/Scripts/{}", exe("python")));
let got = validate_interpreter(&python, &dir.join("data")).expect("a python");
assert!(
!got.display().to_string().starts_with(r"\\?\"),
"no verbatim prefix: {}",
got.display()
);
assert_eq!(got, std::path::absolute(&python).expect("absolute"));
}
/// A link, or `None` where this machine may not make one (Windows without Developer Mode).
fn link(target: &Path, at: &Path) -> Option<()> {
std::fs::create_dir_all(at.parent().expect("a parent")).expect("parents");
#[cfg(windows)]
let made = std::os::windows::fs::symlink_file(target, at);
#[cfg(not(windows))]
let made = std::os::unix::fs::symlink(target, at);
made.ok()
}
#[test]
fn a_symlinked_venv_keeps_its_own_path_and_a_link_to_another_program_is_refused() {
// `python -m venv --symlinks`: the venv's python.exe links to the base interpreter, and
// only running the link finds the venv. Resolving it handed back — and stored — the base.
let dir = scratch("links");
let base = touch(&dir, &format!("base/{}", exe("python")));
let venv_python = dir.join("venv").join("Scripts").join(exe("python"));
let Some(()) = link(&base, &venv_python) else {
eprintln!("skipped: this machine cannot create symbolic links");
return;
};
let got = validate_interpreter(&venv_python, &dir.join("data")).expect("a python");
assert_eq!(got, std::path::absolute(&venv_python).expect("absolute"));
assert_ne!(
got,
std::path::absolute(&base).expect("absolute"),
"not the base"
);
// A python.exe that is really another program is still another program.
let other = touch(&dir, &format!("tools/{}", exe("notepad")));
let disguised = dir.join("disguise").join(exe("python"));
link(&other, &disguised).expect("links work here");
let err = validate_interpreter(&disguised, &dir.join("data")).expect_err("not python");
assert!(err.message.contains("leads to"), "{}", err.message);
}
#[test]
fn pipdocks_own_environments_are_refused_even_through_dot_dot() {
let dir = scratch("own");
let app_data = dir.join("data");
for own in ["tools", "audit"] {
let python = touch(&app_data, &format!("{own}/.venv/Scripts/{}", exe("python")));
let err = validate_interpreter(&python, &app_data).expect_err("PipDock's own");
assert!(err.message.contains("PipDock's own"), "{}", err.message);
// Reached the long way round: canonicalized before the comparison, or `..` walks past.
let sideways = app_data
.join("elsewhere")
.join("..")
.join(own)
.join(".venv")
.join("Scripts")
.join(exe("python"));
std::fs::create_dir_all(app_data.join("elsewhere")).expect("dir");
let err = validate_interpreter(&sideways, &app_data).expect_err("still PipDock's own");
assert!(err.message.contains("PipDock's own"), "{}", err.message);
}
// A sibling whose name merely starts with "tools" is someone else's.
let neighbour = touch(&app_data, &format!("tools-mine/{}", exe("python")));
validate_interpreter(&neighbour, &app_data).expect("not inside tools");
}
#[test]
fn an_environment_directory_resolves_to_its_interpreter() {
let dir = scratch("dir");
let inside = if cfg!(windows) {
format!("venv/Scripts/{}", exe("python"))
} else {
"venv/bin/python".to_owned()
};
let python = touch(&dir, &inside);
assert_eq!(interpreter_in(&dir.join("venv")), python);
assert_eq!(interpreter_in(&python), python, "a file is itself");
let nothing = dir.join("nothing-here");
assert_eq!(
interpreter_in(&nothing),
nothing,
"left for the validator to refuse"
);
}
#[test]
fn manual_entries_come_last_and_never_shadow_discovery() {
let discovered = PathBuf::from(r"C:\Python314\python.exe");
let mut found = BTreeMap::new();
found.insert(
canonical_interpreter(&discovered),
Candidate {
path: discovered.clone(),
source: EnvSource::Registry,
},
);
let manual = [
PathBuf::from(r"D:\work\proj\myenv\Scripts\python.exe"),
// The same interpreter the registry reported, in other casing: discovery keeps it.
PathBuf::from(r"c:\python314\python.exe"),
// Added twice, listed once.
PathBuf::from(r"D:\work\proj\myenv\Scripts\python.exe"),
// Gone from disk: still listed, so it can be removed.
PathBuf::from(r"E:\gone\python.exe"),
];
let merged = merge_manual(found, &manual);
let sources: Vec<_> = merged.iter().map(|c| (c.path.clone(), c.source)).collect();
let mut expected = vec![(discovered, EnvSource::Registry)];
if !cfg!(windows) {
// Off Windows the casing differs, so the second is its own interpreter.
expected.push((manual[0].clone(), EnvSource::Manual));
expected.push((manual[1].clone(), EnvSource::Manual));
} else {
expected.push((manual[0].clone(), EnvSource::Manual));
}
expected.push((manual[3].clone(), EnvSource::Manual));
assert_eq!(sources, expected);
}
#[test]
fn env_hash_is_stable_and_case_insensitive_on_windows() {
// SP-6: the Chocolatey shim and the direct install differ only in casing. Two hashes for
@@ -692,4 +1133,37 @@ mod tests {
.expect_err("missing interpreter must fail");
assert_eq!(err.code, Code::EnvInterpreterMissing);
}
#[tokio::test]
async fn an_added_entry_is_checked_again_on_every_listing() {
// The store held a Python when it was added; what it holds now is another program. Refused
// before anything runs it, and still a row — PD-ENV-001 — so it can be removed.
let dir = scratch("relisted");
let added = Candidate {
path: touch(&dir, &exe("notepad")),
source: EnvSource::Manual,
};
let err = probe_listed(&added, &dir.join("data"))
.await
.expect_err("refused");
assert_eq!(err.code, Code::EnvInterpreterMissing);
assert!(
err.message.contains("is not a Python interpreter"),
"{}",
err.message
);
// An entry whose file is gone reads exactly as the probe has always said it.
let gone = Candidate {
path: dir.join("deleted").join(exe("python")),
source: EnvSource::Manual,
};
let err = probe_listed(&gone, &dir.join("data"))
.await
.expect_err("gone");
assert_eq!(
err.message,
format!("no interpreter at {}", gone.path.display())
);
}
}
@@ -421,6 +421,13 @@ static CLASSIFIERS: &[Classifier] = &[
code: Code::BldBackendFailed,
all_of: &["backendunavailable"],
},
// pip 26.3's rendering of the same failure: the `BackendUnavailable` traceback became the
// `backend-unavailable` diagnostic, and its last line, "Failed to build '<name>' when calling
// build backend hook …", is what the generic wheel rule below would otherwise claim.
Classifier {
code: Code::BldBackendFailed,
all_of: &["error: backend-unavailable"],
},
Classifier {
code: Code::BldBackendFailed,
all_of: &["the build backend returned an error"],
+134 -1
View File
@@ -625,9 +625,19 @@ pub fn user_file_error(path: &Path, e: &std::io::Error) -> PdError {
/// — a Chocolatey shim yields `c:\python314\python.exe` where the direct install yields
/// `C:\Python314\python.exe`. `env_hash` is derived from this string (ARCHITECTURE §6), so without
/// case folding one environment would silently split its pins and snapshot history in two.
///
/// **Links are followed — except the one a virtual environment's own interpreter can be.** A venv
/// made with `python -m venv --symlinks` (the default off Windows) has a `python.exe` that links to
/// the Python it was made from, and following it made the venv the same environment as its base:
/// one pin store, one snapshot history, one cached graph, report and audit. Until 1.6.0 nothing in
/// the GUI could list the two apart, so nothing showed it; *Add interpreter…* can, and an
/// independent review of 1.6.0 found what came with it. For an interpreter whose environment has a
/// `pyvenv.cfg`, the folders are resolved and the file's own name is kept. Only such a venv's
/// identity changed: every other path, a copied venv's included, resolves exactly as it did, and a
/// linked venv's pins and snapshots from before stay with the base they were always filed under.
#[must_use]
pub fn canonical_interpreter(path: &Path) -> String {
let resolved = std::fs::canonicalize(path).unwrap_or_else(|_| path.to_path_buf());
let resolved = identity_path(path);
let text = resolved.display().to_string();
// Strip the Windows verbatim prefix canonicalize() adds; it is noise in logs and in the hash.
let text = text.strip_prefix(r"\\?\").unwrap_or(&text).to_owned();
@@ -638,6 +648,21 @@ pub fn canonical_interpreter(path: &Path) -> String {
}
}
/// The path [`canonical_interpreter`] names: every link resolved, but a venv's own interpreter only
/// up to its folder. A venv is recognised by the `pyvenv.cfg` beside `Scripts\` (`bin/` off
/// Windows), which is how Python itself recognises one.
fn identity_path(path: &Path) -> PathBuf {
if let (Some(dir), Some(name)) = (path.parent(), path.file_name())
&& dir
.parent()
.is_some_and(|prefix| prefix.join("pyvenv.cfg").is_file())
&& let Ok(dir) = std::fs::canonicalize(dir)
{
return dir.join(name);
}
std::fs::canonicalize(path).unwrap_or_else(|_| path.to_path_buf())
}
#[cfg(test)]
mod tests {
use super::*;
@@ -1038,6 +1063,35 @@ mod tests {
);
}
#[test]
fn a_file_the_user_chose_is_never_blamed_on_the_environment() {
// U25. An export, a saved report or a requirements file is the user's own path, so a
// refusal there is about that folder — not PD-PRM-001's "PipDock may not write to this
// environment", and not PD-SYS-002's full disk.
use std::io::{Error, ErrorKind};
let p = Path::new(r"C:\Users\me\Desktop\requirements.txt");
assert_eq!(
user_file_error(p, &Error::from_raw_os_error(32)).code,
Code::PrmFileLocked,
"ERROR_SHARING_VIOLATION: another program has it open"
);
for kind in [ErrorKind::PermissionDenied, ErrorKind::ReadOnlyFilesystem] {
assert_eq!(
user_file_error(p, &Error::from(kind)).code,
Code::PrmSourceReadOnly,
"{kind:?}"
);
}
// Everything else is what any file failure is.
assert_eq!(
user_file_error(p, &Error::from_raw_os_error(112)).code,
Code::SysDiskFull
);
let missing = user_file_error(p, &Error::from(ErrorKind::NotFound));
assert_eq!(missing.code, Code::IntUnexpected);
assert!(missing.message.contains("requirements.txt"), "{missing}");
}
#[test]
fn interpreter_identity_is_case_folded_on_windows() {
// SP-6: the Chocolatey shim and the direct install differ only in casing, and env_hash is
@@ -1054,4 +1108,83 @@ mod tests {
let p = canonical_interpreter(Path::new("."));
assert!(!p.starts_with(r"\\?\"), "got {p}");
}
fn identity_scratch(name: &str) -> PathBuf {
let dir = std::env::temp_dir().join(format!("pd-identity-{name}-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(&dir).expect("scratch dir");
dir
}
fn file_at(path: &Path) -> PathBuf {
std::fs::create_dir_all(path.parent().expect("a parent")).expect("parents");
std::fs::write(path, "").expect("write");
path.to_path_buf()
}
/// A file link, or `None` where this machine may not make one (Windows without Developer Mode).
fn file_link(target: &Path, at: &Path) -> Option<()> {
std::fs::create_dir_all(at.parent().expect("a parent")).expect("parents");
#[cfg(windows)]
let made = std::os::windows::fs::symlink_file(target, at);
#[cfg(not(windows))]
let made = std::os::unix::fs::symlink(target, at);
made.ok()
}
/// What the identity was before 1.6.0, for every path it did not mean to change.
fn resolved_fully(path: &Path) -> String {
let text = std::fs::canonicalize(path)
.expect("exists")
.display()
.to_string();
let text = text.strip_prefix(r"\\?\").unwrap_or(&text).to_owned();
if cfg!(windows) {
text.to_lowercase()
} else {
text
}
}
#[test]
fn a_venv_made_with_symlinks_is_its_own_environment() {
let dir = identity_scratch("venv");
let bin = if cfg!(windows) { "Scripts" } else { "bin" };
let exe = if cfg!(windows) {
"python.exe"
} else {
"python"
};
let base = file_at(&dir.join("base").join(exe));
// A copied venv — Windows' default — resolves exactly as before.
let copied = file_at(&dir.join("copied").join(bin).join(exe));
file_at(&dir.join("copied").join("pyvenv.cfg"));
assert_eq!(canonical_interpreter(&copied), resolved_fully(&copied));
assert_eq!(canonical_interpreter(&base), resolved_fully(&base));
let linked = dir.join("linked").join(bin).join(exe);
let Some(()) = file_link(&base, &linked) else {
eprintln!("skipped: this machine cannot create symbolic links");
return;
};
// A link that is not a venv's still resolves: two names for one file are one Python.
let alias = dir.join("alias").join(exe);
file_link(&base, &alias).expect("links work here");
assert_eq!(canonical_interpreter(&alias), canonical_interpreter(&base));
// Before it is a venv, the link is the base; once `pyvenv.cfg` says so, it is itself.
assert_eq!(canonical_interpreter(&linked), canonical_interpreter(&base));
file_at(&dir.join("linked").join("pyvenv.cfg"));
assert_ne!(
canonical_interpreter(&linked),
canonical_interpreter(&base),
"the venv is not the Python it was made from"
);
let folder = resolved_fully(&dir.join("linked").join(bin));
assert_eq!(
canonical_interpreter(&linked),
format!("{folder}{}{exe}", std::path::MAIN_SEPARATOR)
);
}
}
+1 -1
View File
@@ -741,7 +741,7 @@ fn log_summary(flow: &str, summary: &Result<crate::plan::ExecutionSummary>) {
"executed"
),
Err(e) => {
tracing::warn!(target: "pipdock::flow", flow, code = %e.code, message = %e.message, "refused")
tracing::warn!(target: "pipdock::flow", flow, code = %e.code, error = %e.message, "refused")
}
}
}
+10 -6
View File
@@ -488,21 +488,25 @@ pub async fn sync_tools_venv(
let requirements = tools_dir.join(REQUIREMENTS_FILE);
let manifest_path = tools_dir.join(MANIFEST_FILE);
std::fs::create_dir_all(tools_dir).map_err(|e| fs_failure("create the tools directory", &e))?;
tokio::fs::create_dir_all(tools_dir)
.await
.map_err(|e| fs_failure("create the tools directory", &e))?;
// Deleted **before** anything is touched, which inverts `snapshot::create`'s data-then-metadata
// ordering — and for the opposite reason. A snapshot writes a sidecar that did not exist; a
// re-sync replaces a manifest that already describes the *old* pin set. If the sync then dies
// half-way, a surviving manifest would claim tools that have just been part-replaced. With it
// gone, a torn sync reads as `NeverSynced` and the next run redoes the whole thing.
let _ = std::fs::remove_file(&manifest_path);
let _ = tokio::fs::remove_file(&manifest_path).await;
// A rendering of the ledger, not a copy: this is where the *other* venv's pins, the comments,
// and whatever line endings the build machine checked out stop.
std::fs::write(&requirements, requirements_body(&pins))
tokio::fs::write(&requirements, requirements_body(&pins))
.await
.map_err(|e| fs_failure("write the tools requirements", &e))?;
let constraints = tools_dir.join(CONSTRAINTS_FILE);
std::fs::write(&constraints, constraints_body())
tokio::fs::write(&constraints, constraints_body())
.await
.map_err(|e| fs_failure("write the tools constraints", &e))?;
// The venv is rebuilt, not repaired. `pip install -r` over an existing venv is a no-op when
@@ -541,8 +545,8 @@ pub async fn sync_tools_venv(
)
})?;
// Written last: until it exists, the venv is not claimed to be anything.
if let Err(e) = std::fs::write(&manifest_path, json) {
let _ = std::fs::remove_file(&manifest_path);
if let Err(e) = tokio::fs::write(&manifest_path, json).await {
let _ = tokio::fs::remove_file(&manifest_path).await;
return Err(fs_failure("write the tools manifest", &e));
}
Ok(manifest)
+3 -3
View File
@@ -222,7 +222,7 @@ async fn run_one(
if tool == "deptry"
&& let Some(parent) = report_path.parent()
{
std::fs::create_dir_all(parent).map_err(|e| {
tokio::fs::create_dir_all(parent).await.map_err(|e| {
PdError::new(
Code::HltToolFailed,
format!("could not make room for deptry's report: {e}"),
@@ -241,7 +241,7 @@ async fn run_one(
let stdout = match out {
Ok(out) if super::is_findings_exit(tool, out.code) => {
if tool == "deptry" {
std::fs::read_to_string(&report_path).map_err(|e| {
tokio::fs::read_to_string(&report_path).await.map_err(|e| {
PdError::new(
Code::HltToolFailed,
format!("deptry exited cleanly but wrote no report: {e}"),
@@ -261,7 +261,7 @@ async fn run_one(
// Cleaned on both paths: `%LOCALAPPDATA%\PipDock\data` is what SECURITY §8 promises a delete
// resets, and leaving a report per run turns that into a slow leak.
let _ = std::fs::remove_file(&report_path);
let _ = tokio::fs::remove_file(&report_path).await;
stdout
}
+78 -33
View File
@@ -301,39 +301,7 @@ pub async fn refresh(app_data: &std::path::Path, now: jiff::Timestamp) -> Result
.await
.map_err(|e| net_err("could not read the package index", &e))?;
let wire_bytes = body.len();
// Typed, borrowing the names out of the body: a `serde_json::Value` of 700,000 objects is the
// whole document again in allocations, for a parse that only wants one field of each (M36).
#[derive(serde::Deserialize)]
struct Simple<'a> {
#[serde(borrow)]
projects: Vec<Project<'a>>,
}
#[derive(serde::Deserialize)]
struct Project<'a> {
#[serde(borrow)]
name: std::borrow::Cow<'a, str>,
}
let doc: Simple<'_> = serde_json::from_slice(&body).map_err(|e| {
PdError::new(
Code::NetIndexRefreshFailed,
format!("the package index is not the PEP 691 document: {e}"),
)
})?;
// An empty list is not an index, whatever said it was: a captive portal or a broken mirror.
// Ingesting it replaced every name with none, and search found nothing until the next week's
// refresh (L55).
if doc.projects.is_empty() {
return Err(PdError::new(
Code::NetIndexRefreshFailed,
"the package index listed no projects; the previous index is kept",
));
}
let rows: Vec<(String, String)> = doc
.projects
.iter()
.map(|p| (crate::model::normalize_name(&p.name), p.name.to_string()))
.collect();
let rows = parse_simple_index(&body)?;
// Opened only now, after the download, and on a blocking thread: hundreds of thousands of
// inserts are a second of synchronous work, which on an async worker stalls every other task
@@ -356,6 +324,46 @@ pub async fn refresh(app_data: &std::path::Path, now: jiff::Timestamp) -> Result
})
}
/// PEP 691's project list as `(normalized, display)` rows — everything `refresh` decides about a
/// body it was given, apart from the download, so it can be held without a network.
///
/// # Errors
/// `PD-NET-010` for a body that is not the document, or one that lists no projects.
fn parse_simple_index(body: &[u8]) -> Result<Vec<(String, String)>> {
// Typed, borrowing the names out of the body: a `serde_json::Value` of 700,000 objects is the
// whole document again in allocations, for a parse that only wants one field of each (M36).
#[derive(serde::Deserialize)]
struct Simple<'a> {
#[serde(borrow)]
projects: Vec<Project<'a>>,
}
#[derive(serde::Deserialize)]
struct Project<'a> {
#[serde(borrow)]
name: std::borrow::Cow<'a, str>,
}
let doc: Simple<'_> = serde_json::from_slice(body).map_err(|e| {
PdError::new(
Code::NetIndexRefreshFailed,
format!("the package index is not the PEP 691 document: {e}"),
)
})?;
// An empty list is not an index, whatever said it was: a captive portal or a broken mirror.
// Ingesting it replaced every name with none, and search found nothing until the next week's
// refresh (L55).
if doc.projects.is_empty() {
return Err(PdError::new(
Code::NetIndexRefreshFailed,
"the package index listed no projects; the previous index is kept",
));
}
Ok(doc
.projects
.iter()
.map(|p| (crate::model::normalize_name(&p.name), p.name.to_string()))
.collect())
}
/// Replace the `names` table's contents in one transaction.
///
/// All-or-nothing on purpose: a refresh interrupted half-way must not leave a partial index that
@@ -641,6 +649,43 @@ fn net_code(chain: &str) -> Code {
mod tests {
use super::*;
#[test]
fn a_pep_691_body_becomes_normalized_rows_with_the_display_name_kept() {
let rows = parse_simple_index(
br#"{"meta": {"api-version": "1.1"},
"projects": [{"name": "Flask"}, {"name": "zope.interface"}, {"name": "ruamel_yaml"}]}"#,
)
.expect("a real index");
assert_eq!(
rows,
[
("flask".to_owned(), "Flask".to_owned()),
("zope-interface".to_owned(), "zope.interface".to_owned()),
("ruamel-yaml".to_owned(), "ruamel_yaml".to_owned()),
]
);
}
#[test]
fn an_empty_project_list_is_refused_rather_than_wiping_the_index() {
// L55: a captive portal or a broken mirror answering 200 with nothing in it.
let err = parse_simple_index(br#"{"meta": {"api-version": "1.1"}, "projects": []}"#)
.expect_err("an index with no projects");
assert_eq!(err.code, Code::NetIndexRefreshFailed);
assert!(err.message.contains("previous index is kept"), "{err}");
}
#[test]
fn a_body_that_is_not_the_document_is_an_index_error() {
for body in [
&b"<html>Sign in to the Wi-Fi</html>"[..],
br#"{"projects": "all"}"#,
] {
let err = parse_simple_index(body).expect_err("not PEP 691");
assert_eq!(err.code, Code::NetIndexRefreshFailed);
}
}
fn index(names: &[&str]) -> NameIndex {
NameIndex {
entries: names
+22
View File
@@ -1239,4 +1239,26 @@ mod tests {
"the schema must not promise it either"
);
}
#[test]
fn a_plan_confirmed_for_one_environment_is_refused_in_another() {
// DATA-FLOW §9.3 has two halves the flow tests drive end to end — age and drift. The
// third refusal sits in front of both: a plan accepted for one interpreter, executed
// against another, would install a preview nobody was shown for that environment.
let now = jiff::Timestamp::now();
let plan = AcceptedPlan::accept(
"plan-1".to_owned(),
ResolutionReport::default(),
"hash-of-a".to_owned(),
&[],
now,
);
let err = plan
.verify("hash-of-b", &[], now)
.expect_err("another environment");
assert_eq!(err.code, Code::ResPlanStale);
assert!(err.message.contains("different environment"), "{err}");
plan.verify("hash-of-a", &[], now)
.expect("the environment it was made for, unchanged, a moment later");
}
}
+56 -8
View File
@@ -118,14 +118,18 @@ async fn fetch(name: &PkgName, version: &Version) -> Option<Option<String>> {
return None;
}
let doc: serde_json::Value = response.json().await.ok()?;
Some(
doc.get("info")
.and_then(|i| i.get("requires_python"))
.and_then(serde_json::Value::as_str)
.map(str::trim)
.filter(|s| !s.is_empty())
.map(str::to_owned),
)
Some(declared_in(&doc))
}
/// `info.requires_python` of a release document, `None` when it is absent, null or blank — all
/// three of which PyPI serves for a release that declares nothing.
fn declared_in(doc: &serde_json::Value) -> Option<String> {
doc.get("info")
.and_then(|i| i.get("requires_python"))
.and_then(serde_json::Value::as_str)
.map(str::trim)
.filter(|s| !s.is_empty())
.map(str::to_owned)
}
/// Look up many releases at once, at most [`LOOKUP_CONCURRENCY`] in flight. Releases with no
@@ -232,4 +236,48 @@ mod tests {
assert_eq!(meta.cached(&name, &free), Some(None));
let _ = std::fs::remove_dir_all(&dir);
}
#[tokio::test]
async fn a_remembered_release_is_answered_without_asking_pypi() {
// Both answers come from the store: a constraint, and "declares nothing". Neither
// reaches the network, which this test has no way to offer.
let dir = std::env::temp_dir().join(format!("pd-release-cached-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
let meta = PyPiReleases::new(&dir);
let name = pkg("scipy");
meta.remember(&name, &Version("1.7.3".into()), Some(">=3.7,<3.10"));
meta.remember(&name, &Version("1.16.0".into()), None);
let capped = meta.requires_python(&name, &Version("1.7.3".into())).await;
let free = meta.requires_python(&name, &Version("1.16.0".into())).await;
let _ = std::fs::remove_dir_all(&dir);
assert_eq!(capped.as_deref(), Some(">=3.7,<3.10"));
assert_eq!(free, None);
}
#[tokio::test]
async fn a_version_that_is_not_pep_440_never_reaches_a_url() {
// `fetch` puts the version into a URL path; anything else is unknown, which never blocks,
// and is not remembered as if it were an answer.
let dir = std::env::temp_dir().join(format!("pd-release-url-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
let meta = PyPiReleases::new(&dir);
let (name, odd) = (pkg("scipy"), Version("1.0/../../evil".into()));
assert_eq!(meta.requires_python(&name, &odd).await, None);
assert_eq!(meta.cached(&name, &odd), None, "a failure is not an answer");
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
fn a_release_document_s_constraint_is_read_trimmed_and_blank_is_none() {
let doc = |v: serde_json::Value| serde_json::json!({ "info": { "requires_python": v } });
assert_eq!(
declared_in(&doc(" >=3.9 ".into())).as_deref(),
Some(">=3.9")
);
assert_eq!(declared_in(&doc("".into())), None);
assert_eq!(declared_in(&doc(serde_json::Value::Null)), None);
assert_eq!(declared_in(&serde_json::json!({ "info": {} })), None);
assert_eq!(declared_in(&serde_json::json!({ "urls": [] })), None);
}
}
+1 -1
View File
@@ -17,7 +17,7 @@
use crate::model::EngineId;
/// Where the template lives. Not configurable: an issue URL a caller can set is a phishing vector.
const ISSUE_URL: &str = "https://github.com/poli0981/pipdock/issues/new?template=bug_report.yml";
const ISSUE_URL: &str = "https://github.com/poli0981org/pipdock/issues/new?template=bug_report.yml";
/// What a head knows about the failure it is reporting.
#[derive(Debug, Clone, Default)]
+219 -2
View File
@@ -20,7 +20,7 @@ use crate::errors::{Code, PdError, Result};
pub const DB_FILE: &str = "index.db";
/// Schema version this build expects. Bump when adding a migration.
pub const SCHEMA_VERSION: i64 = 4;
pub const SCHEMA_VERSION: i64 = 5;
/// An open store.
#[derive(Debug)]
@@ -192,6 +192,16 @@ impl Store {
version TEXT NOT NULL,
requires_python TEXT,
PRIMARY KEY (normalized, version)
);
-- v5. Interpreters a person added - Browse... in the GUI, `pipdock env add` in the
-- CLI - for discovery to list beside its own (PRD P0-1). Not the `envs` table:
-- that is the CLI's recents and its starred default, and adding an interpreter to
-- the list is not choosing it. Same env_hash as everywhere, case-folded (SP-6).
CREATE TABLE IF NOT EXISTS manual_envs (
env_hash TEXT PRIMARY KEY,
interpreter TEXT NOT NULL,
added_at TEXT NOT NULL
);",
)
.map_err(sql)?;
@@ -203,6 +213,17 @@ impl Store {
}
}
/// An interpreter a person added with *Browse…* or `pipdock env add`.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ManualEnv {
/// Identity, case-folded (SP-6).
pub env_hash: String,
/// The canonical interpreter path, as stored.
pub interpreter: String,
/// RFC 3339, which orders the list.
pub added_at: String,
}
/// A remembered environment (ARCHITECTURE §6, PRD P0-1 "recents persisted").
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct RecentEnv {
@@ -285,6 +306,81 @@ impl Store {
Ok(self.recent_envs()?.into_iter().find(|e| e.is_default))
}
/// Put an interpreter a person added on the list (PRD P0-1's manual browse).
///
/// Adding one that is already there keeps its place and its date — the list is in the order
/// things were added, and adding again is not a new addition — but takes the path as given
/// this time, which is the absolute one [`crate::envs::validate_interpreter`] returned, links
/// left alone.
///
/// Keyed by `env_hash`, so two names for one interpreter are one entry. A venv made with
/// `--symlinks` has an identity of its own since 1.6.0 (`exec::canonical_interpreter`), and is
/// not its base's entry.
///
/// # Errors
/// `PD-INT-001` when the write fails.
pub fn add_manual_env(&self, env_hash: &str, interpreter: &str, now: &str) -> Result<()> {
self.conn
.execute(
"INSERT INTO manual_envs (env_hash, interpreter, added_at) VALUES (?1, ?2, ?3)
ON CONFLICT (env_hash) DO UPDATE SET interpreter = excluded.interpreter",
rusqlite::params![env_hash, interpreter, now],
)
.map_err(|e| PdError::new(Code::IntUnexpected, format!("manual env store: {e}")))?;
Ok(())
}
/// The interpreters a person added, oldest first.
///
/// # Errors
/// `PD-INT-001` when the read fails.
pub fn manual_envs(&self) -> Result<Vec<ManualEnv>> {
let err = |e: rusqlite::Error| {
PdError::new(Code::IntUnexpected, format!("manual env store: {e}"))
};
let mut stmt = self
.conn
.prepare(
"SELECT env_hash, interpreter, added_at FROM manual_envs
ORDER BY added_at, rowid",
)
.map_err(err)?;
let rows = stmt
.query_map([], |r| {
Ok(ManualEnv {
env_hash: r.get(0)?,
interpreter: r.get(1)?,
added_at: r.get(2)?,
})
})
.map_err(err)?;
rows.collect::<std::result::Result<Vec<_>, _>>()
.map_err(err)
}
/// Take an interpreter off the list. Only the entry goes: nothing on disk is touched, and the
/// pins, snapshots and Health folder keyed to the same `env_hash` stay, ready for the day it
/// is added — or discovered — again.
///
/// **Matched by identity or by the stored path**, case-insensitively for the path. An
/// interpreter whose file is gone can no longer be canonicalized into the identity it was added
/// under — on a network share the two spellings differ (`\\server\share` against
/// `UNC\server\share`) — and that entry, listed with PD-ENV-001, is exactly the one a person
/// wants removed. By hash alone, removing it reported success and the next scan brought it back.
///
/// # Errors
/// `PD-INT-001` when the write fails. `Ok(false)` when it was not on the list.
pub fn remove_manual_env(&self, env_hash: &str, interpreter: &str) -> Result<bool> {
let removed = self
.conn
.execute(
"DELETE FROM manual_envs WHERE env_hash = ?1 OR lower(interpreter) = lower(?2)",
rusqlite::params![env_hash, interpreter],
)
.map_err(|e| PdError::new(Code::IntUnexpected, format!("manual env store: {e}")))?;
Ok(removed > 0)
}
/// The project folder Code Health last ran in for this environment (CODE-HEALTH-SPEC §3).
///
/// Per environment, because deptry compares declared dependencies against what is *installed*
@@ -351,7 +447,14 @@ mod tests {
.filter_map(std::result::Result::ok)
.collect();
for expected in ["envs", "health_projects", "meta_cache", "names", "pins"] {
for expected in [
"envs",
"health_projects",
"manual_envs",
"meta_cache",
"names",
"pins",
] {
assert!(
tables.contains(&expected.to_owned()),
"missing {expected}: {tables:?}"
@@ -458,4 +561,118 @@ mod tests {
)
.expect("the v4 table exists");
}
#[test]
fn a_v4_store_gains_the_manual_list_and_keeps_its_data() {
let store = Store::in_memory().expect("open");
store
.remember_env("h1", r"C:\a\python.exe", "2026-11-01T00:00:00Z", true)
.expect("a CLI default from 1.5.0");
store
.conn()
.execute_batch("DROP TABLE manual_envs; PRAGMA user_version = 4;")
.expect("rewind to v4");
store.migrate().expect("migrate");
assert!(store.manual_envs().expect("the v5 table exists").is_empty());
assert_eq!(
store.default_env().expect("read").map(|e| e.env_hash),
Some("h1".to_owned()),
"the migration does not touch what was there"
);
}
#[test]
fn the_manual_list_keeps_its_order_and_takes_no_duplicates() {
let store = Store::in_memory().expect("open");
store
.add_manual_env("b", r"D:\b\python.exe", "2026-11-02T00:00:00Z")
.expect("add");
store
.add_manual_env("a", r"D:\a\python.exe", "2026-11-03T00:00:00Z")
.expect("add");
// Added again, later and spelled differently: one entry, first place, the new spelling.
store
.add_manual_env("b", r"D:\B\python.exe", "2026-11-04T00:00:00Z")
.expect("add again");
let listed = store.manual_envs().expect("read");
assert_eq!(
listed
.iter()
.map(|m| (
m.env_hash.as_str(),
m.interpreter.as_str(),
m.added_at.as_str()
))
.collect::<Vec<_>>(),
[
("b", r"D:\B\python.exe", "2026-11-02T00:00:00Z"),
("a", r"D:\a\python.exe", "2026-11-03T00:00:00Z"),
]
);
}
#[test]
fn removing_from_the_manual_list_touches_nothing_else() {
let store = Store::in_memory().expect("open");
store
.add_manual_env("h", r"D:\p\python.exe", "2026-11-02T00:00:00Z")
.expect("add");
store
.remember_env("h", r"D:\p\python.exe", "2026-11-02T00:00:00Z", true)
.expect("also the CLI default");
store
.set_health_project("h", r"D:\p", "2026-11-02T00:00:00Z")
.expect("and Health's folder");
assert!(
!store
.remove_manual_env("other", r"D:\elsewhere\python.exe")
.expect("remove"),
"neither the identity nor the path matches"
);
assert!(
store.remove_manual_env("h", "unused").expect("remove"),
"it was there"
);
assert!(
!store.remove_manual_env("h", "unused").expect("again"),
"and is not now"
);
assert!(store.manual_envs().expect("read").is_empty());
assert!(
store.default_env().expect("read").is_some(),
"the CLI default is another list"
);
assert_eq!(
store.health_project("h").expect("read").as_deref(),
Some(r"D:\p"),
"keyed data outlives the entry"
);
}
#[test]
fn a_gone_interpreter_is_removed_by_its_stored_path_when_its_identity_moved() {
// Added while the file was there, under the identity its canonical path hashed to; once the
// file is gone the row's identity is the hash of the stored text, which on a network share
// is spelled differently. The stored path, in any case, still matches.
let store = Store::in_memory().expect("open");
store
.add_manual_env(
"hash-of-unc-spelling",
r"\\server\share\proj\Scripts\python.exe",
"2026-11-02T00:00:00Z",
)
.expect("add");
assert!(
store
.remove_manual_env(
"hash-of-the-stored-text",
r"\\SERVER\share\proj\Scripts\python.exe"
)
.expect("remove"),
"matched by the path"
);
assert!(store.manual_envs().expect("read").is_empty());
}
}
+33 -1
View File
@@ -33,7 +33,9 @@ fn load_all() -> Vec<Fixture> {
let mut out = Vec::new();
let root = fixtures_root();
// `uv-0.11/` is the frozen pre-0.13 rendering; see `both_uv_renderings_classify_identically`.
for engine in ["pip", "uv", "uv-0.11", "synthetic"] {
// `pip-26.2/` is the frozen pre-26.3 rendering of the one scenario pip 26.3 changed; see
// `both_pip_renderings_classify_identically`.
for engine in ["pip", "pip-26.2", "uv", "uv-0.11", "synthetic"] {
let dir = root.join(engine);
let Ok(entries) = fs::read_dir(&dir) else {
continue;
@@ -296,6 +298,36 @@ fn both_uv_renderings_classify_identically() {
assert!(compared >= 9, "compared only {compared} scenarios");
}
#[test]
fn both_pip_renderings_classify_identically() {
// pip 26.3 turned an unloadable build backend from a `BackendUnavailable` traceback (exit 2)
// into its `error: backend-unavailable` diagnostic (exit 1), and the traceback's needle was
// the only one that fired: under 26.3 the failure fell through to "failed to build" and read
// as PD-BLD-003. Older pips are supported (≥ 24.0), so both renderings must reach one code.
// Only that scenario changed — the drift job showed every other capture byte-identical — so
// `pip-26.2/` freezes just it.
let fixtures = load_all();
let mut compared = 0;
for f in fixtures.iter().filter(|f| f.label.starts_with("pip-26.2/")) {
let scenario = f.label.trim_start_matches("pip-26.2/");
let current = fixtures
.iter()
.find(|c| c.label == format!("pip/{scenario}"))
.unwrap_or_else(|| panic!("pip-26.2/{scenario} has no live pip/ counterpart"));
assert_ne!(
f.stderr, current.stderr,
"pip-26.2/{scenario} is identical to pip/{scenario}, so freezing it proves nothing"
);
assert_eq!(
classify_stderr(&f.stderr),
classify_stderr(&current.stderr),
"pip/{scenario} classifies differently under pip 26.2 and the current pip"
);
compared += 1;
}
assert!(compared >= 1, "no frozen pip scenario was compared");
}
#[test]
fn crlf_in_fixtures_is_preserved() {
// .gitattributes marks the fixture tree -text so Windows line endings survive. If that
@@ -0,0 +1,16 @@
{
"scenario": "build-backend-failure",
"engine_version": "pip 26.2.1 (python 3.12)",
"python": "Python 3.12.10",
"argv": [
"<WORK>\\venv\\Scripts\\python.exe",
"-m",
"pip",
"install",
"-U",
"--no-cache-dir",
"numpy==1.19.5"
],
"stdout_bytes": 357,
"stderr_bytes": 7187
}
@@ -0,0 +1,13 @@
{
"scenario": "build-backend-failure",
"question": "sdist build backend failure (PEP 517 backend unavailable).",
"expects_code": "PD-BLD-002",
"engine": "pip",
"extra_env": {
"PYTHONIOENCODING": "utf-8",
"PYTHONUTF8": "1"
},
"exit_code": 2,
"seed": [],
"seed_exit_code": null
}
@@ -0,0 +1,79 @@
ERROR: Exception:
Traceback (most recent call last):
File "<WORK>\venv\Lib\site-packages\pip\_internal\cli\base_command.py", line 109, in _run_wrapper
status = _inner_run()
^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\cli\base_command.py", line 102, in _inner_run
return self.run(options, args)
^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\cli\req_command.py", line 106, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\commands\install.py", line 478, in run
requirement_set = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 103, in resolve
result = self._result = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_vendor\resolvelib\resolvers\resolution.py", line 601, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_vendor\resolvelib\resolvers\resolution.py", line 434, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "<WORK>\venv\Lib\site-packages\pip\_vendor\resolvelib\resolvers\resolution.py", line 150, in _add_to_criteria
if not criterion.candidates:
^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_vendor\resolvelib\structs.py", line 194, in __bool__
return bool(self._sequence)
^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 165, in __bool__
self._bool = any(self)
^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 149, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 39, in _iter_built
candidate = func()
^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 181, in _make_candidate_from_link
base: BaseCandidate | None = self._make_base_candidate_from_link(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 227, in _make_base_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 325, in __init__
super().__init__(
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 167, in __init__
self.dist = self._prepare()
^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 245, in _prepare
dist = self._prepare_distribution()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 336, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\operations\prepare.py", line 664, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\operations\prepare.py", line 783, in _prepare_linked_requirement
dist = _get_prepared_distribution(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\operations\prepare.py", line 82, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File "<WORK>\venv\Lib\site-packages\pip\_internal\distributions\sdist.py", line 63, in prepare_distribution_metadata
self._install_build_reqs(
File "<WORK>\venv\Lib\site-packages\pip\_internal\distributions\sdist.py", line 159, in _install_build_reqs
build_reqs = self._get_build_requires_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\distributions\sdist.py", line 131, in _get_build_requires_wheel
return backend.get_requires_for_build_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\utils\misc.py", line 734, in get_requires_for_build_wheel
return super().get_requires_for_build_wheel(config_settings=cs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 196, in get_requires_for_build_wheel
return self._call_hook(
^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 402, in _call_hook
raise BackendUnavailable(
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Cannot import 'setuptools.build_meta'
@@ -0,0 +1,7 @@
Collecting numpy==1.19.5
Downloading numpy-1.19.5.zip (7.3 MB)
<PROGRESS>
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
@@ -1,6 +1,6 @@
{
"scenario": "build-backend-failure",
"engine_version": "pip 26.2.1 (python 3.12)",
"engine_version": "pip 26.3 (python 3.12)",
"python": "Python 3.12.10",
"argv": [
"<WORK>\\venv\\Scripts\\python.exe",
@@ -12,5 +12,5 @@
"numpy==1.19.5"
],
"stdout_bytes": 357,
"stderr_bytes": 7187
"stderr_bytes": 297
}
@@ -7,7 +7,7 @@
"PYTHONIOENCODING": "utf-8",
"PYTHONUTF8": "1"
},
"exit_code": 2,
"exit_code": 1,
"seed": [],
"seed_exit_code": null
}
@@ -1,79 +1,7 @@
ERROR: Exception:
Traceback (most recent call last):
File "<WORK>\venv\Lib\site-packages\pip\_internal\cli\base_command.py", line 109, in _run_wrapper
status = _inner_run()
^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\cli\base_command.py", line 102, in _inner_run
return self.run(options, args)
^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\cli\req_command.py", line 106, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\commands\install.py", line 478, in run
requirement_set = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 103, in resolve
result = self._result = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_vendor\resolvelib\resolvers\resolution.py", line 601, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_vendor\resolvelib\resolvers\resolution.py", line 434, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "<WORK>\venv\Lib\site-packages\pip\_vendor\resolvelib\resolvers\resolution.py", line 150, in _add_to_criteria
if not criterion.candidates:
^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_vendor\resolvelib\structs.py", line 194, in __bool__
return bool(self._sequence)
^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 165, in __bool__
self._bool = any(self)
^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 149, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 39, in _iter_built
candidate = func()
^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 181, in _make_candidate_from_link
base: BaseCandidate | None = self._make_base_candidate_from_link(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 227, in _make_base_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 325, in __init__
super().__init__(
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 167, in __init__
self.dist = self._prepare()
^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 245, in _prepare
dist = self._prepare_distribution()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 336, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\operations\prepare.py", line 664, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\operations\prepare.py", line 783, in _prepare_linked_requirement
dist = _get_prepared_distribution(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\operations\prepare.py", line 82, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File "<WORK>\venv\Lib\site-packages\pip\_internal\distributions\sdist.py", line 63, in prepare_distribution_metadata
self._install_build_reqs(
File "<WORK>\venv\Lib\site-packages\pip\_internal\distributions\sdist.py", line 159, in _install_build_reqs
build_reqs = self._get_build_requires_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\distributions\sdist.py", line 131, in _get_build_requires_wheel
return backend.get_requires_for_build_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_internal\utils\misc.py", line 734, in get_requires_for_build_wheel
return super().get_requires_for_build_wheel(config_settings=cs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 196, in get_requires_for_build_wheel
return self._call_hook(
^^^^^^^^^^^^^^^^
File "<WORK>\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 402, in _call_hook
raise BackendUnavailable(
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Cannot import 'setuptools.build_meta'
error: backend-unavailable
× Cannot import build backend 'setuptools.build_meta:__legacy__'.
╰─> ModuleNotFoundError: No module named 'distutils'
note: This is likely not a problem with pip.
ERROR: Failed to build 'numpy' when calling build backend hook get_requires_for_build_wheel
@@ -1,6 +1,6 @@
Collecting numpy==1.19.5
Downloading numpy-1.19.5.zip (7.3 MB)
---------------------------------------- 7.3/7.3 MB 15.1 MB/s 0:00:00
<PROGRESS>
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
@@ -1,6 +1,6 @@
{
"scenario": "clean-upgrade",
"engine_version": "pip 26.2.1 (python 3.12)",
"engine_version": "pip 26.3 (python 3.12)",
"python": "Python 3.12.10",
"argv": [
"<WORK>\\venv\\Scripts\\python.exe",
@@ -15,6 +15,6 @@
"-",
"idna==3.10"
],
"stdout_bytes": 11559,
"stdout_bytes": 11557,
"stderr_bytes": 0
}
@@ -1,6 +1,6 @@
{
"scenario": "held-back-constrained",
"engine_version": "pip 26.2.1 (python 3.12)",
"engine_version": "pip 26.3 (python 3.12)",
"python": "Python 3.12.10",
"argv": [
"<WORK>\\venv\\Scripts\\python.exe",
@@ -16,6 +16,6 @@
"httpcore",
"httpx==0.23.0"
],
"stdout_bytes": 477,
"stdout_bytes": 475,
"stderr_bytes": 0
}
@@ -1,6 +1,6 @@
{
"scenario": "held-back",
"engine_version": "pip 26.2.1 (python 3.12)",
"engine_version": "pip 26.3 (python 3.12)",
"python": "Python 3.12.10",
"argv": [
"<WORK>\\venv\\Scripts\\python.exe",
@@ -15,6 +15,6 @@
"-",
"httpcore"
],
"stdout_bytes": 32864,
"stdout_bytes": 32862,
"stderr_bytes": 0
}
@@ -1,6 +1,6 @@
{
"scenario": "impossible",
"engine_version": "pip 26.2.1 (python 3.12)",
"engine_version": "pip 26.3 (python 3.12)",
"python": "Python 3.12.10",
"argv": [
"<WORK>\\venv\\Scripts\\python.exe",
@@ -1,6 +1,6 @@
{
"scenario": "network-unreachable",
"engine_version": "pip 26.2.1 (python 3.12)",
"engine_version": "pip 26.3 (python 3.12)",
"python": "Python 3.12.10",
"argv": [
"<WORK>\\venv\\Scripts\\python.exe",
@@ -1,6 +1,6 @@
{
"scenario": "not-found",
"engine_version": "pip 26.2.1 (python 3.12)",
"engine_version": "pip 26.3 (python 3.12)",
"python": "Python 3.12.10",
"argv": [
"<WORK>\\venv\\Scripts\\python.exe",
@@ -1,6 +1,6 @@
{
"scenario": "requires-python",
"engine_version": "pip 26.2.1 (python 3.12)",
"engine_version": "pip 26.3 (python 3.12)",
"python": "Python 3.12.10",
"argv": [
"<WORK>\\venv\\Scripts\\python.exe",
@@ -1,6 +1,6 @@
{
"scenario": "yanked",
"engine_version": "pip 26.2.1 (python 3.12)",
"engine_version": "pip 26.3 (python 3.12)",
"python": "Python 3.12.10",
"argv": [
"<WORK>\\venv\\Scripts\\python.exe",
@@ -15,6 +15,6 @@
"-",
"urllib3==2.0.0"
],
"stdout_bytes": 8254,
"stdout_bytes": 8252,
"stderr_bytes": 489
}
@@ -1,6 +1,6 @@
{
"scenario": "build-backend-failure",
"engine_version": "uv 0.13.1 (62faed335 2026-10-13 x86_64-pc-windows-msvc)",
"engine_version": "uv 0.13.7 (316c827e0 2026-11-03 x86_64-pc-windows-msvc)",
"python": "Python 3.12.10",
"argv": [
".uvtools\\Scripts\\uv.exe",
@@ -1,6 +1,6 @@
{
"scenario": "clean-upgrade",
"engine_version": "uv 0.13.1 (62faed335 2026-10-13 x86_64-pc-windows-msvc)",
"engine_version": "uv 0.13.7 (316c827e0 2026-11-03 x86_64-pc-windows-msvc)",
"python": "Python 3.12.10",
"argv": [
".uvtools\\Scripts\\uv.exe",
@@ -1,6 +1,6 @@
{
"scenario": "held-back-constrained",
"engine_version": "uv 0.13.1 (62faed335 2026-10-13 x86_64-pc-windows-msvc)",
"engine_version": "uv 0.13.7 (316c827e0 2026-11-03 x86_64-pc-windows-msvc)",
"python": "Python 3.12.10",
"argv": [
".uvtools\\Scripts\\uv.exe",
@@ -1,6 +1,6 @@
{
"scenario": "held-back",
"engine_version": "uv 0.13.1 (62faed335 2026-10-13 x86_64-pc-windows-msvc)",
"engine_version": "uv 0.13.7 (316c827e0 2026-11-03 x86_64-pc-windows-msvc)",
"python": "Python 3.12.10",
"argv": [
".uvtools\\Scripts\\uv.exe",
@@ -1,6 +1,6 @@
{
"scenario": "impossible",
"engine_version": "uv 0.13.1 (62faed335 2026-10-13 x86_64-pc-windows-msvc)",
"engine_version": "uv 0.13.7 (316c827e0 2026-11-03 x86_64-pc-windows-msvc)",
"python": "Python 3.12.10",
"argv": [
".uvtools\\Scripts\\uv.exe",
@@ -1,6 +1,6 @@
{
"scenario": "network-unreachable",
"engine_version": "uv 0.13.1 (62faed335 2026-10-13 x86_64-pc-windows-msvc)",
"engine_version": "uv 0.13.7 (316c827e0 2026-11-03 x86_64-pc-windows-msvc)",
"python": "Python 3.12.10",
"argv": [
".uvtools\\Scripts\\uv.exe",
@@ -1,6 +1,6 @@
{
"scenario": "not-found",
"engine_version": "uv 0.13.1 (62faed335 2026-10-13 x86_64-pc-windows-msvc)",
"engine_version": "uv 0.13.7 (316c827e0 2026-11-03 x86_64-pc-windows-msvc)",
"python": "Python 3.12.10",
"argv": [
".uvtools\\Scripts\\uv.exe",
@@ -1,6 +1,6 @@
{
"scenario": "requires-python",
"engine_version": "uv 0.13.1 (62faed335 2026-10-13 x86_64-pc-windows-msvc)",
"engine_version": "uv 0.13.7 (316c827e0 2026-11-03 x86_64-pc-windows-msvc)",
"python": "Python 3.12.10",
"argv": [
".uvtools\\Scripts\\uv.exe",
@@ -1,6 +1,6 @@
{
"scenario": "yanked",
"engine_version": "uv 0.13.1 (62faed335 2026-10-13 x86_64-pc-windows-msvc)",
"engine_version": "uv 0.13.7 (316c827e0 2026-11-03 x86_64-pc-windows-msvc)",
"python": "Python 3.12.10",
"argv": [
".uvtools\\Scripts\\uv.exe",
+157
View File
@@ -1107,6 +1107,85 @@ async fn a_requires_python_nobody_knows_never_blocks() {
assert!(releases.asked.load(std::sync::atomic::Ordering::SeqCst) >= 1);
}
#[tokio::test]
async fn forcing_a_latest_this_python_cannot_run_forces_nothing_and_says_why() {
// The SP-1 world, except that httpcore's latest needs a newer Python than the environment's
// 3.12.4. Forcing it would pin a release that cannot install and release httpx from the
// guard set for nothing — so the decision is dropped, httpx is not named as breaking, and the
// preview carries the reason as an incompatible row instead.
let releases = Arc::new(Releases::default().with("httpcore", "1.0.9", ">=3.13"));
let engine = Scripted::default()
.with("httpx", "0.23.0", &["httpcore<0.16.0,>=0.15.0"])
.with("httpcore", "0.15.0", &["h11<0.13,>=0.11"])
.with("h11", "0.12.0", &[])
.offering("httpcore", "1.0.9")
.offering("h11", "0.16.0")
.needing("httpcore", "h11", "0.16");
let intent = Intent::Update {
all: false,
pkgs: vec!["httpcore".to_owned()],
except: Vec::new(),
force_latest: false,
};
let (mut flow, step) = UpdateFlow::start(
env(),
Box::new(engine.clone()),
&intent,
&[],
checking(&releases),
)
.await
.expect("start");
assert!(
matches!(step, FlowStep::NeedsDecisions { .. }),
"httpx holds httpcore back: {step:?}"
);
let step = flow
.decide(&BTreeMap::from([(pkg("httpcore"), Decision::ForceLatest)]))
.await
.expect("decide");
let report = match step {
FlowStep::NeedsDecisions { report, .. } | FlowStep::NeedsConfirm { report } => report,
other => panic!("a preview, not {other:?}"),
};
assert!(report.forced.is_empty(), "nothing was forced: {report:?}");
assert!(
!report
.changes
.iter()
.any(|c| c.name == pkg("httpcore") && c.to.0 == "1.0.9"),
"httpcore did not move to a release this Python cannot run"
);
let why: Vec<(String, String, String)> = report
.incompatible
.iter()
.map(|m| {
(
m.pkg.to_string(),
m.version.0.clone(),
m.requires_python.clone(),
)
})
.collect();
assert_eq!(
why,
[(
"httpcore".to_owned(),
"1.0.9".to_owned(),
">=3.13".to_owned()
)]
);
let world = engine.world();
let last = &world.resolves.last().expect("resolved").adjust;
assert!(
!last.release.contains(&pkg("httpx")),
"httpx stayed in the guard set: forcing was dropped before it reached the engine"
);
assert!(!last.pins.iter().any(|p| p.name == pkg("httpcore")));
}
#[tokio::test]
async fn a_rollback_across_engines_never_removes_pip() {
// C7. uv's freeze has no `--all`, so a uv snapshot never lists pip; compared with pip's
@@ -1151,6 +1230,84 @@ async fn a_rollback_across_engines_never_removes_pip() {
assert_eq!(restored, ["idna==3.2"]);
}
#[tokio::test]
async fn a_rollback_runs_end_to_end_one_package_at_a_time() {
// The restore half of `execute_rollback`, which nothing drove until the analysis measured
// it: each package installs alone, constrained by the rest of the target, so a restore that
// is 90% restorable restores 90% — and what was added since the snapshot goes first.
let engine = Scripted::default()
.with("idna", "3.4", &[])
.with("urllib3", "2.2.0", &[])
.with(
"requests",
"2.32.3",
&["idna<4,>=2.5", "urllib3<3,>=1.21.1"],
);
let dir = app_data("rollback-e2e");
let hash = pipdock_core::envs::env_hash(std::path::Path::new("python.exe"));
let target = snapshot::create(
&dir,
&hash,
"idna==3.2\nurllib3==1.26.20\n".to_owned(),
Trigger::Manual,
EngineId::Pip,
jiff::Timestamp::now(),
)
.expect("snapshot");
let (mut flow, preview) = RollbackFlow::start(
env(),
Box::new(engine.clone()),
&dir,
&target.meta.id,
FlowOptions::default(),
)
.await
.expect("start");
assert_eq!(preview.restore.uninstall, [pkg("requests")]);
let pre = flow
.take_snapshot(&dir)
.await
.expect("the pre-rollback snapshot");
assert!(matches!(pre.trigger, Trigger::Rollback { .. }));
let (tx, _rx) = tokio::sync::mpsc::unbounded_channel();
let summary = flow.execute(tx).await.expect("execute");
let _ = std::fs::remove_dir_all(&dir);
assert_eq!(summary.counts.ok, 3, "{summary:?}");
assert_eq!(
summary.plan_id, pre.id,
"the summary is filed under the snapshot it can undo to"
);
assert_eq!(engine.version_of("requests"), None);
assert_eq!(engine.version_of("idna").as_deref(), Some("3.2"));
assert_eq!(engine.version_of("urllib3").as_deref(), Some("1.26.20"));
let world = engine.world();
let alone: Vec<(String, Vec<String>)> = world
.installs
.iter()
.map(|set| {
(
set.specs
.iter()
.map(|s| s.to_requirement())
.collect::<Vec<_>>()
.join(" "),
set.constraints.iter().map(|c| c.to_requirement()).collect(),
)
})
.collect();
assert_eq!(
alone,
[
("idna==3.2".to_owned(), vec!["urllib3==1.26.20".to_owned()]),
("urllib3==1.26.20".to_owned(), vec!["idna==3.2".to_owned()]),
],
"one package per step, held to the rest of the target"
);
}
#[tokio::test]
async fn a_held_package_is_restated_in_every_plan() {
// H17. `hold_requirements` existed and nothing called it, so a held package was only left
+9 -4
View File
@@ -31,6 +31,11 @@ fn fixtures_root() -> PathBuf {
/// job re-captures `pip/` and `uv/` only.
const CORPORA: [&str; 3] = ["pip", "uv", "uv-0.11"];
/// Frozen corpora that hold only the scenarios an engine release re-rendered, so the sweeps below
/// read them while the per-scenario tests, which expect a full corpus, do not. `pip-26.2/` is
/// pip's unloadable-build-backend failure before 26.3 made it a diagnostic.
const PARTIAL_CORPORA: [&str; 1] = ["pip-26.2"];
/// The uv corpora alone, for assertions about uv's channel and wording.
const UV_CORPORA: [&str; 2] = ["uv", "uv-0.11"];
@@ -55,7 +60,7 @@ fn resolution(
installed: &[Dist],
) -> pipdock_core::errors::Result<ParsedPlan> {
match engine {
"pip" => pip_resolution(cap.exit(), &cap.stdout, &cap.stderr, installed),
"pip" | "pip-26.2" => pip_resolution(cap.exit(), &cap.stdout, &cap.stderr, installed),
_ => uv_resolution(cap.exit(), &cap.stdout, &cap.stderr, installed),
}
}
@@ -274,7 +279,7 @@ fn every_successful_capture_parses() {
"yanked",
"requires-python",
];
for engine in CORPORA {
for engine in CORPORA.into_iter().chain(PARTIAL_CORPORA) {
for scenario in scenarios {
let Some(cap) = load(engine, scenario) else {
continue;
@@ -295,7 +300,7 @@ fn every_failed_capture_reaches_the_user_as_the_code_it_was_captured_for() {
// build previewed as "no changes", a refused connection read as a uv newer than PipDock, and an
// unknown name as a version conflict. This asks the function the adapter returns through.
let mut checked = 0;
for engine in CORPORA {
for engine in CORPORA.into_iter().chain(PARTIAL_CORPORA) {
let dir = fixtures_root().join(engine);
for entry in fs::read_dir(&dir).expect("corpus") {
let scenario = entry
@@ -332,7 +337,7 @@ fn every_failed_capture_reaches_the_user_as_the_code_it_was_captured_for() {
}
}
}
assert!(checked >= 13, "only {checked} failed captures were checked");
assert!(checked >= 14, "only {checked} failed captures were checked");
}
#[test]
+26 -12
View File
@@ -1,6 +1,6 @@
# AI disclosure
*Last updated 2026-10-17, for PipDock 1.4.0.*
*Last updated 2026-11-21, for PipDock 1.6.0.*
**PipDock was written with substantial help from an AI coding assistant, under human review.** This
page says which model, what it did, what it did not do, and how you can check any of it yourself.
@@ -13,10 +13,10 @@ commit trailers. Nothing here changes the licence or the warranty position — s
| | |
|---|---|
| Model | **Claude Opus 5** — first commit through 1.3.0 · **Claude Opus 5.5** — from 1.4.0 |
| Model | **Claude Opus 5** — first commit through 1.3.0 · **Claude Opus 5.5** — 1.4.0 and the maintenance after it, through 2026-11-04 · **Claude Fable 5.2** — 2026-11-10, which is 1.5.0 · **Claude Opus 5.5** — 2026-11-21, the move to poli0981org and 1.6.0 |
| Vendor | **Anthropic** ([anthropic.com](https://www.anthropic.com)) |
| Interface | [Claude Code](https://claude.com/claude-code), Anthropic's CLI/desktop coding agent |
| Period | 2026-07-27 → 2026-08-21 (first commit to 1.3.0) · 2026-10-16 → 2026-10-17 (1.4.0) |
| Period | 2026-07-27 → 2026-08-21 (first commit to 1.3.0) · 2026-10-16 → 2026-10-17 (1.4.0) · 2026-10-20 → 2026-11-04 (CI and dependency maintenance) · 2026-11-10 (1.5.0) · 2026-11-21 (the move to poli0981org, 1.6.0) |
The trailer on each commit records which model produced it, and `git log` is the authoritative
history — the table above is a summary of it, not a substitute.
@@ -48,12 +48,14 @@ load-bearing, and all four caught real defects the review-by-reading did not:
described: all three Code Health tools exit non-zero on findings and vulture uses 3; deptry
reports a *module* name rather than the distribution providing it; ruff's rule URL is keyed by
rule name, not code. Each is now pinned by a test because a document was not enough.
3. **CI is a second reviewer that cannot be talked round.** Five checks block every pull
request — formatting, clippy and the test suite; `cargo audit`; `npm audit`; lint, typecheck,
tests and build of the frontend; and CodeQL for JavaScript/TypeScript — and `main` is protected
so that the owner cannot bypass them. Integration tests against real pip and uv in disposable
venvs run on every pull request that touches what they cover, and `cargo deny`, CodeQL for Rust
and Actions, and a Tauri version check run on all of them without being required.
3. **CI is a second reviewer that cannot be talked round.** Eight checks block every pull
request — formatting, clippy and the test suite; `cargo audit`; `cargo deny`; `npm audit`; the
npm licence check; the Tauri version check; lint, typecheck, tests and build of the frontend;
and CodeQL for JavaScript/TypeScript — and `main` is protected so that the owner cannot bypass
them. Integration tests against real pip and uv in disposable venvs run on every pull request
that touches what they cover, and CodeQL for Rust and Actions, SonarQube Cloud and Qodana run
on all of them without being required. Since 2026-11-21 every one of those workflows lives in
this repository; none calls code another account can change.
4. **The built application was driven by hand before release.** Before 1.0.0 the owner did it —
on a real machine, in Windows Sandbox and in a Windows 10 VM — following `docs/TESTING.md` §4's
charter, and several defects were found that way and only that way. For 1.4.0 the assistant
@@ -68,7 +70,18 @@ load-bearing, and all four caught real defects the review-by-reading did not:
- **The decision to release.** Through 1.3.0 every merge, tag and publish was the owner's own
action. For 1.4.0 the owner delegated the mechanics, in writing, with the conditions attached —
CI green, and the installers matching `SHA256SUMS.txt` before the draft was published — and the
decision that 1.4.0 should ship remained theirs.
decision that 1.4.0 should ship remained theirs. 1.5.0 was released the same way: the owner
chose its scope from three options, approved a written plan that named every outward step — the
two pull requests, the tag, the published release, the repository description and label — and
the assistant carried it out under the same two conditions. The owner's own keyboard and
Narrator testing of 1.4.0 is theirs and is recorded as theirs in `ACCESSIBILITY.md`; the
assistant cannot run a screen reader, and that file says which checks were a person's and which
were a machine's. 1.6.0 was released the same way again. Moving the repository to the
poli0981org organization and putting PipDock in maintenance mode were the owner's decisions,
and the transfer itself was the owner's own action; the owner then approved a plan naming every
outward step — the two pull requests, the change to `main`'s required checks, the tag, the
published release, the announcement in Discussions, the repository description, the new labels
and the wiki — and the assistant carried it out under the same two conditions.
- **Anything requiring a legal or security judgment** was raised for a decision rather than taken —
for example the PEP 668 override's default, and whether a `mailto:` scheme belonged in the
browser-launch allowlist.
@@ -78,7 +91,8 @@ load-bearing, and all four caught real defects the review-by-reading did not:
Copyright in PipDock is held by **Kokone (poli0981)**, and the work is licensed **GPL-3.0-only**.
Using an AI assistant does not change either. Commits carry a
`Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>` trailer through 1.3.0 and
`Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>` from 1.4.0, as an accurate record of how
`Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>` from 1.4.0, and
`Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>` from 2026-11-10, as an accurate record of how
the work was produced — it is attribution, not an assignment of rights, and Anthropic claims no
ownership of output produced with its models.
@@ -109,5 +123,5 @@ thing to trust.
## Questions
`code@poli0981.dev`, or open a discussion at
[github.com/poli0981/pipdock](https://github.com/poli0981/pipdock/discussions). If you think
[github.com/poli0981org/pipdock](https://github.com/poli0981org/pipdock/discussions). If you think
something in this page is inaccurate, that is worth an issue.
+19 -16
View File
@@ -35,7 +35,7 @@ pipdock/
├─ src-tauri/ # Tauri 2 app (commands + events only)
├─ ui/ # React 19 + TS + Tailwind 4 + Vite 8 + Zustand + i18next
├─ legal/ # EULA, Disclaimer, Privacy, Third-Party (public — legal gate links here)
├─ .github/ # caller workflows into poli0981/.github + issue templates
├─ .github/ # workflows (all project-local), their scripts, issue templates
└─ docs/
```
@@ -140,7 +140,8 @@ From `requires_dist` the core builds the **reverse-dependency graph** used by: h
## 6. Storage (`%LOCALAPPDATA%\PipDock\data\`)
```text
index.db # SQLite, schema v4: names, meta_cache, envs (recents, default),
index.db # SQLite, schema v5: names, meta_cache, envs (the CLI's recents, default),
# manual_envs (interpreters added with Browse… or `env add`, v5),
# pins(env_hash, pkg, mode, version, reason), health_projects,
# kv (settings, consent, index refresh stamp), release_meta
snapshots/<env_hash>/<id>.freeze.txt + <id>.meta.json # id: 20261016T145809-423560600Z
@@ -151,7 +152,7 @@ logs/pipdock.<date>.log, logs/pipdock-cli.<date>.log # one file per head per U
**There is no `config.json`.** This block listed one until 1.4.0; settings and the consent record have always been rows in `index.db`'s `kv` table (`settings::load`), because the store already exists, already handles concurrent access, and a second on-disk format is a second thing to migrate.
`env_hash` = SHA-256 of the canonicalized interpreter path, case-folded on Windows (SP-6). Snapshot `.meta.json` records trigger (which plan), engine, package count, and app version; the engine is what a rollback with the other engine reads (DATA-FLOW §8). Snapshot ids are fixed width, so they sort as the times they name — the timestamp with its punctuation swapped out used to trim its fraction, so `…09-42Z` sorted after `…09-4235606Z` — and the timeline orders by `created_at` either way (M43).
`env_hash` = SHA-256 of the canonicalized interpreter path, case-folded on Windows (SP-6). Links are resolved — two names for one Python are one environment — **except a venv's own interpreter**, resolved only up to its folder since 1.6.0: a `--symlinks` venv's `python.exe` links to the Python it was made from, and following it filed the venv's pins, snapshots and reports under that base. A venv is recognised by its `pyvenv.cfg`; no other path's identity changed. Snapshot `.meta.json` records trigger (which plan), engine, package count, and app version; the engine is what a rollback with the other engine reads (DATA-FLOW §8). Snapshot ids are fixed width, so they sort as the times they name — the timestamp with its punctuation swapped out used to trim its fraction, so `…09-42Z` sorted after `…09-4235606Z` — and the timeline orders by `created_at` either way (M43).
**The store migrates only when it is behind.** `user_version` is compared with `store::SCHEMA_VERSION` (4) and the batch runs only when the database is older: every open used to run it — a `journal_mode` write and eight `CREATE TABLE`s, on a store some paths open twice per lookup — and an older build set the version back down, so the next newer one re-ran them (M38). v4 added `release_meta(normalized, version, requires_python)`: a release's `Requires-Python` as PyPI publishes it, never refreshed because an uploaded release's metadata never changes. A NULL there means "declares none"; "unknown" is never stored.
@@ -168,9 +169,10 @@ This table is the surface. A command that is not listed here does not exist; add
| Command | Returns | Purpose |
|---|---|---|
| `app_info` | `AppInfo` | PipDock's version, and the hash of the legal documents this build ships against. |
| `env_scan` | `EnvRow[]` | Discover environments, streaming `scan-progress`. A probe failure is reported on its own row, never fatal to the scan. Carries `pipVersion` and `healthProject`, both read before the probe loop so the store guard is never held across a probe. Probes run four at a time (they ran in series until 1.4.0), each under its own 60 s watchdog, so one hung interpreter costs its own row; rows keep discovery order. |
| `env_add_manual` | `EnvRow` | Persist an interpreter chosen through *Browse…*. **Not implemented** — the one entry left in `NOT_YET` (`src-tauri/src/lib.rs`), owed by M3. |
| `env_probe` | `EnvRow` | Probe one interpreter without persisting it. Takes an optional `source`: absent means *Browse…*, and a **refresh must pass the row's own**, or the row comes back relabelled `manual`. Fills every field `env_scan` does, because `upgradePip` replaces the row wholesale. |
| `env_scan` | `EnvRow[]` | Discover environments, streaming `scan-progress`. A probe failure is reported on its own row, never fatal to the scan. Carries `pipVersion` and `healthProject`, both read before the probe loop so the store guard is never held across a probe. Probes run four at a time (they ran in series until 1.4.0), each under its own 60 s watchdog, so one hung interpreter costs its own row; rows keep discovery order. An added interpreter is validated again before its probe (`envs::probe_listed`, which `pipdock env list` shares): what it was when added says nothing about what a link points at now. |
| `env_add_manual` | `EnvRow` | Add an interpreter chosen through *Add interpreter…* (*Browse…*, PRD P0-1) to the list `env_scan` appends to discovery, and return its row (1.6.0; the last entry `NOT_YET` held). `envs::validate_interpreter` first — an existing file named like Python, not one of PipDock's own venvs — then the probe, then the store, so a refused or broken interpreter is never listed. The row carries the path that is stored: absolute, links left alone — a `--symlinks` venv's `python.exe` *is* the venv, and its target is the base interpreter. The frontend merges the row by that path, not by `envHash`: two names for one Python share a hash. |
| `env_remove_manual` | `boolean` | Take an added interpreter off that list, by the path its row shows; `false` when it was not on it. The path, not `envHash`: for a file that is gone the hash is recomputed from the stored text and can differ from the one it was added under, so removal by hash reported success while the entry stayed. Touches nothing on disk, and leaves the pins, snapshots and Health folder keyed to it. |
| `env_probe` | `EnvRow` | Probe one interpreter without persisting it. Takes an optional `source`: absent means manual, and a **refresh must pass the row's own**, or the row comes back relabelled `manual`. A `manual` path is validated as `env_add_manual` validates one — a check on what the webview *says*, not an enforcement point (SECURITY §2, backlog X36-b). Fills every field `env_scan` does, because `upgradePip` replaces the row wholesale. |
| `env_export` | `string` | Write the environment's `Engine::freeze` document to a user-chosen path and return it (PRD P1-3). Byte for byte, with no formatter: a freeze *is* a requirements file, and a constraints file is the same body under a different name. Rust-side for `health_save_report`'s reason — `dialog:allow-save` asks for a path and grants no `fs`. |
| `requirements_read` | `ParsedRequirements` | Read a `requirements.txt` into install specs **and whatever it could not use**. The skipped lines are the point: an include or an editable install means the file asks for something PipDock will not do, and the user has to see that before a preview claims to represent their file. |
| `pkg_list` | `Dist[]` | Installed distributions, read from `probe.py` rather than the engine — see §4 and DATA-FLOW §7. |
@@ -252,23 +254,24 @@ Uninstalls are always sequential (cheap) with the reverse-dep guard evaluated on
Zustand stores: `useEnvStore`, `usePlanStore`, `useIndexStore`, `useSettingsStore`, `useHealthStore`, `useSecurityStore`, `useDepsStore`, `useLegalStore`, `useUiStore`. **An answer is applied only if it still answers the question being asked** (1.4.0): a store that fetches per environment checks, after each await, that the environment is still the selected one — the plan store, that its generation is still current — because a slow answer for an environment the user had just left used to land on the one they switched to, and a plan the user had backed out of re-opened its panel (`ui/src/stores/races.test.ts`). All engine data enters via typed IPC wrappers (`ui/src/ipc/*.ts`) mirroring the Rust types. **This section originally specified `specta`/`tauri-specta` and that is not what shipped:** `ui/src/ipc/generated.ts` comes from a first-party `xtask` over `schemars`, which makes drift a *test* failure rather than a compile error. `crates/pipdock-core/src/bindings.rs` records why — specta 2 is still `2.0.0-rc`, and a second derive stack over ~40 types was not worth it — and names the condition for revisiting. No component calls `invoke` directly. i18next with `en`/`vi` JSON catalogs (see I18N.md). Styling via Tailwind 4 tokens defined in UI-SPEC.
## 10. Version manifest (verified 2026-10-17 for 1.4.0, against `rust-toolchain.toml`, `Cargo.lock` and `package-lock.json`)
## 10. Version manifest (verified 2026-11-04, after 1.4.0, against `rust-toolchain.toml`, `Cargo.lock` and `package-lock.json`)
| Component | Version policy |
|---|---|
| Tauri | 2.12.x (2.12.4; `tauri-build` 2.7.3), **in lockstep with `@tauri-apps/*` 2.12** — Tauri's own version check requires the crate and the npm package to agree, and CI's `tauri lockstep` job fails when `Cargo.lock` and `package-lock.json` drift apart. **No `tauri-plugin-updater`** — PipDock does not update itself (SECURITY §5) |
| Tauri | 2.12.x (2.12.5; `tauri-build` 2.7.4; `@tauri-apps/api` 2.12.4), **in lockstep with `@tauri-apps/*` 2.12** — Tauri's own version check requires the crate and the npm package to agree, and CI's `tauri lockstep` job fails when `Cargo.lock` and `package-lock.json` drift apart. **No `tauri-plugin-updater`** — PipDock does not update itself (SECURITY §5) |
| Rust | 1.99.1, pinned via `rust-toolchain.toml`; the workspace's `rust-version` (1.99) moves with the pin, so it never claims a floor it is not built with |
| React / TypeScript | 19.x (19.3.1) / see the TypeScript row |
| Vite / Vitest / Tailwind | 8.x (8.3.4, Rolldown line) / 5.x (5.0.5) / 4.x (4.3.3) |
| Node (dev only) | 24 LTS (Active LTS; EOL 2028-04) |
| reqwest / tokio | 0.13.x (0.13.5; rustls, no native TLS) / 1.x (1.53.3) |
| pip engine | ≥ 24.0 supported; latest is 26.2.x (the fixtures are 26.2.1). `--dry-run --report` requires ≥ 22.2 — PipDock offers to upgrade older pips before first plan. |
| uv engine | latest stable (0.13.x; the fixtures are 0.13.1, whose `error:`/`cause:` rendering replaced miette's, with 0.11's kept as a frozen corpus); **minimum 0.10.0**, pinned by SP-1 (`UV_MIN_VERSION`, `engine/mod.rs`) — a declared floor nothing enforces yet (audit backlog) |
| Vite / Vitest / Tailwind | 8.x (8.3.5, Rolldown line) / 5.x (5.1.0) / 4.x (4.3.4) |
| Node (dev only) | 26 LTS (Active LTS since 2026-10-28; EOL 2029-04). CI and the release build moved from 24 on 2026-11-04, when 24 had entered maintenance |
| reqwest / tokio | 0.13.x (0.13.5; rustls, no native TLS) / 1.x (1.54.1) |
| pip engine | ≥ 24.0 supported; latest is 26.3 (2026-11-02), and the fixtures were re-captured with it on 2026-11-04 — byte-identical but for an unloadable build backend, now a diagnostic, whose 26.2.1 rendering is kept as a frozen corpus (`pip-26.2/`). `--dry-run --report` requires ≥ 22.2 — PipDock offers to upgrade older pips before first plan. |
| uv engine | latest stable (0.13.x; the fixtures were captured with 0.13.1 and re-captured unchanged with 0.13.7, whose `error:`/`cause:` rendering replaced miette's, with 0.11's kept as a frozen corpus); **minimum 0.10.0**, pinned by SP-1 (`UV_MIN_VERSION`, `engine/mod.rs`) — a declared floor nothing enforces yet (audit backlog) |
| Managed Pythons | 3.10 – 3.14 (3.9 is EOL) |
| Windows | 10 (1809+) / 11; WebView2 Evergreen assumed present; `longPathAware` manifest enabled |
| rusqlite | 0.40.x (0.40.2; `libsqlite3-sys` 0.38.2, SQLite 3.53.2). **Held at 0.37 until 1.4.0**: `libsqlite3-sys` 0.38's build script used the then-unstable `cfg_select!`, which did not compile on Rust 1.94.1. It is stable since 1.95, so the toolchain move met the hold's own condition. Nothing here used the `u64`/`usize` `ToSql` impls (off by default since 0.38) or `prepare_cached` (optional since 0.38). |
| TypeScript | **held at 6.0.x** (6.0.3). `typescript-eslint` 8.71.2 peers on `>=4.8.4 <6.1.0`, so anything from 6.1 on — 7.x included — fails `npm ci` with `ERESOLVE` before a single check runs. Revisit when typescript-eslint widens its range. |
| ESLint | **10.x (10.12.0), with `eslint-plugin-react` deliberately absent.** That plugin caps at ESLint 9, which drags in a `minimatch`/`brace-expansion` chain carrying six high-severity advisories and would fail `npm audit` in CI. The one rule it was wanted for — no hardcoded JSX strings (I18N §1) — is a local rule in `eslint.config.js`, which also implements the documented allowlist precisely. |
| rusqlite | 0.41.x (0.41.1; `libsqlite3-sys` 0.39.1, SQLite 3.54.1). 0.41 needed no code change: its new PRAGMA-name check accepts the three the store uses (`foreign_keys`, `journal_mode`, `user_version`), and its use-after-free fix is in `busy_handler`/`trace_v2`, which the store never registers. **Held at 0.37 until 1.4.0**: `libsqlite3-sys` 0.38's build script used the then-unstable `cfg_select!`, which did not compile on Rust 1.94.1. It is stable since 1.95, so the toolchain move met the hold's own condition. Nothing here used the `u64`/`usize` `ToSql` impls (off by default since 0.38) or `prepare_cached` (optional since 0.38). |
| rfd | 0.17.x (0.17.2), **the same rfd `tauri-plugin-dialog` compiles** — src-tauri takes it only for the start-up failure dialog, so its range follows the plugin's (^0.17 since 2.8.4) and `cargo tree -i rfd --target all` shows one copy. Held at 0.16 until 2026-11-04 for that reason. |
| TypeScript | **held at 6.0.x** (6.0.3; 7.0.2 is latest). `typescript-eslint` 8.72.1 still peers on `>=4.8.4 <6.1.0`, so anything from 6.1 on — 7.x included — fails `npm ci` with `ERESOLVE` before a single check runs. Revisit when typescript-eslint widens its range. |
| ESLint | **10.x (10.15.0), with `eslint-plugin-react` deliberately absent.** That plugin caps at ESLint 9, which drags in a `minimatch`/`brace-expansion` chain carrying six high-severity advisories and would fail `npm audit` in CI. The one rule it was wanted for — no hardcoded JSX strings (I18N §1) — is a local rule in `eslint.config.js`, which also implements the documented allowlist precisely. GHSA-g3hv-75wg-m249 (minimatch, moderate, 2026-10-30) was fixed only in 11.0.1, which ESLint 10.14 and `typescript-eslint` 8.72 did not accept, so it was tolerated rather than forced with an `overrides` across a major; ESLint 10.15 and `typescript-eslint` 8.73 moved to minimatch 11 (11.0.9 throughout, 2026-11-21), and `npm audit` is clean. |
**TypeScript is the one hold left, and Dependabot no longer proposes it:** `.github/dependabot.yml` ignores `typescript >=6.1.0`, with the reason beside the rule. A hold is a compile or install failure, not a preference, so such a PR would be closed rather than merged until the stated condition changes. `cargo audit` runs with `--deny warnings`, so a new informational advisory fails CI unless `.cargo/audit.toml` records why it is tolerated (SECURITY §7).
+15 -2
View File
@@ -86,7 +86,20 @@ the per-user site-packages directory — so its package count can be lower than
is non-null exactly when that applies, and null inside a venv. See SECURITY §2.
**`venv_scan` matches exactly four directory names**: `.venv`, `venv`, `env`, `.env`. A virtual
environment called anything else is invisible to `env list`, and you have to name it with `--env`.
environment called anything else is not discovered — name it with `--env` for one command, or put
it on the list for good (the GUI's *Add interpreter…* writes the same list):
```powershell
pipdock env add D:\work\scraper\myenv
```
It appears in `env list` after discovery's own rows, with `source: "manual"`, and in the GUI's
Environments screen. `pipdock env remove D:\work\scraper\myenv` takes it off again; nothing on disk
is touched, and its pins and snapshots stay for the day it comes back. Since 1.6.0 a path you give
`--env`, `env use` or `env add` must be named like a Python interpreter (`python.exe`,
`python3.exe`, `python3.12.exe`, the free-threaded `python3.14t.exe`) and must not be one of
PipDock's own venvs, or it is refused
with PD-ENV-001 before anything runs it.
Make one the default so you can stop typing `--env`:
@@ -522,7 +535,7 @@ lives in `pipdock-core` (`pins::suggest`, `requirements::parse`, `cache::usage`,
| Command palette | `Ctrl+K` | not applicable |
If you want one of these on the command line, say so in an
[issue](https://github.com/poli0981/pipdock/issues) — the core function is already there.
[issue](https://github.com/poli0981org/pipdock/issues) — the core function is already there.
**The PEP 668 override is GUI-only for a different reason, and stays so.** It is meant to be hard
to reach — a decision made in the GUI, behind a confirm — and a flag would put it one shell-history
+8 -3
View File
@@ -8,6 +8,7 @@
2. **Safe by default, scriptable on request.** Interactive prompts appear on a TTY; in scripts (`--yes` / no TTY), a held-back package keeps its compatible version and an impossible one is **skipped** — never forced, unless `--strategy latest` asked for exactly that (§4). Off a TTY, a command that would ask first refuses instead unless `--yes` is given; `uninstall` and `pip-upgrade` ask nothing (§3).
3. **Machine-readable everywhere.** `--json` makes every command print one JSON document on stdout — the structs the GUI receives, wherever one exists (§6).
4. English-only in v1 (GUI carries EN/VI); messages reuse catalog codes so they stay greppable.
5. **Plain text, and nothing that moves.** No colour, no spinner, no progress bar, no line that rewrites itself with a carriage return: progress is whole lines on stderr, and `--quiet` drops them. This was true of the code since the first command and written nowhere, which is how a contract gets broken by someone adding a nicety. It is what makes the output readable by a screen reader, greppable in a log and the same in a pipe as on a terminal — so there is no `NO_COLOR` to honour, because there is no colour, and status is always a word (`ACCESSIBILITY.md`).
## 2. Global options
@@ -26,7 +27,7 @@
**Which environment.** In order:
1. `--env` — an interpreter, or an environment directory whose `Scripts\python.exe` is used;
1. `--env` — an interpreter, or an environment directory whose `Scripts\python.exe` is used; refused with PD-ENV-001 unless it is named like a Python interpreter and outside PipDock's own venvs (SECURITY §2);
2. the default `pipdock env use` stored. If its interpreter is gone, stderr says `` warning: the default environment (<path>) no longer exists; `pipdock env use` sets another `` and the search goes on;
3. the first of `.venv`, `venv`, `env`, `.env` in the working directory that holds an interpreter.
@@ -37,8 +38,10 @@ Nothing found is PD-ENV-001 (exit 3), naming all three ways. Only `env use` writ
## 3. Commands
```text
pipdock env list # discovered envs, sources, PEP 668 flags
pipdock env list # discovered envs, then the added ones; sources, PEP 668 flags
pipdock env use <path> # set the default env (§2)
pipdock env add <path> # add an interpreter or env dir to the list (the GUI's Add interpreter…)
pipdock env remove <path> # take an added one off the list; nothing on disk changes
pipdock list [--outdated] # installed packages, from the probe; --outdated asks the index
pipdock search <query> [--limit n] # local fuzzy index search (n defaults to 20)
pipdock info <pkg> # cached PyPI metadata
@@ -138,8 +141,10 @@ An error's exit is derived from its code's area (`run::exit_for`) rather than wr
| `snapshot create` | The new snapshot's `SnapshotMeta` |
| `snapshot list` | `[SnapshotMeta]` |
| `snapshot diff` | `Diff`, as a rollback with this engine would see it; the lines no index can restore are printed in text mode only |
| `env list` | An array, one object per discovered interpreter: `interpreter`, `source`, `python`, `externallyManaged`, `hiddenUserSite`, `packages` (a count), `envHash`, `pipVersion` — or `interpreter`, `source` and `error: {code, message}` for one that could not be probed, without failing the rest |
| `env list` | An array, one object per discovered interpreter and then per added one (`source: "manual"`, 1.6.0): `interpreter`, `source`, `python`, `externallyManaged`, `hiddenUserSite`, `packages` (a count), `envHash`, `pipVersion` — or `interpreter`, `source` and `error: {code, message}` for one that could not be probed, without failing the rest |
| `env use` | The `PyEnv` that is now the default |
| `env add` | The added interpreter in the shape of one `env list` element, `source: "manual"`. When discovery also finds that interpreter, `env list` shows it under the discovered source and spelling instead, and the added entry waits unseen |
| `env remove` | `{interpreter, removed}` — `removed` is false when it was not on the list, which is not an error (exit 0) |
| `list` | `[Dist]`, from the probe; with `--outdated`, `[OutdatedDist]` |
| `search` | `[Hit]` |
| `info` | `{meta: PackageMeta, freshness: Freshness}` |
+3 -3
View File
@@ -10,7 +10,7 @@
| Code | Detection (stderr/context pattern) | Cause | User action (EN; VI mirrored in locale files) |
|---|---|---|---|
| PD-ENV-001 | interpreter path missing/not executable — checked before the probe, and since 1.4.0 also a failed spawn of an interpreter that is not there (it read as PD-ENG-001, "install the engine") | env deleted or moved | Re-scan environments; remove stale entry |
| PD-ENV-001 | interpreter path missing/not executable — checked before the probe, and since 1.4.0 also a failed spawn of an interpreter that is not there (it read as PD-ENG-001, "install the engine"). Since 1.6.0 also a path a person supplied that `envs::validate_interpreter` refuses: not named like a Python interpreter (or a link to something that is not), or inside PipDock's own tools or audit venv — checked when it is added, again on every listing, and for the CLI's stored default when it is used | env deleted or moved; the wrong file picked | Re-scan environments; remove stale entry — *Remove from list* on an added row (1.6.0), the first time this advice had a button |
| PD-ENV-002 | **Raised by PipDock** on the fresh probe every mutating flow starts with (`flow::preamble`, DATA-FLOW §2): the `EXTERNALLY-MANAGED` marker beside the stdlib, never inside a venv — before any engine command. With the Settings override on, a flow raises it only for pip 23.0, which enforces PEP 668 and has no `--break-system-packages` (it arrived in 23.0.1); pip upkeep refuses a managed Python whatever the setting (DATA-FLOW §7). The `externally-managed-environment` stderr rule is a backstop | PEP 668 protected Python | Use a virtual env; system override only via Settings (discouraged) |
| PD-ENV-003 | probe.py non-zero / unparseable; `ModuleNotFoundError` in engine stderr | broken env metadata | Open logs; recreate the venv. A venv under a folder with non-ASCII characters no longer lands here: since 1.4.0 the probe runs under `-X utf8` (ARCHITECTURE §4) |
| PD-ENG-001 | engine binary not found: a program that cannot be started (uv not on PATH), `No module named pip`, or `ensurepip` failing to rebuild pip. A missing *interpreter* is PD-ENV-001 and an over-long command line PD-SYS-001 — both were this code before 1.4.0 | pip/uv missing | Install engine or switch engine in Settings |
@@ -22,7 +22,7 @@
| PD-RES-003 | a plan is already resolving or executing; also a cache clear while the feature that owns its target runs | another plan is in flight in this session | Wait for it, or cancel it |
| PD-RES-004 | **Raised by PipDock before the engine runs** — the reverse-dependency guard (DATA-FLOW §5) found installed dependents and execution was attempted without the user accepting the breakage | removing these packages would break others | Remove the dependents too, or force the removal knowingly |
| PD-BLD-001 | `Microsoft Visual C++ 14.0 or greater is required` | missing MSVC build tools | Install VS Build Tools, or prefer a wheel-providing version |
| PD-BLD-002 | `error in pyproject.toml` / `Backend … failed` / `metadata-generation-failed` | broken sdist build backend | Try previous version; report upstream (owner's example case) |
| PD-BLD-002 | `error in pyproject.toml` / `Backend … failed` / `metadata-generation-failed` / an unloadable backend — pip < 26.3's `BackendUnavailable` traceback, pip ≥ 26.3's `error: backend-unavailable` diagnostic (both frozen in the corpus: `pip-26.2/`, `pip/`), which must precede PD-BLD-003's `Failed to build` because 26.3 ends the diagnostic with that line | broken sdist build backend | Try previous version; report upstream (owner's example case) |
| PD-BLD-003 | `error: Microsoft Visual C++`-absent + `Failed building wheel` generic | sdist-only build failed | Same as above; details in log |
| PD-PKG-001 | **Raised by PipDock** — `Requires-Python` is checked by `pipdock-core` (`compat.rs` evaluates; `release.rs` supplies a release's range when the engine does not): an exact pin the user typed before any engine runs, and every change the engine planned after the dry run (ARCHITECTURE §3). A request that is nothing but such pins is this error; otherwise the release is left out and listed in `report.incompatible`, a preview row. Never raised before 1.4.0, though this row described it. (Engine stderr is still not the signal: pip ≥ 26 names the versions it ignored for their Python, but ends with `No matching distribution found`, which classifies as PD-PKG-002; uv ignores an upper bound and plans the release.) | package needs different Python | Shows required range vs env version |
| PD-PKG-002 | `No matching distribution found` (plain); uv's `was not found in the package registry` | name/version typo or yanked | Check spelling/version; `pipdock info <pkg>` |
@@ -55,7 +55,7 @@ GUI: `code · localized one-liner · [Details ⌄ stderr tail ≤ 40 lines] · [
1. The GUI keeps a ring buffer (last 64 KB, `LOG_RING_BUFFER_BYTES`) of engine stdout/stderr, cleared when a plan begins. It holds engine output only: PipDock's own log (`data\logs\`, new in 1.4.0) is not in it and not in the URL — Settings' Logs row copies that log's tail on its own (`logs_tail`).
2. **Report bug** builds a prefilled GitHub new-issue URL against `.github/ISSUE_TEMPLATE/bug_report.yml`:
`https://github.com/poli0981/pipdock/issues/new?template=bug_report.yml&pd-version=…&os=…&engine=…&python=…&error-code=…&log-excerpt=…`
`https://github.com/poli0981org/pipdock/issues/new?template=bug_report.yml&pd-version=…&os=…&engine=…&python=…&error-code=…&log-excerpt=…`
Given the environment, `python` carries the engine's version too (`Python 3.12.4 · pip 26.2.1`); the GUI asks for it only when the user clicks, which costs a subprocess (U31).
3. URL budget: GitHub rejects very long URLs, so `log-excerpt` is cut, tail-biased, until its **percent-encoded** form fits 6 000 characters (`BUG_REPORT_EXCERPT_CHARS`). The cap was applied before encoding until 1.4.0, and encoding decides what 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). The full log is not lost: the error row's *Copy full log* puts the whole ring on the clipboard (`BugReportLink.log`), and hides itself when there is nothing to copy.
4. Nothing is ever sent automatically — the user reviews the issue form in their browser. This is the entire "telemetry" story, and the row says so beside the button rather than leaving the user to guess what "Report bug" does.
+5 -3
View File
@@ -39,7 +39,7 @@ PipDock's thesis: **don't reimplement the resolver — explain it.** Wrap pip/uv
| # | Feature | Notes |
|---|---|---|
| P0-1 | Environment discovery & switcher | PEP 514 registry + `py -0p` + `uv python list` + known venv dirs + manual browse. Recents persisted. **Manual browse is not built:** `env_add_manual` is the one command still owed (`NOT_YET`), so a venv is found only as a `.venv`, `venv`, `env` or `.env` in the working directory, or named with the CLI's `--env`. **Recents:** the CLI's `env use` default is stored and, since 1.4.0, honoured; the GUI's selection lasts for the session. |
| P0-1 | Environment discovery & switcher | PEP 514 registry + `py -0p` + `uv python list` + known venv dirs + manual browse. Recents persisted. **Manual browse shipped in 1.6.0**, the last command `NOT_YET` held: *Add interpreter…* on Environments (and `pipdock env add`) puts any `python.exe` on a list stored in `index.db` and shown after discovery's own, and *Remove from list* (`env remove`) takes it off. Before it the GUI saw a venv only as a `.venv`, `venv`, `env` or `.env` in its working directory — the install folder, for an installed app — so almost no project venv was reachable from the GUI. **Recents:** the CLI's `env use` default is stored and, since 1.4.0, honoured; the GUI's selection lasts for the session. |
| P0-2 | PEP 668 guard | Detect `EXTERNALLY-MANAGED`; block by default with explanation; explicit opt-in override only. **The override works since 1.4.0.** It saved and nothing read it, so turning it on changed nothing — and the guard decided on whatever the caller last cached, while the rollback flow had no guard at all. Every mutating flow now decides on a fresh probe; turning the override on asks first, and a chip is shown wherever it applies (SECURITY §3). |
| P0-3 | Installed list | Per-env; up-to-date rows dimmed; outdated rows badged and mirrored into Updates tab. |
| P0-4 | Updates flow | Group dry-run resolve → preview diff → 3-way conflict choices → two-phase execution → `pip check` post-verify → summary report. **Three parts of this worked only from 1.4.0:** *Force latest* was recorded and never read, so a forced resolve was the held-back one again — it now forces, and the preview names what it breaks before anything runs (DISCLAIMER §2); a post-run check that could not run reported `ok`, and now says it could not; and PipDock enforces `Requires-Python` itself (hard invariant 10), where PD-PKG-001 had never been raised. |
@@ -47,7 +47,7 @@ PipDock's thesis: **don't reimplement the resolver — explain it.** Wrap pip/uv
| P0-6 | Bulk uninstall + reverse-dep guard | Warn "removing X breaks Y, Z" before execution; `--force` override. |
| P0-7 | Pins | Per-env pin list; pinned packages excluded from *Select all*; lock icon in lists. |
| P0-8 | Snapshots & rollback | Auto snapshot (freeze + metadata) before every batch; diff view; minimal-ops rollback. |
| P0-9 | Engine setting (pip / uv) | Auto-detect uv on first run; switch any time in Settings; engine badge in status bar. **Auto-detect is not implemented, and is owed** (audit backlog X19): a fresh install drives pip (`Settings::default`). `settings.rs` places the detection in Settings, as a choice made where it can be seen, rather than in a read of an empty store — and the CLI follows the stored setting rather than probing `PATH` — but nothing in Settings makes it yet. What exists since 1.4.0 is the half it needs: Settings shows each engine's version for the selected environment beside its radio, *not found* when it is not installed. |
| P0-9 | Engine setting (pip / uv) | Auto-detect uv on first run; switch any time in Settings; engine badge in status bar. **Auto-detect is not implemented, and is owed** (audit backlog X19): a fresh install drives pip (`Settings::default`). `settings.rs` places the detection in Settings, as a choice made where it can be seen, rather than in a read of an empty store — and the CLI follows the stored setting rather than probing `PATH` — but nothing in Settings makes it yet. What exists since 1.4.0 is the half it needs: Settings shows each engine's version for the selected environment beside its radio, *not found* when it is not installed. | **Not planned (maintenance mode, 1.6.0)**: the owner decided on 2026-11-21 that the half which exists — Settings shows each engine and its version, and switching is one click — is enough, and a first-run prompt is a new surface rather than a fix.
| P0-10 | pip upkeep | Show pip version per env; one-click `python -m pip install --upgrade pip`. |
| P0-11 | Code Health tab | deptry + vulture + ruff from PipDock's isolated tools env; report + safe `ruff --fix`. (Promoted to v1 by owner decision 2026-07.) |
| P0-12 | CLI core parity | env / list / search / install / update / uninstall / pin / snapshot / doctor / health. JSON output. |
@@ -66,10 +66,12 @@ PipDock's thesis: **don't reimplement the resolver — explain it.** Wrap pip/uv
| P1-4 | **Partly shipped, 1.1.0.** Cache manager | Shows and clears **PipDock's own** disk usage: snapshots, the Code Health tools venv and, since 1.2.0, the Security tab's audit venv. Logs (1.4.0) are not a target — the sweep keeps 14 days and nothing more, and Settings' Logs row says where they are. `index.db` is reported but not clearable — it holds settings, pins and the consent record in the same file, so "clear the cache" must never take them. **The engine caches (`pip cache`, `uv cache`) are not covered** and are a separate item: they belong to the engine, live outside `%LOCALAPPDATA%\PipDock\`, and purging them is a subprocess rather than a file delete. |
| P1-5 | **Shipped 1.1.0.** Command palette | Ctrl+K fuzzy action launcher (terminal-tech signature feature). |
| P1-6 | **Shipped 1.3.0.** Dependency view | "Who holds this back" for a selected package: the focused package between its dependents and its dependencies, each edge carrying the specifier written on it, each neighbour clickable to re-centre, plus the two transitive counts and any requirement nothing installed satisfies. **Not a node-link diagram, and that is a measurement rather than a shortcut** — on a 352-package environment a depth-1 neighbourhood is a median of 7 nodes but depth 2 is a median of 172 and exceeds 60 for 212 of 352 packages, and there are over 2000 distinct paths from `setuptools` to a root. So it is drawn at depth 1, depth is navigated by re-centring, and the transitive answer is a count. Added no runtime dependency. |
| P1-7 | Scheduled check | Optional background outdated-check with toast (no auto-apply, ever). |
| P1-7 | **Not planned (maintenance mode, 1.6.0).** Scheduled check | Optional background outdated-check with toast (no auto-apply, ever). Every prerequisite is absent — no toast, no notification, autostart or tray plugin, nothing on a timer, no surface for a background failure (ROADMAP) — and the persona it serves already has the CLI in Task Scheduler, a recipe CLI-SPEC ships. Building it would be one plugin and a permanent background process for one line of text. |
### P2 — later
**Not planned while PipDock is in maintenance mode (from 1.6.0).** Kept as the record of what was considered; CONTRIBUTING.md says what is taken instead.
| # | Feature | Notes |
|---|---|---|
| P2-1 | macOS / Linux builds | Tauri makes this near-free; test matrix is the real cost. |
+42 -45
View File
@@ -1,49 +1,42 @@
# PipDock — Release & CI
*Version 0.2 · 2026-07-27 · CI reuses the `poli0981/.github` ops repo where a suitable reusable workflow exists, and is project-local where one does not. The ops repo's suite was audited on 2026-07-27, and its CodeQL and notifier reusables re-read on 2026-10-17 (see §1 note) — do not assume a reusable exists without checking.*
*Version 0.3 · 2026-11-21 · Every workflow is project-local. Until the repository moved to the poli0981org organization (2026-11-21) four of them were callers into the owner's personal ops repo, `poli0981/.github`, at `@main`; §1 says what replaced each and why.*
## 1. Workflows (`.github/workflows/`)
| Workflow | Kind | Triggers | Jobs |
|---|---|---|---|
| `ci-rust.yml` | **project-local** | PR, push main | `fmt · clippy · test` (`windows-latest`): `cargo fmt --check`, clippy `-D warnings`, `cargo test --workspace --locked`. `cargo audit` (`ubuntu-latest`): a prebuilt `cargo-audit`, `--deny warnings`. `cargo deny` (`ubuntu-latest`): licences, sources, bans (`deny.toml`) |
| `ci-node.yml` | caller → ops `reusable-web-react.yml` + two local jobs | PR, push main | Node 24, `npm ci`, lint / typecheck / Vitest (each runs only if the npm script exists), `vite build`; local jobs `npm audit --audit-level=high` (after `npm ci --ignore-scripts`) and `tauri lockstep` (`scripts/check-tauri-lockstep.mjs`) |
| `ci-integration.yml` | project-local | PR touching what its end-to-end steps run through (the path list is in the file), nightly, Mondays, dispatch | Windows runner, Python 3.10 and 3.14: the disposable-venv suite (TESTING L2); Mondays and dispatch only, the fixture-drift re-capture against the newest pip and uv |
| `codeql.yml` | caller → ops `reusable-codeql.yml` | PR, push main, weekly | `languages: '["javascript-typescript", "rust", "actions"]'` |
| `security-scan.yml` | **project-local** | daily, dispatch | `cargo audit` and `npm audit` against `main` (SECURITY §7) |
| `release.yml` | **project-local** | tag `v*`; dispatch (`tag`, `dry_run`) | `Build · checksum` (`windows-latest`, read-only) → `Attest · draft` (`ubuntu-latest`); see §3 |
| `announce-release.yml` | caller → ops `announce-release.yml` | release published; dispatch (re-runs) | Discord release announcement |
| `notify-ci-failure.yml` | caller → ops `notify-ci-failure.yml` | `workflow_run` completed for `CI / Rust`, `CI / Node`, `CI / Integration`, `Security scan` — **by name** | Discord CI-failure notification |
| Workflow | Triggers | Jobs |
|---|---|---|
| `ci-rust.yml` | PR, push main | `fmt · clippy · test` (`windows-latest`): `cargo fmt --check`, clippy `-D warnings`, `cargo test --workspace --locked`. `cargo audit` (`ubuntu-latest`): a prebuilt `cargo-audit`, `--deny warnings`. `cargo deny` (`ubuntu-latest`): licences, sources, bans (`deny.toml`) |
| `ci-node.yml` | PR, push main | `lint · typecheck · test · build` (Node 26, `npm ci`, ESLint, `tsc`, Vitest, `vite build`); `npm audit --audit-level=high` (after `npm ci --ignore-scripts`); `npm licences` (`scripts/check-licenses.mjs` and its `node --test` suite — §2); `tauri lockstep` (`scripts/check-tauri-lockstep.mjs`) |
| `ci-integration.yml` | PR touching what its end-to-end steps run through (the path list is in the file), nightly, Mondays, dispatch | Windows runner, Python 3.10 and 3.14: the disposable-venv suite (TESTING L2); Mondays and dispatch only, the fixture-drift re-capture against the newest pip and uv |
| `codeql.yml` | PR, push main, weekly | `Analyze (<language>)` for `javascript-typescript`, `rust` and `actions`, all `build-mode: none` |
| `qodana.yml` | PR, push main, dispatch | `tokens present` → `qodana · rust` (Docker, `qodana-rust.yaml`) and `qodana · ts/js` (native, `qodana-js.yaml`), one Qodana Cloud project and token each; skipped without a token, like `sonar.yml` |
| `security-scan.yml` | daily, dispatch | `cargo audit` and `npm audit` against `main` (SECURITY §7) |
| `sonar.yml` | PR, push main, dispatch (`main` only) | `token present` (`ubuntu-latest`) → `coverage · analysis` (`windows-latest`): vitest and `cargo llvm-cov` LCOV, clippy's JSON, then `sonarqube-scan-action` with `sonar.projectVersion` from `package.json` and `sonar.qualitygate.wait`. Skipped when the run has no `SONAR_TOKEN` (Dependabot and fork PRs), and for a dispatch from any branch but `main` — the plan analyses `main` and PRs only. `sonar-project.properties` holds the scope and the project, `poli0981org_pipdock` since 2026-11-21 |
| `release.yml` | tag `v*`; dispatch (`tag`, `dry_run`) | `Build · checksum` (`windows-latest`, read-only) → `Attest · draft` (`ubuntu-latest`); see §3 |
| `notify.yml` | `workflow_run` of the workflows above, **by name**; release published; dispatch (`tag`, to announce again) | `ci-failure` → `DISCORD_CI_WEBHOOK`; `announce` → `DISCORD_RELEASES_WEBHOOK` and `DISCORD_REPO_WEBHOOK`, both through `.github/scripts/discord_notify.py` (standard library; `DRY_RUN=1` prints instead of posting) |
**`notify-ci-failure.yml` names its workflows, and a new workflow is added to it by its exact `name:`.** `workflows: ['*']` — the ops repo's own caller example — is not a wildcard to `workflow_run`: it matched nothing, so `main` stayed red from 2026-09-23 with every failure unreported. The reusable reports only failures on the default branch, and skips by name any workflow that has a dedicated notifier (CodeQL, Dependabot, deploy, Pages, release), which is why `CodeQL` and `Release` are not listed: listing them would only create skipped runs. A failed `Release` run therefore reaches no Discord channel; whoever pushed the tag has to watch it.
**`notify.yml` names its workflows, and a new workflow is added to it by its exact `name:`.** `workflows: ['*']` — the ops repo's old caller example — is not a wildcard to `workflow_run`: it matched nothing, so `main` stayed red from 2026-09-23 with every failure unreported. It reports a failure from any event but a pull request, filtering on the event alone — never on a branch name, which a fork controls. CodeQL, Qodana and Release are listed: the ops-repo notifier skipped anything named like CodeQL or Release because of "dedicated notifiers" PipDock never had, so a failed Release run reached no channel at all.
**Ops-repo audit (2026-07-27; CodeQL and the notifier re-read 2026-10-17) — why the table looks like this:**
**Why nothing calls the ops repo any more (2026-11-21).** The repository moved to the poli0981org organization so that the projects the owner maintains seriously sit apart from the ones made for fun, and a project in the organization should not run code another account can change. The four callers were exactly that: `@main` of `poli0981/.github`, unpinned, and its notifier checked out that repository's `main` and ran *its* Python script with PipDock's Discord webhooks in the environment. Each was small enough to copy, as OmniDeck — the organization's other project — had already done:
- The reusable suite covers assembly, c-cpp, chrome-extension, desktop-csharp, go, jvm, macos-swift, php, python, r, ruby and web-react. **There is no Rust reusable and no Tauri reusable**, and only `reusable-desktop-csharp.yml` uses a Windows runner — hence `ci-rust.yml`, `release.yml` and `security-scan.yml` are project-local.
- `reusable-web-react.yml` has **no `working-directory` input** (it runs `npm ci` at the repo root — hence `package.json` lives at the root with Vite's `root: './ui'`, see ARCHITECTURE §2) and **no `npm audit` step**, hence the extra local job.
- `reusable-codeql.yml` *documents* csharp, python, javascript-typescript, ruby, c-cpp, java-kotlin, go and swift, but hands `languages` straight to `codeql-action`, with `build-mode: none` for anything outside its autobuild list — so `rust` and `actions` run through it unchanged. This bullet said **CodeQL has no Rust analyzer**, so Rust's coverage came from clippy and `cargo audit` alone; the premise stopped being true in 2025, and `codeql.yml` now asks for both. Only the JavaScript/TypeScript analysis is a required check (§2).
- Portfolio notifications are **Discord-only**, driven by the ops repo's `.github/scripts/discord_notify.py`. There is no multi-platform `notify.py`.
- `reusable-web-react.yml` became `ci-node.yml`'s `lint · typecheck · test · build` job. It took two things with it: the `pages: write` and `id-token: write` grants its always-skipped Pages job forced on the caller (permissions are validated at startup regardless of `if:`), and the `dist` artifact nothing downloaded. Its missing `working-directory` input was why `package.json` sits at the repository root; the layout stays, because SonarCloud, Qodana, the scripts and Tauri's configuration all assume it now (ARCHITECTURE §2).
- `reusable-codeql.yml` became `codeql.yml`'s matrix job, with `codeql-action` pinned by commit where the reusable used `@v4`, and the same `category` values, so the alerts keep their history. Rust and Actions run as they did through the reusable, which handed `languages` straight to the action.
- `notify-ci-failure.yml` and `announce-release.yml` became `notify.yml`, with the script vendored from OmniDeck's self-contained notifier.
**Permissions matrix (explicit in every caller — the Phase-5 lesson: callers without a `permissions:` block default everything to `none`):**
**Every action is pinned by commit**, with its version in a comment for Dependabot to update — GitHub's own `actions/*` included, which had used major tags. A write permission sits on the job that needs it, never the workflow (SonarCloud S8233):
```yaml
# codeql.yml
# every workflow
permissions: { contents: read }
# codeql.yml — analyze
permissions: { actions: read, contents: read, packages: read, security-events: write }
# announce-release.yml / notify-ci-failure.yml
permissions: { contents: read, actions: read }
# ci-node.yml — the workflow, and the one job that calls the reusable
permissions: { contents: read }
# web: { contents: read, pages: write, id-token: write }
# release.yml — the workflow, then each job (§3)
permissions: { contents: read }
# build: { contents: read }
# publish: { contents: write, id-token: write, attestations: write }
# ci-rust.yml / ci-integration.yml / security-scan.yml
permissions: { contents: read }
# qodana.yml — rust, js
permissions: { contents: read, checks: write, pull-requests: write, security-events: write }
# release.yml — publish (§3)
permissions: { contents: write, id-token: write, attestations: write }
```
**The lesson has a converse: a caller must grant at least what the callee's jobs declare, even for a job that will be skipped**, because permissions are validated at startup regardless of `if:`. `reusable-codeql.yml`'s analyze job asks for `packages: read`, and a caller without it got a `startup_failure` with no logs to explain it; `reusable-web-react.yml` declares a Pages-deploy job needing `pages: write` and `id-token: write`, skipped here by `deploy-pages: false` and validated all the same. A write is granted on the job that needs it, never the workflow (SonarCloud S8233), so no other job holds one. This block showed neither of those grants and gave `release.yml` `contents: write` across the board; since 1.4.0 the release's write lives on its publish job alone.
## 2. Branch & version policy
`main` protected (PR + green CI required). SemVer; tags `vX.Y.Z`, and `release.yml` refuses a tag that does not match all five version fields (§3). Commit subjects follow Conventional Commits, but nothing generates a changelog from them — this line said a generator did. `changelog/` is written by hand, for a user, under the rules in `changelog/README.md`; a draft release's notes are GitHub's generated list of merged pull requests.
@@ -52,27 +45,30 @@ permissions: { contents: read }
| Setting | Value | Why |
|---|---|---|
| Required checks | `fmt · clippy · test`, `cargo audit`, `lint · typecheck · test · build / build`, `npm audit`, `analyze / Analyze (javascript-typescript)` | the five that ran on **every** PR when the payload was set; four more do now (below) |
| Required checks | `fmt · clippy · test`, `cargo audit`, `cargo deny`, `lint · typecheck · test · build`, `npm audit`, `npm licences`, `tauri lockstep`, `Analyze (javascript-typescript)` | eight, all running on **every** PR (below) |
| Check app | pinned to `app_id: 15368` (`github-actions`) | a check from another app cannot satisfy a requirement |
| `enforce_admins` | `true` | the owner is the only contributor; protection that exempts them protects nothing |
| Required approvals | **0** | a solo owner cannot approve their own PR, so 1 would deadlock. A PR is still required |
| `strict` | `false` | up-to-date-before-merge is friction on a repo that rebase-merges |
| Linear history | `true` | matches rebase-merge |
| Conversation resolution | `true` | a review thread left open blocks the merge — read from the API on 2026-11-10; this table did not list it |
| Force pushes / deletions | `false` | |
**`CI / Integration` is deliberately excluded, and this is the trap worth remembering:** its `pull_request` trigger is `paths:`-filtered, so on a docs-only or UI-only PR it never starts — and a required check that never starts stays *pending forever*. Requiring it would deadlock exactly the PRs it has no opinion about. `Re-capture against the latest engines` runs on no PR at all (Mondays and dispatch only) and is excluded for the same reason. The bare `CodeQL` check belongs to the `github-advanced-security` app rather than Actions and is left out too.
**Four more run on every PR and are not in the payload** — `cargo deny`, `tauri lockstep`, and CodeQL's `analyze / Analyze (rust)` and `analyze / Analyze (actions)` — all added in 1.4.0, after the five above were set (re-read 2026-10-17; the payload is unchanged). Until they are added, a red one is advice rather than a gate, which matters most for `tauri lockstep`: its whole purpose is to stop one half of a Tauri bump merging alone. `Security scan` runs on no PR and can never be required.
**The payload has had two shapes.** The first, set on 2026-08-14, held five checks — `fmt · clippy · test`, `cargo audit`, `lint · typecheck · test · build / build`, `npm audit` and `analyze / Analyze (javascript-typescript)` — and two of those names were the ops repo's: a reusable workflow's check is `<caller job> / <callee job>`, so a rename upstream would have deadlocked every PipDock PR with no failing check to point at. The second, set on 2026-11-21 when the callers became local jobs, renames those two to `lint · typecheck · test · build` and `Analyze (javascript-typescript)` and adds three that had run on every PR since 1.4.0 as advice rather than gates: `cargo deny`, `npm licences` (new that day) and `tauri lockstep`, whose whole purpose is to stop one half of a Tauri bump merging alone. **A required name is now this repository's alone, so renaming a job means changing this payload in the same change.**
**Two required contexts are named by the ops repo, not by this one.** `analyze / Analyze (javascript-typescript)` and `lint · typecheck · test · build / build` come from `poli0981/.github`'s reusables. If either job is renamed upstream, every PipDock PR deadlocks with no obvious cause and no failing check to point at — the fix is to update the protection payload, not the code.
**Still not required, and why.** CodeQL's `Analyze (rust)` and `Analyze (actions)` run on every PR and stay advice. `Security scan` runs on no PR and can never be required. SonarQube Cloud is not required in either form: `SonarCloud Code Analysis` is reported by the SonarCloud app, which the payload's `app_id` pin would not accept, and `sonar.yml`'s `coverage · analysis` is *skipped* on every PR without a token — Dependabot's — and a skipped job satisfies a requirement, so requiring it would gate exactly the PRs it never looks at. Qodana is not required for the same reason, and because one of its two linters is a JetBrains early-access build behind an external service.
**If protection wedges**, `PUT` the same endpoint with `enforce_admins: false`, or `DELETE /branches/main/protection`. Worth knowing before it is needed rather than discovering it during an incident.
Dependency updates use **Dependabot** (`.github/dependabot.yml`) — the portfolio standard, as evidenced by the ops repo's `dependabot-summary.yml`; there is no Renovate configuration anywhere in the ops repo. **Five ecosystems**, weekly on Mondays: `cargo`, `npm`, `github-actions`, `pip` at `/tools` (the Code Health pins) and, since 1.4.0, `rust-toolchain` — the `rust-toolchain.toml` channel, in a PR of its own because a toolchain brings new clippy lints. Minor and patch updates are grouped per ecosystem; security advisories arrive as **immediate, ungrouped** PRs (Dependabot's default for security updates), and the `pip` ecosystem stays its own group so Code Health pin bumps are reviewable in isolation — a bump there also needs `tools/tools-constraints.txt` regenerated (the command is in its header), and `cargo test` fails until it is (CODE-HEALTH-SPEC §2). Watching `pip`/`uv` releases to trigger the parser-fixture job is the scheduled job in `ci-integration.yml`, not the dependency bot. Since 1.4.0:
Dependency updates use **Dependabot** (`.github/dependabot.yml`) — the standard of the owner's ops repo when the CI was set up, and of the poli0981org organization now; nothing here uses Renovate. **Five ecosystems**, weekly on Mondays: `cargo`, `npm`, `github-actions`, `pip` at `/tools` (the Code Health pins) and, since 1.4.0, `rust-toolchain` — the `rust-toolchain.toml` channel, in a PR of its own because a toolchain brings new clippy lints. Minor and patch updates are grouped per ecosystem; security advisories arrive as **immediate, ungrouped** PRs (Dependabot's default for security updates), and the `pip` ecosystem stays its own group so Code Health pin bumps are reviewable in isolation — a bump there also needs `tools/tools-constraints.txt` regenerated (the command is in its header), and `cargo test` fails until it is (CODE-HEALTH-SPEC §2). Watching `pip`/`uv` releases to trigger the parser-fixture job is the scheduled job in `ci-integration.yml`, not the dependency bot. Since 1.4.0:
- **Cooldowns.** A release must be 3 days old before cargo or npm proposes it (14 for a major), and 7 for Actions and the tool pins. Most yanked or compromised releases are pulled inside that window, and nothing here needs a dependency the day it ships.
- **Tauri moves in lockstep.** The `tauri` crate and `@tauri-apps/api` must share a minor or the app refuses to start, and Dependabot bumps Cargo and npm in separate PRs, each green on its own. So each ecosystem groups its Tauri packages (`tauri`, `tauri-*`; `@tauri-apps/*`) ahead of its catch-all group, and `ci-node.yml`'s `tauri lockstep` job fails either PR until its counterpart lands beside it, comparing the core and each plugin with its npm package on `Cargo.lock` and `package-lock.json` — what is built, not what the manifests ask for. **A multi-ecosystem group was considered and not used:** it would put both halves in one PR, but what it does to the dependencies outside its patterns is undocumented, and a wrong guess would silently stop every other update.
- **TypeScript is held below 6.1** (`ignore: typescript >=6.1.0`): typescript-eslint 8.71 peers `typescript >=4.8.4 <6.1.0`, so a 6.1 bump fails `npm ci` with ERESOLVE before a single check runs. Remove it once typescript-eslint widens its range.
- **Tauri moves in lockstep.** The `tauri` crate and `@tauri-apps/api` must share a minor or the app refuses to start, and Dependabot bumps Cargo and npm in separate PRs, each green on its own. So each ecosystem groups its Tauri packages (`tauri`, `tauri-*`; `@tauri-apps/*`) apart from its catch-all group — by `exclude-patterns` on the catch-all, since 2026-11-21: Dependabot gives a dependency to the *most specific* matching group, it counts a group with `update-types` as more specific than one with patterns alone, and so the order this bullet used to rely on did nothing (that week's Tauri bumps landed in #116 and #118, the catch-alls) — and `ci-node.yml`'s `tauri lockstep` job fails either PR until its counterpart lands beside it, comparing the core and each plugin with its npm package on `Cargo.lock` and `package-lock.json` — what is built, not what the manifests ask for. **A multi-ecosystem group was considered and not used:** it would put both halves in one PR, but what it does to the dependencies outside its patterns is undocumented, and a wrong guess would silently stop every other update.
- **TypeScript is held below 6.1** (`ignore: typescript >=6.1.0`): typescript-eslint 8.71 peers `typescript >=4.8.4 <6.1.0`, so a 6.1 bump fails `npm ci` with ERESOLVE before a single check runs. Remove it once typescript-eslint widens its range (8.73 still peers `<6.1.0`, re-read 2026-11-21, with TypeScript at 7.0).
- **rfd is held below 0.18** (`ignore: rfd >=0.18.0`, cargo): src-tauri takes rfd only because tauri-plugin-dialog compiles it, and 2.8.4, the newest, still requires `^0.17` — so #112's rfd 0.18 alone would have put a second rfd in the binary. Remove it when the plugin moves, and bump both together.
- **Vitest moves as one** (group `vitest`: `vitest`, `@vitest/*`, every update type). `@vitest/coverage-v8`, which `sonar.yml` needs, peers `vitest` at its exact version, so a bump of either alone fails `npm ci` the way the TypeScript one would.
- **Labels.** PRs are labelled `dependencies` plus `rust`, `frontend`, `ci` or `code-health`, and the labels must exist in the repository or Dependabot opens its PRs without them (§5).
## 3. Release pipeline (tag `v*`)
@@ -88,8 +84,8 @@ Two jobs, so the token that can write a release never runs the build (SECURITY
The frontend is built by tauri's `beforeBuildCommand`, so the workflow does not run `vite build` itself.
- **`SHA256SUMS.txt`**, LF line endings, written byte for byte: `Set-Content` wrote CRLF, and `sha256sum -c` on any other platform reads the CR as part of the file name and reports the file missing.
- The installers and the checksums are uploaded as the `release-artifacts` workflow artifact.
2. **`Attest · draft`** — Ubuntu runner, the only job granted `contents`, `id-token` and `attestations` write. It downloads the build, attests build provenance for the `.exe` and the `.msi` (`actions/attest-build-provenance`, verifiable with `gh attestation verify <file> --repo poli0981/pipdock`), and drafts the GitHub release with GitHub's generated notes and all three files (`softprops/action-gh-release`). Both actions are pinned by commit.
3. **Publishing the draft is a human decision**, taken per release; publishing fires `announce-release.yml`'s Discord announcement. For 1.4.0 the owner approved the plan and instructed the assistant to check the installers against `SHA256SUMS.txt` and then publish — `docs/AI-DISCLOSURE.md` records who did what.
2. **`Attest · draft`** — Ubuntu runner, the only job granted `contents`, `id-token` and `attestations` write. It downloads the build, attests build provenance for the `.exe` and the `.msi` (`actions/attest-build-provenance`, verifiable with `gh attestation verify <file> --repo poli0981org/pipdock`; an attestation stays with the account that made it, so 1.4.0 and 1.5.0, built before the move to the organization, verify with `--owner poli0981 --signer-repo poli0981/pipdock` and no longer with any `--repo`), and drafts the GitHub release with GitHub's generated notes and all three files (`softprops/action-gh-release`). Both actions are pinned by commit.
3. **Publishing the draft is a human decision**, taken per release; publishing fires `notify.yml`'s Discord announcement. For 1.4.0 the owner approved the plan and instructed the assistant to check the installers against `SHA256SUMS.txt` and then publish — `docs/AI-DISCLOSURE.md` records who did what.
**A dry run** — `workflow_dispatch` with `dry_run` — builds and checksums any ref, a branch before it merges included, and attests and drafts nothing, so the release recipe is tested before a tag depends on it. Without `dry_run`, dispatch builds a version tag only (the `tag` input re-runs one); a branch is refused.
@@ -97,7 +93,7 @@ This list had a fourth step — a post-release checklist issue, opened automatic
There is no signing step. **PipDock does not update itself** (SECURITY §5), so no `latest.json` is produced, no artifact is code-signed, and no keypair exists to manage. The attestation is signed through Sigstore with a short-lived certificate bound to the workflow run — which is why the publish job needs `id-token: write` — so it adds no key either.
Secrets bootstrap: set per-repo with `gh secret set` (the ops repo has no `setup-secrets.sh`) — the Discord webhooks the ops-repo notifiers expect (`DISCORD_RELEASES_WEBHOOK`, `DISCORD_REPO_WEBHOOK`, `DISCORD_CI_WEBHOOK`; the callers pass `secrets: inherit`). That is the whole list.
Secrets bootstrap: set per repository with `gh secret set`, none at the organization — the Discord webhooks `notify.yml` posts to (`DISCORD_RELEASES_WEBHOOK`, `DISCORD_REPO_WEBHOOK`, `DISCORD_CI_WEBHOOK`), `SONAR_TOKEN` for `sonar.yml` (re-issued for the `poli0981org` SonarQube Cloud organization on 2026-11-21), and `QODANA_TOKEN_RUST` and `QODANA_TOKEN_TS_JS` for the two Qodana Cloud projects `qodana.yml` reports to. That is the whole list; a transfer between owners keeps a repository's secrets, and it kept these.
## 4. Artifact & support policy
@@ -108,12 +104,13 @@ Two active lines at most: latest release gets features; previous minor gets secu
- [x] GPL-3.0 `LICENSE` at root; `legal/` committed **publicly** (the in-app legal gate links to these GitHub URLs — CommandForge lesson: don't leave them gitignored).
- [x] `.github/ISSUE_TEMPLATE/bug_report.yml` (shipped in this suite) + `config.yml` disabling blank issues.
- [x] `.github/dependabot.yml` covering cargo, npm, github-actions and the Code Health pins — and the Rust toolchain since 1.4.0.
- [x] `rust-toolchain.toml`, `.nvmrc` (24), `Cargo.lock`/`package-lock.json` committed.
- [x] **Repo settings (owner, via the GitHub UI or `gh` — not committable):** branch protection on `main`; disable Advanced Security → CodeQL *Default setup* (the reusable is advanced-setup and is rejected at upload time otherwise); enable Discussions for the issue-template contact links.
- [x] **Secrets via `gh secret set`:** the Discord webhooks (`DISCORD_RELEASES_WEBHOOK`, `DISCORD_REPO_WEBHOOK`, `DISCORD_CI_WEBHOOK`). No signing key — see §3.
- [x] `rust-toolchain.toml`, `.nvmrc` (26 — it said 24 until 1.5.0, a month after every workflow had moved to 26), `Cargo.lock`/`package-lock.json` committed.
- [x] **Repo settings (owner, via the GitHub UI or `gh` — not committable):** branch protection on `main`; disable Advanced Security → CodeQL *Default setup* (`codeql.yml` is an advanced setup, and is rejected at upload time otherwise); enable Discussions for the issue-template contact links.
- [x] **Secrets via `gh secret set`:** the Discord webhooks (`DISCORD_RELEASES_WEBHOOK`, `DISCORD_REPO_WEBHOOK`, `DISCORD_CI_WEBHOOK`), `SONAR_TOKEN`, `QODANA_TOKEN_RUST`, `QODANA_TOKEN_TS_JS` (§3). No signing key — see §3.
- [x] App icon settled (`src-tauri/icons/`). It was called a placeholder because nobody had chosen it; the owner chose it in Phase 4, which is what "a brand decision" needed.
- [x] README badges: CI, CodeQL, release, license.
- [ ] **Labels (owner, repo settings — opened by 1.4.0):** `dependencies`, `rust`, `frontend`, `ci` and `code-health` for Dependabot (§2), and `triage` for `bug_report.yml`. None existed on 2026-10-17, so Dependabot's PRs arrive unlabelled and a bug report gets `bug` alone.
- [x] **Labels (owner, repo settings — opened by 1.4.0):** `dependencies`, `rust`, `frontend`, `ci` and `code-health` for Dependabot (§2), and `triage` for `bug_report.yml`. None existed on 2026-10-17; all six did by 2026-11-10, when `accessibility` joined them for `accessibility.yml`.
- [x] **Community health files (1.5.0):** `ACCESSIBILITY.md`, `CONTRIBUTING.md` and `CODE_OF_CONDUCT.md` (Contributor Covenant 2.1) at the root; `.github/PULL_REQUEST_TEMPLATE.md` and `.github/ISSUE_TEMPLATE/accessibility.yml`; and a repository description. The ops repo's description says it carries community health files and it carries none, so nothing was inherited. `bug_report.yml` keeps its name: `crates/pipdock-core/src/report.rs` builds the in-app *Report bug* link from it.
**Closed 2026-08-14, and three of the last four were already true.** CodeQL *Default setup* read
`not-configured` and Discussions were already on — both had been done and never ticked, which is
+382 -7
View File
@@ -740,7 +740,7 @@ Three things it settled that outlive it:
## Post-1.0 (P1 wave)
Security tab (pip-audit), pin auto-suggest, requirements/constraints export-import, cache manager, command palette, dependency graph view, scheduled check. **Six of the seven have shipped** — four in 1.1.0, the Security tab in 1.2.0 and the dependency view in 1.3.0; the scheduled check remains. Then P2 candidates by demand: macOS/Linux, per-env engine, elevation broker, winget, JP locale.
Security tab (pip-audit), pin auto-suggest, requirements/constraints export-import, cache manager, command palette, dependency graph view, scheduled check. **Six of the seven have shipped** — four in 1.1.0, the Security tab in 1.2.0 and the dependency view in 1.3.0; the scheduled check is **not planned**, decided with the move to maintenance mode in 1.6.0 (*Maintenance mode*, below). Then P2 candidates by demand: macOS/Linux, per-env engine, elevation broker, winget, JP locale.
**About shipped early, in Phase 4** — see above. Two smaller items were added to this wave rather
than done at 1.0:
@@ -959,8 +959,9 @@ mode that is *silent*, and the reason SECURITY §4 requires the widening in pros
has always said audit never applies anything; "update to fixed version" is the ordinary Update flow,
reached by the user.
**What is left of Post-1.0 is one item**: the scheduled check (PRD P1-7). The dependency view
shipped as 1.3.0; its record is below.
**Nothing is left of Post-1.0.** The scheduled check (PRD P1-7) was the last item, and on
2026-11-21 the owner closed it as not planned, for the reasons the survey below gives; the
dependency view shipped as 1.3.0, and its record is below.
*This paragraph used to point at "the analysis above" for what blocked each of two items. There was
no such analysis anywhere in this document* — the survey existed only outside the repository, and
@@ -1388,6 +1389,8 @@ starting a slice**: several are cheaper inside a slice that touches the same fil
| — | `pipdock-cli` `apply_fix`; `health::fix::dirty` | `health --fix --yes` outside a git repository proceeds: `dirty` answers `None` for a clean tree and for no repository alike | Needs a three-way answer from `dirty`, which the GUI's `health_dirty` shares |
| — | `pipdock-cli` | On a terminal, an impossible package is skipped at the prompt without the engine's explanation; `report-bug` points at a log excerpt the CLI never attaches; `uninstall --json --force` warns about "the breakage above", which JSON mode never printed | Small CLI copy fixes |
| X36/U55 | `src-tauri/src/commands.rs:425-467,1189-1214,1350-1377` | Save and export accept any path the webview names, and overwrite a sibling without asking | The picker is the only caller today; defence in depth, not a reachable hole |
| X36-b | `src-tauri/src/commands.rs` — every command taking a `PyEnv` (`pkg_list`, `pip_upgrade`, `deps_graph`, `plan_resolve`, `health_run`, `audit_run`, `engine_info`…) and `env_probe` | The interpreter a `PyEnv` names is run as the webview hands it back, and `env_probe` validates only a path the webview calls `manual` | Found by 1.6.0's independent review; predates it. The paths come from `env_scan`, which checks added entries itself, so this is defence in depth against a compromised webview — a `validate_interpreter` per command, its own change |
| — | `exec.rs:633` `canonical_interpreter` | An interpreter on a share hashes as `unc\server\share\…`: the verbatim prefix `\\?\` is stripped, `\\?\UNC\` is not | Correcting it changes the identity — and orphans the pins and snapshots — of every interpreter on a share |
| — | `envs/mod.rs:131-138`, `engine/parse.rs:103-108`, `exec.rs:367-375`, `pins/mod.rs:85-89`, `store/mod.rs:253`, `index/mod.rs:144,448` | Failures that are dropped without a log line (a probe error entry, an unreadable pin row, a Job Object that would not attach…) | The log exists now; each wants a `tracing::warn!` and a look at whether it should surface |
| — | `PIP_MIN_VERSION_FOR_REPORT`, `UV_MIN_VERSION`, `probe_supported`, `MIN_PROBE_PYTHON` | Declared floors nothing enforces | Enforcing them is a user-visible refusal and wants its own copy and test |
| L56 | `audit.rs:165-168` | An audit's package count includes skipped packages | Cosmetic |
@@ -1402,9 +1405,14 @@ starting a slice**: several are cheaper inside a slice that touches the same fil
| U40 | `PdPins.tsx:138-139,202-209`; `stores/index.ts:466-472` | The empty state can show before the list has loaded; a reason edit commits on blur with no way to cancel; accepting a suggestion drops it even when the pin write failed | Small, and best done together |
| U41 | `stores/index.ts:526-538`; `PdPalette.tsx:96-103` | No in-flight guard: a double click takes two snapshots, and the palette can dispatch twice | Small |
| U44 | `PdEnvironments.tsx:186-196` | A `scan-progress` listener can outlive the screen | Small; with U19 |
| U45 | `styles.css:156-162` | `forced-colors` misses Remove, Force, rollback, Clear and the active tab | Needs a High Contrast pass, by hand |
| U47 | grids, tabs, radio groups, listbox; `PdHealthReport.tsx:220,321` | ARIA roles are partial | An accessibility pass of its own |
| U48 | `PdPalette.tsx:219` | The palette's selection is not scrolled into view | Small |
| ~~U45~~, ~~U47~~, ~~U48~~ | — | Closed by 1.5.0, the accessibility pass (below) | — |
| A1 | `PdPackageTable.tsx`, `PdPackageRow.tsx` | The package grid is one tab stop per row with no `↑`/`↓` between rows, so passing 200 rows is 200 Tabs | Changes the tab model the owner had just tested by hand on 1.4.0; wants a decision and a Narrator pass of its own, and a virtualizer that scrolls ahead of focus |
| A2 | `PdPackages.tsx:197`, `PdEnvironments.tsx:222`, `PdUninstallDialog.tsx:130`, `PdSummarySheet.tsx:83` | A live region that mounts together with its text may never be announced | Only a screen reader can answer it; Search's region was rebuilt in 1.5.0 because its fix did not depend on the answer |
| A3 | `PdErrorRow.tsx:68`; `PdStatusLine.tsx:41` with `PdEnvironments.tsx:223` | Every error row is `role="alert"`, so a failed batch may fire one assertive alert per package; "scanning" is announced by two regions | Same: needs Narrator, and a decision about which region owns it |
| A4 | `PdConflictRow.tsx`, `PdDockBay.tsx` | Why a control is disabled is only in a `title`, which a disabled control cannot be focused to show | Wants visible text beside the control, in both catalogues |
| A5 | `packageColumns.ts`, `PdSidebar.tsx`, `tauri.conf.json` | No in-app zoom: at 200 % in the default window the name column (`min-w-0 flex-1`) collapses to zero and the sidebar cuts off its last tabs | With U51 — a minimum for the name column, an overflow for the sidebar, then `zoomHotkeysEnabled` |
| A6 | `PdDialog.tsx`, `PdUninstallDialog.tsx`, `PdCacheUsage.tsx`, `PdHealth.tsx` | A dialog's buttons still go `disabled` while its work runs, so focus drops inside the modal until it closes | The shell's lost-focus rule recovers it when the dialog closes; inside one, `aria-disabled` needs the dialog's own busy handling rethought |
| A7 | — | Narrator on 1.5.0, NVDA and JAWS at all, each Windows contrast theme by hand, the installers | The owner's hands; `ACCESSIBILITY.md` says none of it has been done and must be updated by whoever does it |
| U49 | `App.tsx` Ctrl+K | Ctrl+K reads `e.key`, unlike Ctrl+1..9 | Letter shortcuts by physical key are wrong on Dvorak; needs a decision |
| U50 | `PdHealth.tsx:215`, `PdSecurity.tsx:160`, `PdCacheUsage.tsx:32` | Dates and sizes are not formatted per locale | An `Intl` pass |
| U51 | `PdEnvironments.tsx:55`, `PdEnvDetail.tsx:76`, `PdPackageRow.tsx` | Long paths and names overflow | With U22's container-query work |
@@ -1416,9 +1424,376 @@ starting a slice**: several are cheaper inside a slice that touches the same fil
| — | `plan.confirm` | "Confirm (1 changes)" — the count is not pluralised | Copy, both catalogues |
| — | cache manager | The log folder is not one of its targets | The log is new; worth a row once someone asks |
| X12 | `ci-integration.yml` | The `#[ignore]` tests never run in CI | Each needs a fixture the runner can provide — an index, a hang |
| — | CI | SBOM, an installer smoke test, coverage, `cargo machete`, actionlint/zizmor, dependency review, typos and link checks | Each its own decision; none is free on a Windows runner |
| — | CI | SBOM, an installer smoke test, `cargo machete`, actionlint/zizmor, dependency review, typos and link checks | Each its own decision; none is free on a Windows runner. Coverage left this row on 2026-10-25 (below) |
| — | `pipdock-cli/src/run.rs` (4 %), `src-tauri/src/commands.rs` (0 %) | The two large coverage holes `sonar.yml` measured: the CLI driving a real interpreter, and the IPC surface. L2 exercises the first and only a running app the second, so neither is measured | Each needs a seam — an engine `run.rs` can be handed, a `tauri::test` harness — and is its own slice. The gate asks 80 % of *new* lines, so neither blocks anything until it is touched |
| — | `screenshot/` | The eight screenshots predate About and 1.4.0's window | Retake with a release, by hand |
## After 1.4.0 — SonarQube Cloud from CI — **2026-10-25**
No version. The owner switched automatic analysis off, set `SONAR_TOKEN`, and asked for CI-based
analysis on the newest scanner, with Dependabot, the audits and the code scanners brought up to
date on the way.
**Where it started.** Automatic analysis had measured 11 602 lines — CSS, JS, Python, TypeScript,
YAML — and **not one of Rust**: it cannot build, so two thirds of the code had never been analysed
and no coverage could be imported. It had also never sent a project version, so the *previous
version* new-code period was still the first analysis (2026-09-27) and grew with every merge.
Separately, `Security scan` had been red on `main` every day since 2026-10-21 — rustls-webpki
(RUSTSEC-2026-0382), webpki-root-certs (-0383), a yanked clipboard-win, and zod
(GHSA-mrhx-c7xc-m3w5, through eslint-plugin-react-hooks) — and since `cargo audit` and `npm audit`
are required, every PR would have been red as well. Dependabot opened a PR for none of the four.
| What | Now |
|---|---|
| Analysis | `sonar.yml`: one Windows job — vitest and `cargo llvm-cov` LCOV, clippy's JSON, `sonarqube-scan-action` v8.3.0 pinned by commit, `sonar.qualitygate.wait` so a red gate on `main` reaches Discord |
| Scope | `sonar-project.properties`: everything tracked, tests split out, fixtures and binaries excluded, coverage excluded only where no test here can execute the code, with the reason beside each |
| New code | `sonar.projectVersion` from `package.json`, which the previous-version period keys on — one analysis late (below) |
| The token | In the scanner step's environment alone; a job with no token (Dependabot, forks) is skipped, not failed |
| Audits | The four bumps above, and nothing ignored |
| Dependabot | A `vitest` group, because `@vitest/coverage-v8` peers vitest exactly; the `rfd` and `typescript` ignores re-checked and both still needed |
**What running found that reading did not:**
- **Coverage, measured for the first time:** Rust 71.6 % of 15 364 lines, TypeScript 68.4 % of
1 569; SonarQube Cloud's combined figure is **71.3 % of 16 327**. TESTING §3 had promised
thresholds since the first draft that nothing had measured. The two big holes are a backlog row.
- **The plan analyses `main` and pull requests, and nothing else.** A dispatch on the branch, to see
every Rust finding before merging, uploaded its report and then failed the gate check with
"Organization is not allowed to access data from non main branches". A PR analysis reports only
the lines it changes, so the full Rust picture exists only once `main` is analysed; the dispatch
is now refused off `main`.
- **Every tracked image and font was read as UTF-8 text** by the secrets sensor, one warning each,
once `sonar.sources=.` replaced automatic analysis's own scoping.
- **The scanner's signature check works on a Windows runner.** v8 verifies the CLI's OpenPGP
signature by default, and Git for Windows' `gpg.exe` does it; no `skipSignatureVerification`.
- **The first analysis of `main` failed its gate**, on the two things automatic analysis could
never have seen. **Sixteen Rust findings**, every one a bug by Sonar's classification: three
`rust:S6677` — `message = %e.message` beside a format string records two fields called
`message`, and the log line read `failed code=PD-ENV-001 no interpreter at …` with the error's
words indistinguishable from the event's (now `error = …`, as every other failure logs it, and
`golden.rs` reads the CLI's log to hold it) — and thirteen `rust:S7493`, `std::fs` inside an
`async fn`: the tools-venv sync, Code Health's deptry report, and the four commands that write or
read a file the user chose, on what may be a network drive. They go through `tokio::fs` now.
And **new-code coverage 78.3 %** against 80 %.
- **Sending a version moves the baseline one analysis late.** The analysis that first sent
`1.4.0` still measured new code from 2026-09-27, so "new" was all of 1.4.0's audit — 4 037
lines, 849 of them uncovered; the one after it measured from the last analysis of the version
before (2026-10-20). Waiting a merge would have turned the gate green by itself, and that was
not the answer: the lines were untested either way, and a release bump will gate the next
merge on its whole period exactly like this. The answer was tests: the restore half of `execute_rollback`, a
force the environment's Python cannot run, PEP 691 parsing (split out of `index::refresh`, with
L55's empty list finally under test), `user_file_error` (U25), a plan verified against another
environment, the cached half of `release::PyPiReleases`, and the store paths no test had driven
— a resolve that succeeds, a round of decisions, a rollback preview, and late answers on the
error paths. `InstallSet::only` had no caller and went. Estimated against Sonar's own per-line
data before pushing, by a script that reproduced its 78.28 % exactly: 81.2 %. Measured on
`main` after #91: **81.2 %, gate passed, 0 open issues, every rating A**, overall 72.3 %.
- **Cost:** eight to eleven minutes on a Windows runner beside the required checks, three of them restoring
ci-rust.yml's cache read-only. Saving a cache of its own was rejected: the repository is at 8.6 of
its 10 GB, and a fourth Windows cargo cache would evict the ones the required checks restore.
## After 1.4.0 — dependencies to latest, and pip 26.3 — **2026-11-04**
No version. The owner asked for every dependency, action and toolchain brought to its newest
release, code fixed where that needed it, and a version only if one was needed. One PR superseded
the five open Dependabot PRs (#97–#101).
**Where it started.** `cargo audit --deny warnings` had been red since 2026-11-03 on the daily scan
and on all five bot PRs: `async-executor 1.14.0` was yanked. It is Linux-only (zbus), so no shipped
binary ever carried it — the same shape as 2026-10-20's informational advisories, every gate red
for something the product never contained.
| What | Now |
|---|---|
| Cargo | `cargo update` (~60 bumps, 627 crates → 616); rusqlite 0.41.1 (SQLite 3.54.1), no code change; rfd 0.17 **with** tauri-plugin-dialog 2.8.4, which moved to rfd ^0.17 — the condition the `rfd` ignore was waiting for, so it went |
| npm | Thirteen packages to latest; TypeScript still held at 6.0.3, typescript-eslint 8.72.1 still peering `<6.1.0` |
| Tools | ruff 0.17.3 and three transitive pins, regenerated by the header's own command |
| Actions / Node | taiki-e/install-action v2.87.32, sonarqube-scan-action v8.4.0; Node 24 → 26, Active LTS since 2026-10-28 |
| "Latest" | The newest release **past each ecosystem's cooldown**, not the newest published: v2.87.33+, v8.4.1, filelock 4.2.5+ and platformdirs 4.13.7+ were days old and wait for Dependabot |
**What running found that reading did not:**
- **pip 26.3 had re-rendered a build failure, and the classifier read it as the wrong code.**
Found by dispatching the drift job on the branch, two days after pip 26.3 and five before the
Monday run would have. An unloadable build backend was a `BackendUnavailable` traceback (exit 2);
26.3 prints `error: backend-unavailable` and ends with `Failed to build '<name>' when calling
build backend hook …` (exit 1). The traceback was the only needle PD-BLD-002 had for it, so the
failure fell through to `failed to build` — PD-BLD-003. Both codes give the same advice, so the
cost to a user was the headline sentence, not the remedy; that, and no advisory reaching the
shipped binary, is why this is not 1.4.1. *Upgrade pip* installs 26.3, so every user who presses
it would have met it. The 26.2.1 capture is frozen as `pip-26.2/` — only that scenario moved —
and a test holds the two renderings to one code; it failed against the old classifier first.
- **A dependency ignore has an exit condition, and somebody has to notice it was met.**
tauri-plugin-dialog 2.8.4 moved to rfd 0.17 the same week; Dependabot's #100 took the plugin and
would have put a second rfd in the binary, because the ignore still blocked the matching bump.
- **`npm audit` now lists a moderate advisory it cannot fix**: minimatch GHSA-g3hv-75wg-m249,
patched only in 11.x, which ESLint 10.14 and typescript-eslint 8.72 do not accept. Dev-only, the
gate is `high`, and ARCHITECTURE §10 says why it is tolerated rather than forced by `overrides`.
## 1.5.0 — the accessibility pass — **2026-11-10**
One slice: audit backlog U45, U47 and U48, taken as "an accessibility pass of its own", plus the
statement that says what the pass did and did not establish. It began from GitHub's community
profile — five things missing, `ACCESSIBILITY.md` among them — and from the owner's report that
1.4.0 had been driven end to end with the mouse unplugged and with Narrator, and nothing blocked.
Both were true. The code agreed with the owner: nothing was unreachable. What a survey of the code
found was eleven places where it worked and made a user work for it.
**What shipped** (the changelog has it by reader): focus on every screen replacement, not only on a
tab change; the tabs, radio group and listbox patterns finished; names that contain the visible
text; a well-formed grid; a status region for Search; `data-destructive` in place of a hand-kept
list; axe-core over every screen; `ACCESSIBILITY.md`, `CONTRIBUTING.md`, a code of conduct, a pull
request template and an accessibility issue form; and About's Accessibility section.
| Decision | Why |
|---|---|
| axe-core called directly, no `eslint-plugin-jsx-a11y` | The plugin peers ESLint 9 at most and this repository is on 10 — the same wall `react/jsx-no-literals` hit. The matcher packages wrap axe and pin a runner's major. axe-core has no dependencies |
| The radio group's arrows move focus and choose nothing | The pattern says arrows check what they land on; here that would open *Force latest*'s destructive confirm from an arrow key |
| `data-destructive`, and a test that reads the source | Forced-colors cannot be rendered under jsdom, and the stylesheet's list of five `data-action` names had been wrong for as long as it existed |
| WCAG 2.2 AA as a *target* | Nobody independent has audited it, Narrator was not re-run on 1.5.0, and a statement that claims more than its last test is the thing it exists to prevent |
| An answer in 7 days and no fix date | One maintainer. The toolkit's template promises 30/60/90 days; a date that slips is worse than none |
| Zoom built, measured, and taken out | Below |
| `legal/` untouched | The five hashed documents did not need to change, so the gate does not re-show. A dev-only dependency is not a third-party notice |
**What running found that reading did not** — the installed bundle, WebView2's remote-debugging
port (`WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=…`, which a release build
honours), real key presses through `Input.dispatchKeyEvent`, and `document.activeElement` and the
accessibility tree read back after each one. Every item below was in code whose tests were green:
- **The high-contrast border on destructive buttons had never been drawn — not for the five the old
list named either.** The rule was in `@layer base`; every button carries Tailwind's `border`
utility; a later layer wins whatever the selectors say. UI-SPEC §7 described that border for two
milestones, and U45 was filed as "the list is incomplete" when the list did nothing at all. Seen
by emulating `forced-colors: active` and enlarging a screenshot of *Cancel* beside *Allow*: the
same border. The rule is unlayered now, a test counts the braces, and it is a double border
because 2 px beside 1 px is not a difference anyone sees.
- **A button that disables itself when pressed drops focus to `<body>`.** A browser takes focus
from a control that becomes `disabled`; jsdom does not, so no test could fail. Found by pressing
*Download the index*. Nine buttons were doing it — *Use*, *Rescan*, *Run*, *Run audit*, *Add*,
*Stop* among them — which is to say most of the app's primary actions lost a keyboard user's
place on the keypress that started the work. Busy is `aria-disabled` now; `disabled` is for
unavailable.
- **Accepting the legal gate left focus on nothing.** The fix for "focus is lost when the screen is
replaced" had been written and tested an hour earlier and did not cover it, because the gate is
rendered *instead of* the shell: a fifth way to replace the screen, and the first thing a new
user does.
- **A dialog's name read "Remove packages : certifi".** A browser puts a space before
visually-hidden text; jsdom's name computation does not.
- **The Updates tab's name read "Updates(5)"** — inline spans are joined without a space.
- **Zoom broke the table.** `zoomHotkeysEnabled` is one line and needs no permission on Windows.
At 200 % in the default 1180 px window — a 590 px viewport, emulated with a device-metrics
override — the name column collapsed to zero width and the sidebar cut off *Settings* and
*About*. It holds at a maximised 1920 px window, which is the layout's own 900 px floor. Taken
out; backlog A5.
And one thing running confirmed rather than found. The survey suspected a package row's focus ring
was clipped, and it was — on three sides, in normal mode, fixed here. The forced-colors block had
carried that exact fix since M2, with a comment saying why: the knowledge was in the stylesheet,
scoped to the one mode someone had looked at.
**And what a second reader found**, in the diff, after the smoke had passed — an independent review
run while CI was going:
- **`sr-only` text needs a positioned parent.** It is `position: absolute`; with no positioned
ancestor it is laid out against the viewport and escapes every scroller above it. A pin chip's
new hidden sentence did exactly that on Pins, where nothing between the chip and `<html>` is
positioned: a long list made the whole window scroll and took the header with it. Package rows
hid it, because a row is `absolute`. Every parent of hidden text is `relative` now.
- **An error-only summary had no `<h1>`**, so the new focus rule had nothing to land on — on the
one screen where a run had just failed.
- **A drawer that mounts already open has no opener.** `consoleOpen` outlives a run; closing the
drawer in the next one dropped focus as it had before the fix. It falls back to the *Console*
button.
- Under forced-colors, the selection outline followed the focus ring at equal specificity, so a
focused current tab got a 1 px line in place of its 2 px ring.
**What it did not establish.** The assistant cannot run a screen reader. Everything above about
what assistive technology receives is the accessibility tree, which is what is *exposed*, not what
is *said*. Narrator on 1.5.0, NVDA, JAWS and each contrast theme by hand are backlog A7 and are
listed as untested in `ACCESSIBILITY.md`. ROADMAP's own count of live regions — "eight now", Phase
3 · P6 — was ten when this slice counted them, plus two `role="status"`.
**Dependencies, the same day, no version of their own** (#106, superseding #103–#105): the npm,
actions and tools bumps that were past their cooldown, with `tools-constraints.txt` regenerated by
the header's command rather than edited (the result was byte-identical to Dependabot's edit, which
is the check the edit had lacked) and the drift job dispatched on the branch first. Held back and
said so in the PR: i18next 27 with react-i18next 18, and jsdom 31 — majors inside the 14-day
window, the first with new defaults and stricter `t()` types that want a session of their own —
and rfd 0.18, which tauri-plugin-dialog 2.8.4 still pins below.
## After 1.5.0 — the move to poli0981org — **2026-11-21**
No version of its own; it ships inside 1.6.0. The owner moved the repository from `poli0981/pipdock`
to the **poli0981org** organization, to keep the projects maintained seriously apart from the ones
made for fun, and asked for everything that move touches: the alerts and the open Dependabot PRs,
Qodana on the owner's Ultimate plan, a licence check for the dependencies, CI that lives in the
repository ("mono repo"), and proof that the repository works in its new home. One PR,
[#119](https://github.com/poli0981org/pipdock/pull/119), superseding #113–#118.
**Where it started.** `main` had been red every day since 2026-11-18, and so had `cargo audit` on
all four of the week's Dependabot PRs: **RUSTSEC-2026-0543, chrono unmaintained** — in `Cargo.lock`,
and compiled into nothing.
| What | Now |
|---|---|
| chrono | Listed only because serde_with 3.24's `std` feature carries the weak features `chrono_0_4?/clock` and `chrono_0_4?/std`, which Cargo's lock resolution records even when nothing enables them; `cargo tree -i chrono --target all` prints nothing. Ignored in `.cargo/audit.toml` with that reason and its exit condition |
| Dependencies | #113–#118 cherry-picked (Rust 1.100.0, rusqlite 0.42.0, Tauri 2.12.6 with its npm half, the code-health pins, three actions, eleven npm packages) plus jsdom 31.0.1. No new clippy lint fired; neither rusqlite nor jsdom needed a code change; `tools-constraints.txt` regenerated by its header's command came out byte-identical to Dependabot's edit; the drift job, dispatched on the branch, found no engine output moved |
| minimatch | GHSA-g3hv-75wg-m249, tolerated since 2026-11-04, is gone: ESLint 10.15 and typescript-eslint 8.73 moved to minimatch 11 (11.0.9 throughout) |
| rfd 0.18 (#112) | Not taken. tauri-plugin-dialog 2.8.4 is still the newest and still requires `^0.17`; the ignore is back, with its exit condition |
| CI | Every workflow is local and every action pinned by commit (RELEASE-CI §1). Branch protection's payload changed with it: the two names the ops repo owned are renamed, and `cargo deny`, `npm licences` and `tauri lockstep` are required — eight checks |
| Licences | `npm licences`: 18 production packages, all MIT, Apache-2.0 or both. Proved to fail on a lockfile with one licence changed to CC-BY-4.0 |
| Qodana | Two Qodana Cloud projects, two configs, two tokens; full scans; a Rust baseline; `--fail-threshold 0` |
| SonarQube Cloud | `poli0981org_pipdock`, empty until this branch's first analysis; the old project keeps the history to 1.5.0 |
**What running found that reading did not:**
- **Dependabot's groups had never worked as written.** It gives a dependency to the *most specific*
group, and counts one with `update-types` as more specific than one with patterns alone — its own
log: "Skipping tauri-plugin-dialog for group 'tauri' - belongs to more specific group
'cargo-minor-patch'". The `tauri` groups caught nothing, while `dependabot.yml` said their order
kept Tauri out of the catch-alls. `exclude-patterns` on each catch-all now does.
- **Qodana's first Rust result was 0 problems, from 0 files analysed** — the same shape as 1.4.0's
"a check that cannot run must not report a pass". The linter container runs as the runner's
user, so rustup could not install the toolchain `rust-toolchain.toml` pins (it writes under
`/usr/local/rustup`, root's), `cargo metadata` failed, and RustRover loaded no Cargo project and
inspected nothing. Fixing that exposed the second half: `CARGO_HOME` was root's too, and the
registry download failed with "Permission denied". The bootstrap now points the job's own checkout
at the image's toolchain (1.94.0), and `CARGO_HOME` lives in the action's cache mount. The third
run analysed the workspace and found 62.
- **Of the 62, two are Critical and both are RustRover misreading code rustc compiles**: "value
used after being moved" on a `std::io::ErrorKind`, which is `Copy` (`exec.rs`, a test), and
"takes 2 parameters, 1 supplied" on an `async_trait` method called through `Box<dyn Engine>`
(`commands.rs`). The other 60 are Moderate style: 49 unnecessary path qualifications, 10
duplicated fragments, 1 trait-member order in a test fake. All 62 are the baseline; anything
new fails the run. Qodana for JS found six and all were fixed: five `React.*` types reached
through the UMD global rather than imported, and one High, `step` "possibly null" in
`PdPlanPanel` — which TypeScript narrows through an aliased condition and an optional chain, and
WebStorm's engine through neither, so it took an explicit `step !== null`.
- **SonarQube Cloud's first gate on the branch failed on code it had never seen**: `npm ci` running
lifecycle scripts in the web and Qodana jobs (githubactions:S6505). It ran the same way inside the
ops repo's reusable, where nothing analysed it. The one package with an install script is
fsevents, macOS-only; every `npm ci` in the workflows passes `--ignore-scripts` now.
- **An attestation stays with the account that made it.** After the transfer, README's own command
— `gh attestation verify <file> --repo poli0981/pipdock` — answered 404 for 1.5.0, and so does
`--repo poli0981org/pipdock`: the attestations of 1.4.0 and 1.5.0 are reachable only through the
user account that owned the repository when they were made. `--owner poli0981 --signer-repo
poli0981/pipdock` verifies them, checked against the real 1.5.0 installer. A user following
README to the letter would have been told not to run a genuine build.
- **A flaky runner, recorded so it is not chased again.** One integration job failed before any
test: rustup on the Windows image reported "detected conflict: `bin\cargo-clippy.exe`" while
installing Rust 1.100.0's components. The same toolchain installed cleanly on every other Windows
job, and the same job passed on the branch's next run.
**Kept as it was, on purpose**: `package.json` at the repository root — its original reason (the
reusable's missing `working-directory`) is gone, but SonarQube Cloud, Qodana, the scripts and
Tauri's configuration all assume the root now. And `pr-mode` is off in `qodana.yml`, where the plan
had put it back on: a whole scan is two to three minutes a part, so analysing only a pull
request's files would save little and make a result depend on which files changed.
## 1.6.0 — *Add interpreter…* — **2026-11-21**
One slice: PRD P0-1's manual browse, the last command `NOT_YET` held, shipped as **Add
interpreter…** on Environments and `pipdock env add` / `env remove` in the CLI, over one new table.
With it the project moved to maintenance mode (the next section), and the org move above ships in
the same version. [#120](https://github.com/poli0981org/pipdock/pull/120).
**What shipped** (the changelog has it by reader):
| Piece | What |
|---|---|
| Core | `envs::validate_interpreter`, the one check a person's path passes: an existing file named like Python (`python3.14t.exe` included), leading to one, and not inside PipDock's own venvs — run and stored as given, made absolute. `envs::probe_listed` checks an added entry again before every listing probes it |
| Store | Schema v5, `manual_envs(env_hash, interpreter, added_at)` — apart from the CLI's `envs` recents, which has no source column. Adding again keeps an entry's place |
| Discovery | Added entries come after discovery's own and never shadow it. One whose file is gone is still listed, with `PD-ENV-001`, because that is the row a person needs in order to remove it |
| IPC | `env_add_manual`, `env_remove_manual`; `NOT_YET` is empty |
| GUI | *Add interpreter…* beside *Rescan*, as the empty state's one action and in `Ctrl+K`; *Remove from list* on added rows; a status line mounted before its words; focus to the heading when the focused row goes |
| CLI | `env add`, `env remove`; `env list` shows what was added; `--env`, `env use` and the stored default are validated |
| Maintenance | `triage.yml` over a tested `.github/scripts/triage.cjs`, the wording issue form, CONTRIBUTING's scope |
**What running found:**
- The first name rule refused the free-threaded `python3.14t.exe`, which the python.org installer
puts beside `python.exe` and the registry lists — found by running `env list` against the owner's
own Pythons, not by any test.
- `env remove <dir>` answered "not on the list" for a deleted venv — the one case it exists for —
because `interpreter_in` resolves only what is there. Found by its own test.
- Qodana for JS flagged a non-ASCII identifier in `triage.cjs`; renamed.
- Qodana for Rust failed one run in five on #120 — the last on a commit that changed only this
file — with "Unused crate: sha2", the crate `env_hash` is built on. Every run's sanity check finds
the Cargo project only partly loaded in its container, and the unused-crate inspection sometimes
draws its conclusion from that. A baseline entry would not have held, since its fingerprint
hashes neighbouring lines Dependabot rewrites, so the inspection is excluded in
`qodana-rust.yaml`, with the reason.
- The installed build — the release dry run's NSIS installer, a scratch `LOCALAPPDATA`, driven over
CDP: the legal gate once on a fresh profile; an interpreter added, rescanned, updated and rolled
back in a scratch venv named `myproj-env` outside the working directory; the entry kept across a
restart; the venv deleted and its `PD-ENV-001` row removed from the keyboard, focus to the
heading; `env list` and `env remove` agreeing with the screen. **Windows' own file picker was not
driven**: screen control was declined, and a release build's `__TAURI_INTERNALS__` cannot be
patched to stub it, so every add went through `envAddManual` with a path — the call the picker's
result makes.
- The review's fixes (below) were smoke-tested the same way on a second dry-run installer, against
a real `--symlinks` venv made from the registry's Python 3.14: added as itself, with its own
prefix and its own identity, listed beside its base, its own one package against the base's 64,
removed and not brought back by a scan; a deleted venv's broken row removed for good; and the
installed CLI's `env add`, `env list` and `env remove` agreeing.
**What an independent review found** once the suites and that smoke were green, reading the diff
cold and reproducing with a scratch `LOCALAPPDATA` and the debug CLI. Every fix has a test that was
seen to fail first:
| # | Severity | Found | Now |
|---|---|---|---|
| 1 | High | `validate_interpreter` returned the canonical path, and every caller ran and stored it. A `--symlinks` venv's `python.exe` is a link to its base, so `env use <venv>` stored `C:\Python315\python.exe` (reproduced) and `--env .venv update --all --yes` would have changed the system Python; the GUI merged the added venv into the registry row by `envHash` and selected that. The name check looked at the link while the target was stored, so a `python.exe` linking to `notepad.exe` stored `notepad.exe` | The path made absolute is run and stored, links left alone; canonicalizing only decides where a link leads and whether it is PipDock's own. The UI merges and removes by path. **Fixing it exposed the identity beneath**: `env_hash` followed the same link, so the venv, listed now beside its base, would have shared the base's pins, snapshots and cached graph, report and audit — a rollback of one offered the other's snapshots. `canonical_interpreter` resolves a venv's own interpreter (recognised by `pyvenv.cfg`) only up to its folder; no other path's identity changed, and a linked venv's earlier pins stay with the base they were filed under. Seen on this machine's real `--symlinks` venv |
| 2 | Medium | A Microsoft Store Python was refused: an app-execution alias reports `is_file()` and fails `canonicalize()` with os error 1920, so `--env` and `env use`, which worked in 1.5.0, would have exited 3 | Judged by its own path when it cannot be resolved, as `canonical_interpreter` always fell back |
| 3 | Medium | Not an enforcement point over IPC, while SECURITY §2 and `env_probe`'s doc said it was: `env_probe` checks only a path the webview calls `manual`, and every `PyEnv` command runs `env.interpreter` unchecked. Stored entries, and the CLI's default from 1.5.0, were probed unchecked too | Both sentences corrected. Added entries are checked again on every listing (`probe_listed`, both heads), the stored default when it is used. The IPC exposure predates 1.6.0: backlog X36-b |
| 4 | Low–Medium | *Remove from list* announced success while the entry stayed, for an entry on a share whose file was gone: the row's `envHash` was recomputed from the stored text, while the identity it was added under had been hashed from `UNC\server\share\…` | Removed by the path the row shows; the store matches either |
| 5 | Low–Medium | Re-adding a venv deleted and made again kept the broken row and selected it — a row with no `env`, which nothing loads packages for | The fresh row replaces it and is selected |
| 6 | Low | Removing during a scan: the scan had read the list first, so its result brought the row back while the status line said it was gone | Each waits for the other; *Remove from list* is busy while a scan runs |
| 7 | Low | `env remove .venv` never matched what `env add .venv` stored | The typed path is made absolute first |
| — | — | `env add --json` was documented as printing the entry "exactly as" `env list` would, untrue when discovery also finds it; a Triage failure on a pull request reached no channel | Wording; `notify.yml` reports Triage's `pull_request_target` runs |
Reviewed and found sound: `triage.yml`'s handling of a stranger's pull request (the base branch's
scripts only, no expression reaching a shell, writes that start no runs), who it can close, the
v4→v5 migration, the store guard, and the copy in both catalogues.
**Left, in the backlog with a reason each:** X36-b, the `PyEnv` commands' trust in the webview's
path, and the identity of an interpreter on a share.
## Maintenance mode — from 1.6.0
**PipDock is maintained rather than developed from 1.6.0 on** (owner decision, 2026-11-21, with the
move to the poli0981org organization). 1.6.0 closed the last P0 gap, *Browse…*; nothing else on
this page will be built unless it qualifies below. CONTRIBUTING.md, "Scope in maintenance mode",
is the public version of this section, and `.github/workflows/triage.yml` enforces its edge.
**What the work is now:**
| Kind | What qualifies |
|---|---|
| Dependencies | Dependabot's weekly proposals, past their cooldowns, one PR superseding the bot's (the 2026-11-04 shape) |
| Security | A dependency advisory of High or Critical, or a serious security problem in a runtime or toolchain the program is built with (Node, Rust, WebView2) — fixed promptly, and released when it reaches the shipped binary |
| Majors | Language, runtime and framework upgrades — Node, TypeScript, a Rust edition, Tauri — once stable. The held-back i18next 27 + react-i18next 18 pair is the next one, and wants a session of its own |
| Defects | Bugs, UI/UX problems and accessibility barriers. **The Audit backlog above is this list**: every row that is a defect is in scope, every row that is a feature (X19, the engine caches) is not |
| Wording | English or Vietnamese that is wrong, misleading, or not how people speak; `.github/ISSUE_TEMPLATE/wording.yml` |
**What is not planned, and why** — each one decided, not dropped:
| Item | Why not |
|---|---|
| P1-7, the scheduled check | Every prerequisite is absent (the survey above), and its persona is served by the CLI in Task Scheduler. One plugin and a permanent background process for one line of text |
| P0-9's first-run uv detection (backlog X19) | Settings already shows both engines and their versions and switches with one click; a first-run prompt is a new surface, not a fix |
| P1-4's engine caches (`pip cache`, `uv cache`) | A different feature wearing the same word (P1 wave, above) |
| P2 — macOS/Linux, per-env engine, elevation broker, conda, portable mode, a Japanese locale | Each is a feature, and most a test matrix |
| Generating THIRD-PARTY-NOTICES | The licence checks (`cargo deny`, `npm licences`) now hold the claim the inventory makes; the inventory itself stays hand-kept |
| Retaking `screenshot/` | The owner's hands, when something visible changes enough to mislead |
**How the edge is held.** A feature request — titled as one, a `feat:` pull request, or labelled
`enhancement` — is labelled `out-of-scope` and closed by `triage.yml` with a bilingual answer that
links CONTRIBUTING. Only unmistakable signals count, because closing a real bug report would be
worse than leaving a request open; maintainers, bots and anything labelled `policy-exception` are
never closed. `workflow_dispatch` on it is a dry run that classifies a title without touching
anything.
## Standing risks
| Risk | Mitigation |
+10 -8
View File
@@ -12,11 +12,11 @@ PipDock's job is to run package managers against local environments. The realist
- Package names are validated against the PEP 508 name grammar (`^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$` after normalization) and version specs against PEP 440 before entering argv; anything else is rejected client-side with PD-PKG-002.
- **The version half has been true only since 1.4.0.** Names always went through `PkgName`; 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. `pep440` is now the one place that says what a version and a specifier set may look like, and every way text arrives passes through it: install specs from either head, imported requirements, the IPC types that carry them, and the installed versions the guard set restates.
- **Requirements and constraints reach an engine as files** (`-r <file>`, `-c <file>`) since 1.4.0: restating the installed set one argv entry per package (SP-1) passed Windows' 32,767-character command line at about 1,300 packages. The files hold exactly the tokens argv held — rendered `PinnedSpec`s and validated `Spec`s — and, like `probe.py` and the pins handed to pip-audit, each is an `exec::TempFile`: a fresh random name created with `create_new`, so an existing file is never written through, and deleted on drop.
- Interpreter paths come only from discovery (registry/launcher/uv) or an explicit user file-pick; they are canonicalized and existence-checked (PD-ENV-001) before use.
- Interpreter paths come only from discovery (registry/launcher/uv/venv scan) or from a person — *Add interpreter…*, `pipdock env add`, `env use`, `--env`. **A path from a person goes through `envs::validate_interpreter` before anything runs it** (since 1.6.0; this line claimed it for two milestones while the only check was existence): it must be an existing file named `python.exe`, `python3.exe`, `python3.12.exe` or the free-threaded `python3.14t.exe`, so the probe — which executes the file — cannot be pointed at another program, and **where it leads** is checked too, so a `python.exe` that links to another program is refused; it must not be inside PipDock's own tools or audit venv, compared canonically so `..` or a link cannot walk past. It is **run and stored as given, made absolute, with its links left alone**: a venv made with `--symlinks` has a `python.exe` that links to its base interpreter, and only running the link finds the venv — the first 1.6.0 build stored the canonical path, so `--env .venv` acted on the base Python. A Microsoft Store app-execution alias, which Windows will not resolve (os error 1920), is judged by its own path. Each refusal is PD-ENV-001. The picker that suggests a path is not the check; `env_add_manual` is, an added entry is checked again on every listing (`envs::probe_listed`, in both heads), and the CLI checks the stored `env use` default when it uses it. **What this is not is an enforcement point against the webview**: `env_probe` checks only a path the webview *says* is manual, and every command taking a `PyEnv` runs `env.interpreter` as the webview hands it back from `env_scan` — the trust backlog X36 records, which predates 1.6.0. An independent review of 1.6.0 found this bullet saying otherwise, the second time it has said more than the code.
- `probe.py` is stdlib-only, written to a temp file with a random name, executed with `-I` (isolated mode: ignores `PYTHONPATH`, user site) so a poisoned env cannot inject code into the probe — and with `-X utf8`, because `-I` implies `-E`, which also discards invariant 7's `PYTHONUTF8`/`PYTHONIOENCODING`: until 1.4.0 a venv under a folder named in Vietnamese crashed the probe.
- **Owner decision 2026-07-27 (spike SP-6): `-I` stays, and the cost is disclosed rather than hidden.** Isolated mode also disables user site-packages, so on a *non-venv* system Python the probe sees fewer distributions than `pip list` does — measured at 352 vs 375 on the reference machine. Virtual environments, the primary target, have no user site and are unaffected. The probe therefore reports `hidden_user_site`: the user-site path when it exists, is off `sys.path`, and is non-empty; `null` otherwise. Only when it is non-null does the Installed screen show a note naming the path (`env.partialListing`), so the disclosure is accurate rather than a permanent disclaimer. Dropping to `-E` was rejected: a package in user site is part of the untrusted surface the isolation exists to exclude.
- Child processes run with inherited user privileges only; PipDock never elevates in v1 (PD-PRM-001 blocks instead — elevation broker is P2 with its own review).
- The Code Health **project folder** is a user file-pick that becomes the working directory of three subprocesses and, with `--fix`, the target of a write. It is canonicalized and existence-checked like an interpreter path, and a folder resolving inside `%LOCALAPPDATA%\PipDock\data\tools` is refused — rewriting the tools venv would break Health itself.
- The Code Health **project folder** is a user file-pick that becomes the working directory of three subprocesses and, with `--fix`, the target of a write. It is canonicalized and existence-checked, and a folder resolving inside `%LOCALAPPDATA%\PipDock\data\tools` is refused — rewriting the tools venv would break Health itself.
- `git` is the one PATH-resolved program PipDock runs with a **user-controlled** working directory (the dirty-tree check). Windows' legacy `CreateProcess` search order would make a `git.exe` planted in a cloned repository win; **verified by planting one** — Rust's `Command` does its own resolution and does not search the current directory. Re-check if the process layer changes. A repository can also name a program for `git status` to run — `core.fsmonitor` in its own `.git/config`, which a project folder downloaded rather than cloned brings with it — so asking "is it safe to write here" would have run it. The check has been `git -c core.fsmonitor=false --no-optional-locks status …` since 1.4.0; a command-line `-c` wins over every config file.
## 3. PEP 668 policy (protecting the system Python)
@@ -57,7 +57,7 @@ That is a deliberate removal, not an omission. A self-updater is a permanent rem
What replaces it: SHA-256 checksums published per release (`SHA256SUMS.txt`) for manual verification, which the README tells users to check because SmartScreen warns on first run — the binaries are not EV-code-signed. Installer artifacts are NSIS + MSI from the Tauri bundler. Since 1.4.0 the checksum file has LF line endings, written byte for byte: the CRLF one `Set-Content` produced made `sha256sum -c` on any other platform read the CR as part of each file name and report every file missing.
**From 1.4.0, the installers carry a build-provenance attestation.** The release workflow attests the `.exe` and the `.msi` (`actions/attest-build-provenance`), and `gh attestation verify <file> --repo poli0981/pipdock` proves an installer was built by this repository's release workflow at the tagged commit — which a checksum published beside the file cannot, since whoever could replace one could replace both. The attestation is signed through Sigstore with a short-lived certificate bound to the workflow run, so it adds no key to keep.
**From 1.4.0, the installers carry a build-provenance attestation.** The release workflow attests the `.exe` and the `.msi` (`actions/attest-build-provenance`), and `gh attestation verify <file> --repo poli0981org/pipdock` proves an installer was built by this repository's release workflow at the tagged commit (for 1.4.0 and 1.5.0, built before the repository moved to the poli0981org organization on 2026-11-21, the attestations stayed with the account that made them: `--owner poli0981 --signer-repo poli0981/pipdock`) — which a checksum published beside the file cannot, since whoever could replace one could replace both. The attestation is signed through Sigstore with a short-lived certificate bound to the workflow run, so it adds no key to keep.
**The token that can write a release never runs the build.** Building executes third-party code — every crate's build script, every npm package's install script — so the build job holds a read-only token and keeps no credentials in its checkout; a separate job downloads what it produced, attests it and drafts the release, and is the only one granted `contents`, `id-token` and `attestations` write (RELEASE-CI §3).
@@ -76,14 +76,16 @@ pip-audit runs **from a venv of its own** in freeze-file mode: `Engine::freeze`
## 7. Supply chain of PipDock itself
- CI: `cargo audit` (RustSec) + `npm audit --audit-level=high` gate every PR, and since 1.4.0 run again **every day against `main`** (`security-scan.yml`). A PR gate fires only when something changes, so an advisory published against a dependency already merged waited for the next PR to trip over it — which is how `main` went red on 2026-09-23 with no PR open to say so — and, because the failure notifier matched no workflow at all, with nobody told. Dependabot keeps the Rust, npm, Actions and Code Health pins and the Rust toolchain current (see RELEASE-CI.md §2).
- The `cargo audit` gate is on **vulnerabilities** and is never relaxed. `.cargo/audit.toml` ignores a fixed list of *informational* advisories — unmaintained/unsound — on transitive crates PipDock cannot influence, chiefly Tauri's archived GTK3 bindings, which a Windows-only build never compiles. They are listed individually with justification so a **new** advisory still fails CI. Adding macOS/Linux builds (P2-1) is the point at which that block must be re-examined rather than extended.
- The `cargo audit` gate is on **vulnerabilities** and is never relaxed. `.cargo/audit.toml` ignores a fixed list of *informational* advisories — unmaintained/unsound — on transitive crates PipDock cannot influence, chiefly Tauri's archived GTK3 bindings and, since 2026-10-20, zbus 5's `zvariant`/`zbus_names`/`zvariant_derive` (folded into zbus 6, which no Tauri plugin requires yet) — both stacks a Windows-only build never compiles — and, since 2026-11-21, chrono, which `Cargo.lock` lists only because serde_with's weak `chrono_0_4?` features make Cargo record it, and which no target compiles at all. They are listed individually with justification so a **new** advisory still fails CI. Adding macOS/Linux builds (P2-1) is the point at which that block must be re-examined rather than extended.
- **That "still fails CI" has been true only since 1.4.0.** Informational advisories — unmaintained, unsound, yanked — are cargo-audit *warnings*, and `rustsec/audit-check@v2`, which ran the gate until then, let warnings through; on a pull request it failed only on *critical*, which is how September's advisories passed every PR. The gate is now a prebuilt `cargo-audit` (installed by `taiki-e/install-action`, pinned by commit) run with `--deny warnings`.
- `npm audit` installs with `npm ci --ignore-scripts`: it reads the lockfile and builds nothing, so no package's install script has a reason to run.
- **`cargo deny`** checks licences, sources and bans on every PR (`deny.toml`, since 1.4.0). Its licence allowlist — each entry GPL-3.0-compatible — turns THIRD-PARTY-NOTICES' "all bundled licenses are GPL-3.0-compatible" from a sentence into a test for every crate the Windows target resolves, transitive ones included; widening the list is a licensing decision, not a CI fix. Only crates.io may supply a crate — no git dependency, no other registry — and wildcard version requirements are refused. Advisories stay `cargo audit`'s, so there is one ignore list rather than two to keep in step. The npm half of the build has no equivalent licence check.
- **`cargo deny`** checks licences, sources and bans on every PR (`deny.toml`, since 1.4.0). Its licence allowlist — each entry GPL-3.0-compatible — turns THIRD-PARTY-NOTICES' "all bundled licenses are GPL-3.0-compatible" from a sentence into a test for every crate the Windows target resolves, transitive ones included; widening the list is a licensing decision, not a CI fix. Only crates.io may supply a crate — no git dependency, no other registry — and wildcard version requirements are refused. Advisories stay `cargo audit`'s, so there is one ignore list rather than two to keep in step. **The npm half has the same check since 2026-11-21**: `scripts/check-licenses.mjs` (`npm licences` in `ci-node.yml`) evaluates the SPDX expression of every package `package-lock.json` does not mark `dev` against the same allowlist, entry for entry, and fails on a package that declares none. Both are required checks (RELEASE-CI §2). Qodana's licence audit would have been a third, but it needs a plan the project does not have, and a check this small should not depend on one.
- `Cargo.lock` and `package-lock.json` committed; builds are `--locked`.
- **The environments PipDock builds for itself install a pinned tree.** Since 1.4.0 `tools/tools-constraints.txt` pins every package beneath the four tools, for the Code Health and the Security-tab venvs alike, so a broken or compromised release of `requests`, `rich` or `msgpack` no longer reaches every user on their next sync (CODE-HEALTH-SPEC §2). The pins are versions, not hashes; `--require-hashes` is in ROADMAP's Audit backlog.
- **Workflows** pin third-party actions by commit — `taiki-e/install-action`, `softprops/action-gh-release`, and `actions/attest-build-provenance` too — while GitHub's own `actions/*` use major tags and the ops repo's reusables `@main`. A write permission sits on the job that needs it, not on the workflow (RELEASE-CI §1).
- CodeQL enabled via the ops-repo caller with the established permissions block, over **`javascript-typescript`, `rust` and `actions`**. This bullet said `javascript-typescript` only, because "CodeQL has no Rust analyzer" — which stopped being true in 2025, and the reusable hands any language straight to `codeql-action`. `actions` analyses the workflows themselves: write permissions at workflow level and unpinned third-party actions, the class of mistake SonarCloud had been finding by hand. Only the JavaScript/TypeScript analysis is a required check, so Rust's blocking static analysis is still clippy `-D warnings` plus `cargo audit` in `ci-rust.yml`.
- **Workflows** pin every action by commit, with the version in a comment for Dependabot — GitHub's own `actions/*` and `github/codeql-action` included since 2026-11-21, when the last tags went. **No workflow calls another repository's.** Until the move to the poli0981org organization four were callers into the owner's personal ops repo at `@main`, and its notifier checked out that repository's `main` and ran its script with PipDock's Discord webhooks in the environment; those workflows are local now and the script is vendored (RELEASE-CI §1). A write permission sits on the job that needs it, not on the workflow (RELEASE-CI §1). A secret sits on the *step* that needs it: `sonar.yml` builds and tests — every crate's build script, every npm package's — before it scans, so `SONAR_TOKEN` is in the scanner step's environment alone, and the version spliced into the scanner's argv is checked against a version's shape first.
- **SonarQube Cloud** analyses every PR and `main` from CI (`sonar.yml`, since 2026-10-25) rather than by automatic analysis, which never saw the Rust code and could import no coverage. Its quality gate is not a required check (RELEASE-CI §2); a red gate on `main` fails the workflow and reaches Discord.
- CodeQL runs from `codeql.yml` (a caller into the ops repo until 2026-11-21) over **`javascript-typescript`, `rust` and `actions`**. This bullet said `javascript-typescript` only, because "CodeQL has no Rust analyzer" — which stopped being true in 2025, and the ops repo's reusable handed any language straight to `codeql-action`. `actions` analyses the workflows themselves: write permissions at workflow level and unpinned third-party actions, the class of mistake SonarCloud had been finding by hand. Only the JavaScript/TypeScript analysis is a required check, so Rust's blocking static analysis is still clippy `-D warnings` plus `cargo audit` in `ci-rust.yml`.
- **Qodana** (`qodana.yml`, since 2026-11-21) runs JetBrains' inspections as two Qodana Cloud projects, one per half of the repository, each with its own token: RustRover's in a Linux container (`qodana-rust.yaml` — it cannot see `#[cfg(windows)]` code, which clippy, CodeQL and SonarQube Cloud cover on Windows) and WebStorm's natively (`qodana-js.yaml`). A run fails on a problem outside its committed baseline, and only those reach Code scanning. It is not a required check: one of its linters is an early-access build behind an external service, and Dependabot's PRs get no token.
- Third-party licenses tracked in `legal/THIRD-PARTY-NOTICES.md`, which names the **direct** dependencies the manifests declare and is reconciled against them by hand at each release. It is not generated: an earlier revision of both documents claimed `cargo about`/`license-checker` produced it into a `licenses/` directory, and no such config, directory or release step has ever existed. The complete resolved graph is `Cargo.lock` and `package-lock.json`, both committed. Generating the inventory is tracked as a Post-1.0 item; until it lands, the claim here matches what is done — and `cargo deny` checks the Rust licences without writing the inventory.
## 8. Data & privacy engineering
@@ -98,6 +100,6 @@ Logs contain package names and paths. There was no log until 1.4.0, while the Pr
## 9. Vulnerability reporting
Report privately through **GitHub Security Advisories** on `poli0981/pipdock`, or by email to `code@poli0981.dev`; target acknowledgment ≤ 7 days. Coordinated disclosure preferred; in-range CVEs in shipped dependencies trigger a patch release via the standard pipeline.
Report privately through **GitHub Security Advisories** on `poli0981org/pipdock`, or by email to `code@poli0981.dev`; target acknowledgment ≤ 7 days. Coordinated disclosure preferred; in-range CVEs in shipped dependencies trigger a patch release via the standard pipeline.
`.github/SECURITY.md` is the short pointer GitHub's *Security policy* tab renders, and it points here. This file is the policy; that one exists so the tab is not empty.
+10 -4
View File
@@ -52,17 +52,19 @@
**The packages are real PyPI packages, and only some are pinned** — `httpx==0.23.0`, `pip==22.1.2`, the shipped tool pins — while `requests` and `update --all` take whatever is newest that day. This paragraph described a pinned package list in `tests/integration/pins.toml` and a local `pypiserver` mirror for offline runs; neither has ever existed. L2 is network-bound, and only as deterministic as PyPI.
**The drift job** (*Re-capture against the latest engines*, Mondays and on dispatch) re-captures `pip/` and `uv/` with the newest pip and uv on Python 3.12.10 — an exact patch, because pip's report and uv's output both record it — uploads what it captured whether or not it passes (`captured-fixtures`: the fix for a real drift is to review and commit exactly those bytes), fails if any fixture but `capture-provenance.json` moved, and runs `cargo test` over the new captures. It failed seven Mondays running before 1.4.0, mostly for reasons that were not engines — idna's newest release and scipy's growing version list, now pinned and redacted in `capture.py` — and it was blind where it mattered: the capture venv never upgraded pip, so the job meant to see a pip change ran the CPython-bundled 25.0.1 throughout. The one real change, uv 0.13's new rendering, was answered by freezing the old captures as `uv-0.11/`.
**The drift job** (*Re-capture against the latest engines*, Mondays and on dispatch) re-captures `pip/` and `uv/` with the newest pip and uv on Python 3.12.10 — an exact patch, because pip's report and uv's output both record it — uploads what it captured whether or not it passes (`captured-fixtures`: the fix for a real drift is to review and commit exactly those bytes), fails if any fixture but `capture-provenance.json` moved, and runs `cargo test` over the new captures. It failed seven Mondays running before 1.4.0, mostly for reasons that were not engines — idna's newest release and scipy's growing version list, now pinned and redacted in `capture.py` — and it was blind where it mattered: the capture venv never upgraded pip, so the job meant to see a pip change ran the CPython-bundled 25.0.1 throughout. The one real change, uv 0.13's new rendering, was answered by freezing the old captures as `uv-0.11/`. The second, on 2026-11-04, was pip 26.3 rendering an unloadable build backend as its `error: backend-unavailable` diagnostic instead of a traceback, which the classifier read as PD-BLD-003 rather than PD-BLD-002. Only that scenario moved, so only it was frozen, as `pip-26.2/`; `plan_parsers.rs` reads such single-scenario corpora in its sweeps (`PARTIAL_CORPORA`) and not in the per-scenario tests, and `both_pip_renderings_classify_identically` fails if a frozen capture stops differing from the live one or stops classifying the same.
### L3 — Frontend (Vitest + Testing Library)
Component tests for `PdConflictRow` (3-way state), `PdPreviewDiff` grouping, `PdSummarySheet` counts, dimming/badging rules on `PdPackageTable`, and the design-token contrast test — every text/surface pair ≥ WCAG AA, and since 1.4.0 every badge tint composited over every surface too; it is a test, so it gates every PR. Store tests include `ui/src/stores/races.test.ts` (1.4.0): each holds a command open, moves on — another environment, another timeline entry, Back out of a plan — and only then lets it answer, because five stores wrote whatever came back without asking whether the question was still the one being asked. Six of its seven tests fail on the stores before 1.4.0. `i18n.test.ts` fails on a catalog code that either language has no copy for.
**Accessibility has three tests of its own since 1.5.0**, and it matters which one holds what. `ui/src/a11y.test.tsx` runs **axe-core** over every screen inside the shell and over the components with structure of their own; axe is called directly (`ui/src/test/axe.ts`) because `eslint-plugin-jsx-a11y` peers ESLint 9 at most and the matcher packages are pinned to a runner's major. It holds roles, names and required parts — its first run failed on the package grid — and nothing else: `color-contrast` is off under jsdom, which computes no layout, and stays the token test's job. `ui/src/destructive.test.ts` reads the source, because forced-colors cannot be rendered: every button drawn in the danger colour carries `data-destructive`, and the stylesheet draws that attribute. And where focus goes is asserted where it happens — `App.test.tsx` for the four ways a screen is replaced without a tab change, the component tests for the tab, radio group and drawer patterns. **None of the three knows what a screen reader says**; that is §4's.
IPC is mocked at the typed wrapper layer (`ui/src/test/ipc.ts`, a factory each test file passes to its own `vi.mock`) with payloads **serialized from the real Rust types** by `cargo run -p xtask -- ipc-fixtures` into `ui/src/test/fixtures/`, and `cargo test` fails when the committed files are stale — which is what guarantees UI and core agree on shapes. Where production computes a value, the fixture is computed by the same function: the guard report and the dependency graph by the real graph over the scenario's rows, the preview's blockers by `blockers_for`, and since 1.4.0 `flow_step_forced.json` by `plan::derive_forced` and `release::mismatch`. A hand-written blocker list that matched the docs while the code had drifted is how the preview shipped a garbled sentence from S3 to 1.1.0 with every suite green. `fixtures.rs` is compiled only under `cfg(test)` or the `fixtures` feature xtask enables, never into a release build. Types are generated by `cargo run -p xtask -- bindings` over `schemars`, not by tauri-specta as this line once said, so **drift is a test failure rather than a compile error** — which means it fires at `cargo test`, locally as well as in CI. See `crates/pipdock-core/src/bindings.rs`.
### L4 — CLI (assert_cmd + insta)
Goldens over the real binary. There is no mocked core — this line promised one, and the CLI has no seam to mock at (`golden.rs` says why) — so what is goldened is everything deterministic without an interpreter: every command's and subcommand's help, which is the flag contract scripts read; the JSON and human error envelope; and `pipdock schema <T>` for every type in `SCHEMA_TYPES`, plus the unknown-type list — **68 snapshots at 1.4.0**. The exit-code table is asserted for the rows reachable without an interpreter (0, 2 and 3); L2 asserts the ones it can reach. A golden diff is a behaviour change: re-bless deliberately, never reflexively.
Goldens over the real binary. There is no mocked core — this line promised one, and the CLI has no seam to mock at (`golden.rs` says why) — so what is goldened is everything deterministic without an interpreter: every command's and subcommand's help, which is the flag contract scripts read; the JSON and human error envelope; and `pipdock schema <T>` for every type in `SCHEMA_TYPES`, plus the unknown-type list — **70 snapshots at 1.6.0** (68 at 1.4.0; `env add` and `env remove` brought two). The exit-code table is asserted for the rows reachable without an interpreter (0, 2 and 3); L2 asserts the ones it can reach. A golden diff is a behaviour change: re-bless deliberately, never reflexively.
**Not covered by a committed test**, though this line claimed both: TTY versus non-TTY prompting, and `--json` payloads checked against `pipdock schema`'s output. CLI-SPEC §6's one-document `--json` rule was verified for 1.4.0 by driving the real binary through every path (ROADMAP), not by a test that stays.
@@ -72,7 +74,9 @@ The plan was one scripted tauri-driver run on a Windows runner — launch → le
## 3. Coverage & gates
**No coverage is measured.** This section set targets — core ≥ 85 % line coverage (`cargo llvm-cov`), classifiers and plan module ≥ 95 % — that nothing has ever measured: `cargo llvm-cov` is not wired anywhere, and coverage is in ROADMAP's Audit backlog. Until it is, the guarantee is §1's rule — a test that failed first — rather than a percentage.
**Coverage is measured since 2026-10-25, and gated only on new code.** `sonar.yml` runs `cargo llvm-cov --workspace` and `npm run test:coverage` (vitest's v8 provider) on Windows and hands both LCOV files to SonarQube Cloud, whose quality gate asks **80 % of new lines** covered — new meaning since the last analysis of the previous version. A bump moves that one analysis late, so the first analysis to send `1.4.0` still measured from 2026-09-27 and all of 1.4.0 counted; it took tests for that code to pass (ROADMAP, "After 1.4.0"), and reached **81.2 %** with the overall figure at 72.3 %. The first measurement, of `main` at 1.4.0: **Rust 71.6 %** of 15 364 lines, **TypeScript 68.4 %** of 1 569. The two large holes are honest rather than unmeasured: `pipdock-cli/src/run.rs` (4 %) is the CLI driving a real interpreter, which L2 exercises and L1 cannot, and `src-tauri/src/commands.rs` (0 %) is the IPC surface, reached only by a running app. `sonar-project.properties` excludes from coverage only what no test here can execute (tooling, spikes, `probe.py`, generated bindings, the two entry points) and says why for each.
This section once set targets — core ≥ 85 % line coverage, classifiers and plan module ≥ 95 % — that nothing measured until then. They are not the gate; the gate is new code, and §1's rule — a test that failed first — is still the guarantee a percentage cannot give. By file, `errors/catalog.rs` is at 99.5 % and `plan/` at 85–99 %.
**Required on every PR** (RELEASE-CI §2 has the exact payload): `fmt · clippy · test` — fmt, clippy `-D warnings`, and `cargo test --workspace`, which is L1, L4 and the Tauri crate's tests; `lint · typecheck · test · build / build` — ESLint, `tsc`, L3 and `vite build`; `cargo audit`; `npm audit`; and CodeQL's JavaScript/TypeScript analysis. `cargo deny`, `tauri lockstep` and CodeQL's Rust and Actions analyses run on every PR and are not required.
@@ -82,4 +86,6 @@ The plan was one scripted tauri-driver run on a Windows runner — launch → le
## 4. Manual test charter (per release)
A short exploratory pass on a real machine: dirty 150+ package env, corporate-proxy simulation (PD-NET-002 copy), non-ASCII Windows username paths, VI locale sweep of all mutation dialogs, cancel mid-Phase-B, and SmartScreen/first-run installer experience.
A short exploratory pass on a real machine: dirty 150+ package env, corporate-proxy simulation (PD-NET-002 copy), non-ASCII Windows username paths, VI locale sweep of all mutation dialogs, cancel mid-Phase-B, and SmartScreen/first-run installer experience.
**And an accessibility pass, since 1.5.0** — ten minutes, on the installed build: the mouse unplugged from the legal gate through an update and its summary (after every screen change, is focus somewhere you can see?); the same with Narrator, listening for the screen's name on arrival and for the run's progress; and one Windows contrast theme, looking at a destructive confirm beside its Cancel and at the current sidebar tab. `ACCESSIBILITY.md`'s "what has been tested" table is a record of this pass and is updated by whoever does it — a statement that outlives its last test is the failure it exists to prevent. The parts a machine can do were done for 1.5.0 over WebView2's remote-debugging port (ROADMAP): the accessibility tree, emulated forced-colors and `document.activeElement` after each real key press. That pass found defects in code whose tests were green — some because jsdom does not take focus from a control that becomes `disabled` and a browser does, one because jsdom applies no stylesheet and so could not show that the high-contrast border had never been drawn.
+59 -7
View File
@@ -88,14 +88,21 @@ record of what PipDock ran, which outlives the window. The **console drawer** sl
## 4. Screens
**Environments.** Auto-discovered list (source chip: registry / py launcher / uv / venv / manual) with Python version, package count and pip version; PEP 668 envs carry a red `MANAGED` chip and a line pointing at a virtual environment instead. Actions: *Use*, *Open* (the detail view below), *Rescan*, and *Upgrade pip* when pip is below the planner's floor (§5).
**Environments.** Auto-discovered list (source chip: registry / py launcher / uv / venv / manual) with Python version, package count and pip version; PEP 668 envs carry a red `MANAGED` chip and a line pointing at a virtual environment instead. Actions: *Use*, *Open* (the detail view below), *Rescan*, *Add interpreter…*, *Remove from list* on a row it added, and *Upgrade pip* when pip is below the planner's floor (§5).
**This line used to promise three things the screen does not have.** A managed environment is not
*disabled*: it can be selected and read, and a change to it is refused with PD-ENV-002 by the flow —
decided on a fresh probe since 1.4.0, not on whatever the row last cached — unless the Settings
override is on. *Browse…* is still owed: `env_add_manual` is the one command left in `NOT_YET`, so an
environment is found only by discovery — the registry, the `py` launcher, `uv python list`, and a
`.venv`, `venv`, `env` or `.env` in the working directory. And there is no star-as-default: the
override is on. *Browse…* shipped in 1.6.0 as **Add interpreter…**, beside *Rescan* and as the empty state's one
action (§7): a native picker filtered to `.exe`, then `env_add_manual`, which refuses anything not
named like a Python interpreter or inside PipDock's own venvs before it runs it, and selects the row
it adds. An added row carries the `manual` chip and **Remove from list** — kept even when its file
is gone, so the `PD-ENV-001` row can be removed — and the outcome is said in a `role="status"`
line mounted before its words. Both are busy while a scan runs, and a scan waits for either: a scan
that read the list before the change would undo it. An added row is matched to the list by its
path, never by `envHash`, which two names for one Python share — and a venv made with `--symlinks`
is listed beside the base Python it links to, with an identity of its own (ARCHITECTURE §6). Discovery is unchanged: the registry, the `py` launcher,
`uv python list`, and a `.venv`, `venv`, `env` or `.env` in the working directory. And there is no star-as-default: the
selection lasts for the session, and a rescan keeps it or falls back to the first usable row. The
CLI's `env use` stores a default, honoured since 1.4.0; the GUI does not read it.
@@ -408,11 +415,11 @@ either number. Screens (`ui/src/screens/`, `PdPlanPanel` among them) are not cou
- Empty states: one mono glyph + one sentence + one action (e.g. Updates empty: `▸ all packages up to date`).
- Offline: banner chip in top bar; search works (local index), metadata panel shows cached-at timestamp.
- Errors: inline with catalog code, human message (localized), and *Details* expanding stderr tail. Toasts only for background completions. *Report bug* opens a prefilled GitHub issue that nothing sends until the user submits it; since 1.4.0 the link is rebuilt at the click with the selected environment, so the issue carries its Python version and the configured engine's version — one subprocess per report, rather than one per error row mounted, which a summary of many failures would multiply.
- Destructive confirms (`Force latest`, uninstall with breakage, PEP 668 override, and — since P5 — `Fix with ruff`, the only one that writes outside an environment) use `--color-danger` primary buttons and require the dialog's default focus to be **Cancel**. The PEP 668 override was on this list while it was a bare checkbox with no confirm at all; it has been a `PdDialog` since 1.4.0. A `data-action` in `styles.css`'s forced-colors list gives a destructive control a 2 px border, because high contrast drops every tint and a destructive primary that looks like Cancel is worse than no colour at all. **The list is `force` (the guard's *Remove anyway*), `uninstall`, `rollback`, `upgrade-pip` and `fix`, and it is not complete:** the uninstall dialog's plain *Remove* (`remove`), the *Force latest* inline confirm's button, the override's *Allow* (`allow-override`), Disk usage's *Clear* confirm (`confirm-clear-cache`) and the plan panel's danger-treated Confirm (a rollback, or since 1.4.0 a forced plan) are not in it, so in high contrast each is told from the control beside it by its label alone. The active sidebar tab has the same problem by another route: it carries `aria-current="page"`, and the outline rule matches `'true'`. All of it is audit backlog U45, deferred to a High Contrast pass done by hand.
- Destructive confirms (`Force latest`, uninstall with breakage, PEP 668 override, and — since P5 — `Fix with ruff`, the only one that writes outside an environment) use `--color-danger` primary buttons and require the dialog's default focus to be **Cancel**. The PEP 668 override was on this list while it was a bare checkbox with no confirm at all; it has been a `PdDialog` since 1.4.0. **A destructive control carries `data-destructive`**, and under forced-colors `styles.css` gives every button with it a double border, because high contrast drops every tint and a destructive primary that looks like Cancel is worse than no colour at all. Until 1.5.0 the stylesheet kept its own list of five `data-action` values instead, and the list was never complete: the uninstall dialog's plain *Remove*, the *Force latest* inline confirm, the override's *Allow*, Disk usage's *Clear* confirm and the plan panel's danger-treated Confirm (a rollback, or a forced plan) were not on it, so in high contrast each was told from the control beside it by its label alone (audit backlog U45). A list of names beside a list of buttons is two lists; `ui/src/destructive.test.ts` reads the source instead and fails on a button drawn in the danger colour without the attribute. The same pass fixed the active sidebar tab, which carries `aria-current="page"` under an outline rule that matched `'true'` alone. *Stop* carries the attribute too: it interrupts a run part-way, and is drawn in the danger colour for that reason. **And the border was never drawn at all until 1.5.0**, for the old five as much as the missing five: the rule sat in `@layer base`, every button carries Tailwind's `border` utility, and a later layer wins whatever the selectors say, so `border: 2px` lost to `border-width: 1px`. It is outside every layer now — an unlayered rule beats every layered one, and `destructive.test.ts` counts the braces — and it is a 3 px *double* border, because 2 px beside 1 px is a difference nobody sees at a glance. Found by emulating forced-colors in the installed build and looking at the button; this paragraph described a border for two milestones on the strength of a rule nobody had seen take effect.
## 8. Keyboard & accessibility
Full keyboard traversal: `Ctrl+1..9` sidebar tabs (by physical key), **`Ctrl+K` opens the command palette**, `/` focuses the Search field, `Space` toggles row selection, `Ctrl+A` select-all-visible, `Enter` primary action, `Esc` closes drawers, and **`←`/`→` move within a focused row** (P6).
Full keyboard traversal: `Ctrl+1..9` sidebar tabs (by physical key), **`Ctrl+K` opens the command palette**, `/` focuses the Search field, `Space` toggles row selection, `Ctrl+A` select-all-visible, `Enter` primary action, `Esc` closes drawers, and **`←`/`→` move within a focused row** (P6). Since 1.5.0: `←`/`→`/`Home`/`End` move between Code Health's tabs, and the arrow keys move between a conflict's three choices. [`ACCESSIBILITY.md`](../ACCESSIBILITY.md) is the user-facing statement of this section, with what has and has not been tested; About links to it.
**Four rules from 1.4.0:**
@@ -441,8 +448,53 @@ A dialog — `PdDialog`, and the palette — returns focus to whatever opened it
to fall to `<body>`, and a keyboard user lost their place in a 200-row table. The package grid itself
is focusable but not a tab stop: the row is.
**Six rules from 1.5.0**, the accessibility pass:
- **Focus moves whenever the screen is replaced, not only when the tab changes.** The shell focused
the new screen's heading on a `nav` change and on nothing else — but the plan panel and each of
its phases, the dependency view and an opened environment all replace what `<main>` shows without
changing `nav`, and each unmounts the control that was just pressed. Focus fell to `<body>`. The
legal gate is a fifth: it is rendered *instead of* the shell, so accepting it replaces the screen
with `nav` unchanged, and the first screen of a first run had focus on nothing. A
second effect in `App.tsx` covers them, and **acts only when focus was actually lost**: a run
advancing from `resolving` to `preview` must not pull a keyboard user off *Back*, and an open
modal owns focus until it closes. The console drawer returns focus to its opener the same way,
and the legal gate — rendered instead of the shell — focuses its own heading.
- **An accessible name contains what is on screen** (WCAG 2.5.3). Health's tabs were named by an
`aria-label` reading "Dependencies, 3 findings" over a tab that says `deptry 3`. The name is the
content now: the tool, its count, then what the tab is about, visually hidden. A `PdDialog` is
named by its heading, followed by what it is about, and described by its body — it was named by
the package alone, so a reader heard "numpy, dialog" and never the question.
- **A composite widget is one tab stop.** Health's tabs follow the tabs pattern (one stop, arrows,
a `tabpanel`), and a conflict's three choices follow the radio group's — with one deliberate
difference: **the arrows move focus and choose nothing.** Checking whatever focus lands on would
open *Force latest*'s destructive confirm from an arrow key.
- **What a chip means is text, not a tooltip.** A `title` on a `<span>` that cannot take focus is
reachable by a pointer and by nothing else; a held pin read as a bare version number.
- **A status region exists before its first message.** Search's is mounted from the first render
and carries "preparing", "searching", the result count and "nothing matches". A live region
announces changes to itself, so one that arrives together with its text has nothing to differ
from. Several older regions still mount with their text; whether a reader says them is in the
Audit backlog, because only a reader can answer it.
- **Busy is `aria-disabled`; unavailable is `disabled`.** A browser takes focus away from a control
that becomes `disabled`, so a button that disables itself when pressed — *Use*, *Rescan*, *Run*,
*Run audit*, *Add*, *Download the index*, *Stop*, the two requirements buttons — dropped focus to
`<body>` on the keypress that started its work. Those carry `aria-disabled` while busy and
ignore a second press; `disabled` is kept for a control that cannot be used at all, which nobody
is focused on when it happens. jsdom does not move focus off a disabled control, so no test could
see this; it was found by pressing *Download the index* in the installed build.
**Zoom is not on.** `zoomHotkeysEnabled` (WebView2's own zoom control on Windows — no permission,
no code) was set for 1.5.0 and taken out again on a measurement: at 200 %, which in the default
1180 px window is a 590 px viewport, the package table's name column (`min-w-0 flex-1`) collapsed
to zero width and the sidebar, which does not scroll, cut off its last two tabs. At a maximised
1920 px window the same zoom is the layout's own 900 px floor and holds. Shipping it means giving
the name column a minimum and the sidebar an overflow — U51's container-query work — and until
then the Windows display scale, which enlarges the window with its content, is the supported way.
**The arrow keys are not decoration, and the gap they close was real.** Making the row the only tab stop is what keeps 200 rows from becoming 600 — but every control inside one is `tabIndex={-1}`, and that left *Pin* and *Remove* reachable by mouse only: a WCAG 2.1.1 failure, found by tabbing to a row in the running app and discovering there was nowhere further to go. `←`/`→` are the ARIA grid pattern's roving tabindex, `Esc` returns focus to the row, and no tab stops are added.
**`Enter` on a row is the *non-destructive* primary.** On a package row that is pin, never uninstall: a row has one reversible annotation and one irreversible removal, and a destructive operation one keypress from a focused row is an accident waiting rather than a primary action. Everywhere else in the app `Enter` needs no binding at all, because every other primary action is a real `<button>`.
**"Select-all-visible" means the current filtered set, not the rendered window.** Resolved in S2: the package table is virtualized, so only ~25 of a 200-package environment are in the DOM at any moment and "visible" would otherwise mean whatever the scroll position happens to be. `Ctrl+A` selects every *selectable* row in the set the screen is showing — so on Updates that is the outdated rows, and pinned rows are excluded there as they are from the *Select all* button. The row, not its checkbox, is the tab stop and the target of `Space`; tabbing through two controls per row is not traversal at 200 rows. Contrast: all text tokens meet WCAG AA on their surfaces, and since 1.4.0 so does every badge's text on its own tint over every surface (§2; both verified in the design-token test); focus ring 2 px accent, never removed. Screen-reader labels on all icon buttons; live region announces execution progress summaries ("13 of 15 complete"). Windows high-contrast mode: tokens fall back to system colors.
**"Select-all-visible" means the current filtered set, not the rendered window.** Resolved in S2: the package table is virtualized, so only ~25 of a 200-package environment are in the DOM at any moment and "visible" would otherwise mean whatever the scroll position happens to be. `Ctrl+A` selects every *selectable* row in the set the screen is showing — so on Updates that is the outdated rows, and pinned rows are excluded there as they are from the *Select all* button. The row, not its checkbox, is the tab stop and the target of `Space`; tabbing through two controls per row is not traversal at 200 rows. Contrast: all text tokens meet WCAG AA on their surfaces, and since 1.4.0 so does every badge's text on its own tint over every surface (§2; both verified in the design-token test); focus ring 2 px accent, never removed — and since 1.5.0 a package row's ring is drawn *inside* the row in every mode, because a ring 2 px outside a row that is absolutely positioned in a scroller and stacked against its neighbours was clipped on three sides. Screen-reader labels on all icon buttons; live region announces execution progress summaries ("13 of 15 complete"). Windows high-contrast mode: tokens fall back to system colors. **Structure is held by axe-core** over every screen (`ui/src/a11y.test.tsx`, TESTING L3) — which checks roles, names and required parts, and cannot check speech, forced-colors or focus order.
+14 -1
View File
@@ -54,6 +54,8 @@ export default tseslint.config(
// walks into them and the type-aware rules crash on files outside the tsconfig program.
ignores: [
'dist/**',
// `npm run test:coverage` output; an HTML reporter there ships its own scripts.
'coverage/**',
'target/**',
'src-tauri/target/**',
'src-tauri/gen/**',
@@ -114,9 +116,20 @@ export default tseslint.config(
// `scripts/**` is here because `recommendedTypeChecked` above is unscoped: without this,
// adding one `.mjs` build script makes `eslint .` fail outright rather than report a lint.
{
files: ['*.js', '*.ts', 'scripts/**/*.{js,mjs}'],
files: ['*.js', '*.ts', 'scripts/**/*.{js,mjs}', '.github/scripts/**/*.{js,cjs,mjs}'],
...tseslint.configs.disableTypeChecked,
// Node globals: these run under node, not in the webview.
languageOptions: { globals: { console: 'readonly', process: 'readonly' } },
},
// The triage helper beside the workflows is CommonJS: actions/github-script loads it with
// `require`, and its test does the same so it tests what the workflow runs.
{
files: ['.github/scripts/**/*.cjs'],
languageOptions: {
sourceType: 'commonjs',
globals: { require: 'readonly', module: 'writable' },
},
rules: { '@typescript-eslint/no-require-imports': 'off' },
},
)
+4 -4
View File
@@ -1,6 +1,6 @@
# PipDock — Privacy Policy
*Version 1.2 · Effective 2026-10-17 · Governing language: English.*
*Version 1.3 · Effective 2026-11-21 · Governing language: English.*
## 1. The short version
@@ -13,7 +13,7 @@ All application data lives under `%LOCALAPPDATA%\PipDock\data\` and never leaves
| Data | Purpose |
|---|---|
| Settings (engine, locale, thresholds, consent record) | app configuration |
| Environment list, package index cache, and the Python versions each release supports | discovery, instant search, and refusing a version your Python cannot run |
| Environment list — including the paths of interpreters you add with *Add interpreter…* or `pipdock env add`, kept until you remove them — package index cache, and the Python versions each release supports | discovery, instant search, and refusing a version your Python cannot run |
| Snapshots (package lists of your environments) | rollback |
| Pins | update exclusions |
| PipDock's own tool environments (`tools\`, `audit\`) | running deptry, vulture and ruff for Code Health, and pip-audit for the Security tab; reinstalled on demand, clearable in Settings |
@@ -45,10 +45,10 @@ Material changes to this policy bump the legal documents' version hash, and the
## 7. Contact
Privacy questions: email <contact@poli0981.dev>, or open a discussion or issue at <https://github.com/poli0981/pipdock>. The same contact details are listed in the application under **About**.
Privacy questions: email <contact@poli0981.dev>, or open a discussion or issue at <https://github.com/poli0981org/pipdock>. The same contact details are listed in the application under **About**.
---
## Tóm tắt Tiếng Việt (tham khảo)
PipDock **không thu thập bất kỳ dữ liệu nào**: không telemetry, không analytics, không tài khoản. Mọi dữ liệu (cài đặt, cache chỉ mục, snapshot, môi trường công cụ riêng của PipDock, log ghi lại các lệnh đã chạy) nằm trong `%LOCALAPPDATA%\PipDock\data\` trên máy bạn; xóa thư mục `data\` là xóa sạch — **đừng xóa thư mục cha**, vì chính chương trình được cài ở đó và xóa nó là gỡ luôn ứng dụng. Ứng dụng **chỉ** kết nối tới pypi.org (dữ liệu gói); PipDock không tự cập nhật nên không bao giờ gọi về GitHub. Một vài nút giao URL cho trình duyệt của bạn mở (github.com, docs.astral.sh, osv.dev, poli0981.dev) — đó là trình duyệt truy cập, sau khi bạn bấm. Nút báo lỗi chỉ mở form GitHub đã điền sẵn — không gì được gửi đi cho tới khi bạn tự xem lại và bấm gửi. Liên hệ: <contact@poli0981.dev>.
PipDock **không thu thập bất kỳ dữ liệu nào**: không telemetry, không analytics, không tài khoản. Mọi dữ liệu (cài đặt, cache chỉ mục, đường dẫn các trình thông dịch bạn tự thêm, snapshot, môi trường công cụ riêng của PipDock, log ghi lại các lệnh đã chạy) nằm trong `%LOCALAPPDATA%\PipDock\data\` trên máy bạn; xóa thư mục `data\` là xóa sạch — **đừng xóa thư mục cha**, vì chính chương trình được cài ở đó và xóa nó là gỡ luôn ứng dụng. Ứng dụng **chỉ** kết nối tới pypi.org (dữ liệu gói); PipDock không tự cập nhật nên không bao giờ gọi về GitHub. Một vài nút giao URL cho trình duyệt của bạn mở (github.com, docs.astral.sh, osv.dev, poli0981.dev) — đó là trình duyệt truy cập, sau khi bạn bấm. Nút báo lỗi chỉ mở form GitHub đã điền sẵn — không gì được gửi đi cho tới khi bạn tự xem lại và bấm gửi. Liên hệ: <contact@poli0981.dev>.
+833 -1060
View File
File diff suppressed because it is too large. Load diff
+26 -23
View File
@@ -1,18 +1,18 @@
{
"name": "pipdock",
"version": "1.4.0",
"version": "1.6.0",
"private": true,
"description": "A friendly dock for your Python environments \u2014 bulk inspect, install, update and clean up Python packages.",
"description": "A friendly dock for your Python environments — bulk inspect, install, update and clean up Python packages.",
"license": "GPL-3.0-only",
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/poli0981/pipdock.git"
"url": "git+https://github.com/poli0981org/pipdock.git"
},
"bugs": {
"url": "https://github.com/poli0981/pipdock/issues"
"url": "https://github.com/poli0981org/pipdock/issues"
},
"homepage": "https://github.com/poli0981/pipdock#readme",
"homepage": "https://github.com/poli0981org/pipdock#readme",
"scripts": {
"dev": "vite",
"build": "vite build",
@@ -22,39 +22,42 @@
"lint": "eslint .",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest",
"tauri": "tauri"
},
"dependencies": {
"@tanstack/react-virtual": "^3.14.21",
"@tauri-apps/api": "^2.12.4",
"@tanstack/react-virtual": "^3.14.26",
"@tauri-apps/api": "^2.12.5",
"@tauri-apps/plugin-clipboard-manager": "^2.5.0",
"@tauri-apps/plugin-dialog": "^2.8.3",
"@tauri-apps/plugin-opener": "^2.7.2",
"i18next": "^26.4.7",
"@tauri-apps/plugin-dialog": "^2.8.4",
"@tauri-apps/plugin-opener": "^2.7.3",
"i18next": "^26.7.2",
"react": "^19.3.1",
"react-dom": "^19.3.1",
"react-i18next": "^17.0.19",
"zustand": "^5.0.15"
"react-i18next": "^17.1.13",
"zustand": "^5.1.0"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@tailwindcss/vite": "^4.3.3",
"@tauri-apps/cli": "^2.12.3",
"@tailwindcss/vite": "^4.3.5",
"@tauri-apps/cli": "^2.12.5",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
"@types/node": "^26.6.5",
"@types/node": "^26.6.6",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react": "^6.1.2",
"eslint": "^10.12.0",
"@vitejs/plugin-react": "^6.3.0",
"@vitest/coverage-v8": "^5.1.1",
"axe-core": "^4.14.1",
"eslint": "^10.15.0",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.7",
"jsdom": "^30.1.3",
"tailwindcss": "^4.3.3",
"eslint-plugin-react-refresh": "^0.5.8",
"jsdom": "^31.0.1",
"tailwindcss": "^4.3.4",
"typescript": "^6.0.3",
"typescript-eslint": "^8.71.2",
"vite": "^8.3.4",
"vitest": "^5.0.5"
"typescript-eslint": "^8.73.0",
"vite": "^8.3.8",
"vitest": "^5.1.0"
}
}
+31
View File
@@ -0,0 +1,31 @@
# Qodana for the TypeScript/JavaScript half of the repository.
#
# The second of two Qodana Cloud projects (qodana-rust.yaml says why there are two), with its own
# token, QODANA_TOKEN_TS_JS. .github/workflows/qodana.yml passes `--linter qodana-js` and runs it
# natively on the runner, after `npm ci` with the Node version every other workflow uses, so the
# TypeScript service resolves the same node_modules the build does.
version: "1.0"
profile:
name: qodana.recommended
# The Rust workspace is qodana-rust.yaml's. generated.ts is `cargo run -p xtask -- bindings`
# output; fixing a finding in it by hand would be undone by the next regeneration.
exclude:
- name: All
paths:
- changelog
- coverage
- crates
- dist
- docs
- legal
- node_modules
- screenshot
- spikes
- src-tauri
- target
- tools
- ui/src/ipc/generated.ts
- xtask
+64
View File
@@ -0,0 +1,64 @@
# Qodana for the Rust half of the repository.
#
# One of two Qodana Cloud projects, each with its own token — QODANA_TOKEN_RUST for this file,
# QODANA_TOKEN_TS_JS for qodana-js.yaml — which is JetBrains' layout for a monorepo: every part is
# a project of its own, analysed by its own linter, and the two runs never report the same file.
# .github/workflows/qodana.yml runs both, and passes `--linter qodana-rust` there rather than here,
# so the linter's version is the action's and moves when Dependabot moves the action.
#
# **What this run cannot see.** The linter is RustRover in a Linux container (it has no native
# mode), so code behind `#[cfg(windows)]` — the PEP 514 registry, Job Objects, the `py` launcher —
# is inactive to it and is not analysed. Clippy, CodeQL and SonarQube Cloud run on Windows and
# cover it; this run adds RustRover's inspections over the code every platform compiles.
version: "1.0"
profile:
name: qodana.recommended
# **The container runs as the runner's user, not root**, so nothing can be installed into it — and
# that includes the toolchain rust-toolchain.toml pins: rustup writes under /usr/local/rustup,
# which root owns, so `cargo metadata` failed with "Permission denied", RustRover loaded no Cargo
# project, and the first run reported **0 problems after analysing nothing** (2026-11-21). The job's
# own checkout is writable, so the bootstrap points *that copy* at the toolchain the image ships;
# the repository's pin is untouched. (GTK and WebKitGTK cannot be installed either, so Tauri's
# Linux build scripts do not resolve; that touches macro expansion in src-tauri, not the analysis
# of the code around it.)
bootstrap: |
set -eu
shipped=$(rustup toolchain list | grep -m1 'default' | cut -d' ' -f1 || true)
if [ -z "$shipped" ]; then shipped=$(rustup toolchain list | head -n1 | cut -d' ' -f1); fi
printf '[toolchain]\nchannel = "%s"\n' "$shipped" > rust-toolchain.toml
echo "bootstrap: analysing with the image's $shipped instead of the pinned toolchain"
cargo metadata --format-version 1 --no-deps > /dev/null && echo "bootstrap: cargo metadata works"
# Everything that is not Rust belongs to qodana-js.yaml or to no linter at all. Fixtures are
# captured engine output and deliberately broken sample projects; snapshots are the CLI's goldens.
exclude:
- name: All
paths:
- .github
- changelog
- coverage
- crates/pipdock-cli/tests/snapshots
- crates/pipdock-core/tests/fixtures
- dist
- docs
- legal
- node_modules
- screenshot
- spikes
- src-tauri/gen
- src-tauri/icons
- target
- tools
- ui
# **Unused-crate reports are a coin toss in this container.** Every run's sanity check finds the
# Cargo project only partly loaded (the Tauri build scripts above) and paths in `model.rs` and
# others unresolved; on one run in five on #120 that became "Unused crate: sha2", a crate
# `model::sha256_hex` — and so every `env_hash` — is built on, on a commit that changed a Markdown
# file. A baseline entry would not hold: its fingerprint hashes the neighbouring lines, which
# Dependabot rewrites weekly. Nothing else here checks for unused crates, so this one goes rather
# than leave a check that fails at random; `cargo machete` is the backlog row that would replace
# it.
- name: CargoUnusedDependency
Loaded 100 of 170 files, more files were not shown because too many files have changed in this diff. Show more