main
306
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
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
|
||
|
|
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> |
||
|
|
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> |
||
|
|
87dcb3452f |
fix(spikes): scrub progress bars line by line, not with a backtracking regex
SonarCloud's PR analysis flagged the progress-bar regex in capture.py's redaction again (S8786, super-linear backtracking) — the second regex form of this rule it has flagged. A per-line test cannot backtrack at all. It replaces exactly the lines the regex did on the LF text `subprocess.run(text=True)` produces, checked against seventeen sample lines including the edge cases (no space after the dashes, trailing whitespace, several "eta"s, a final line without a newline); no committed fixture changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>v1.4.0 |
||
|
|
6cd7e99385 |
chore(release): 1.4.0
The version in all five places it lives — Cargo.toml, Cargo.lock, package.json, package-lock.json and tauri.conf.json — checked with `cargo metadata --locked` and with the release workflow's own tag check run locally against v1.4.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
7124227262 |
docs: the specs say what the code does; 1.4.0 recorded, with its audit backlog
Every spec checked against the code rather than against itself, in four passes that each read the branch's commits and then the source: - CLI-SPEC/CLI-GUIDE: one JSON document per command (with the per-command table and the paths that print nothing), environment selection, logging, Ctrl-C and exit 130, the prompts as they are rather than the [A]bort and countdown that never existed, `.heldBack`, a `pipdock audit` section, and the rules every mutating command now follows. - ARCHITECTURE/DATA-FLOW/ERROR-CATALOG: the Engine trait's real signatures, Requires-Python's three checkpoints, store v4 and the log folder, §7's return types and events, the state machine with re-probing and Force latest, where each §9 invariant is enforced, and 35 codes in 32 rows. - SECURITY/TESTING/RELEASE-CI/CODE-HEALTH-SPEC: the PEP 668 override as built, four browser hosts and the exact capability set, attested releases, the new CI, the tools constraints, and test tiers that describe what runs rather than what was planned. - UI-SPEC/PRD/README/I18N: the screens as they render, the keyboard, tokens and their contrast sweep, the feature matrix's status, attestation instructions, and I18N's one stated exception. ROADMAP gets the 1.4.0 record — what was wrong, what running found that reading did not, what was deliberately not done — and the **Audit backlog**: every finding not fixed, with where it is and why it waited. CLAUDE.md's counts and contradictions are corrected, with the rules this release left behind. changelog/1.x.md has the 1.4.0 entry, including "Changed for scripts" and "You will see this once". AI-DISCLOSURE, README and About say which model and who released what. The legal documents' effective date moves to the release date. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
42f227c1aa |
fix: what installing the build found, and what the doc pass turned up
The release build was installed and driven before tagging. Two defects showed up that no suite could see: - Every dialog opened in the window's top-left corner. Tailwind's preflight sets `margin: 0` on everything, which removes the `margin: auto` a modal <dialog> is centred by; PdDialog (and so the uninstall guard, since it was written) and the Ctrl+K palette were both affected. `m-auto` / `mx-auto`, measured in the dev server: (0,0) before, centred after. - On a profile that had never downloaded the index, Search said "preparing the package index" for ever and never offered the download. Moving the load into the background let a failed load restart on the next search, which reset the slot to Warming before the failure could be read, and the screen asked again every 150 ms. A failed load now stays failed until a refresh; a test in state.rs failed first against the old rule. From the documentation pass, each checked against the code: - The GUI's snapshot diff used the plain diff while the CLI's and the rollback used the engine-aware one, so the two heads disagreed about pip and setuptools across engines (G5). - `--json`'s help still promised NDJSON; `--yes`, `--quiet`, `--verbose`, `--log-file`, the install spec and `engine` described behaviour they did not have. Corrected, and the 32 help goldens re-blessed for exactly those lines. `pipdock engine` now marks the configured engine, as its help always said; `health --fix` printed a dirty-tree warning to stdout before its JSON; the text preview now lists withdrawn releases, as the GUI's does. - Copy that promised what the code does not do: a pinned package "can still be updated on its own" (an Exclude pin filters a named package too), a held pin left only "out of bulk updates", and an empty Environments screen pointing at a Browse… button that does not exist. - Stale comments in exec, the pip and uv parsers, index refresh, health, the pin screen, the status line, the settings store and i18n.ts (whose missing-key warning never fires). The ExecutionSummary.cancelled description is part of the public schema, so that golden and the TypeScript bindings move with it. - Metadata lookups reuse the shared HTTP client (M37 had been half done); insta was a dev dependency of core that nothing in core used; the integration workflow's checkouts no longer persist credentials; the capability file cites SECURITY §4, where the rule lives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
310436552c |
fix: a bug-report link GitHub will open; uninstall output that finishes printing
- report.rs: the excerpt was capped at 6000 characters *before* percent-encoding, which is what decides the length GitHub sees - an accented letter costs up to nine bytes, a path separator three - so a log full of Vietnamese paths built a ~20 KB link and GitHub answered with an error page instead of the form (M51). Lines are now dropped from the front until the encoded excerpt fits; a single enormous line is trimmed rather than dropped. Two tests, both failing first. - run.rs: `pipdock uninstall` dropped its output pump's handle instead of awaiting it, so the summary could print over the last engine lines - the ones that say how the removal ended (X38). The other three pumps already waited. - bug_report.yml: the version placeholder read "1.0.0", which every release since made wrong; it now says where to find the version instead (X48). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
25f0269631 |
fix(build): the legal hash ignores line endings; the privacy policy says what is stored
build.rs hashed each document's raw length two lines above the normalisation that existed so a CRLF checkout would hash like an LF one (X25). It did not: a build from a Windows checkout with autocrlf - the runner's default - carried a different hash from an LF build of the same commit. The algorithm moves to src/legal_hash.rs, which build.rs includes by #[path] and the library compiles under cfg(test), so the tests exercise the function that runs at build time: a CRLF pair hashes like its LF pair (this failed against the old code), a changed document or text moved between documents changes the hash, and the hand-rolled SHA-256 agrees with sha2 across block boundaries. legal/, as users read it (X26): - PRIVACY §2 names what is now stored: the log files exist (they record the commands PipDock ran, so they hold package names and paths), PipDock's own tools/ and audit/ environments, and the per-release Python ranges. §3 says what the one destination, PyPI, is asked for - including pip-audit's advisory data, which comes from PyPI's own service - and adds osv.dev to the pages handed to the browser. The Vietnamese summary follows. - THIRD-PARTY §A gains rfd (the startup-failure dialog), §C osv.dev: four browser destinations, not three. Both documents are hashed into the consent record, so the legal gate is shown once more after updating - the mechanism working, as CLAUDE.md says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
12bf723daa |
ci: failures reach someone, audits run on what is merged, releases are attested
- notify-ci-failure.yml lists its workflows by name. `workflows: ['*']` is not a wildcard to workflow_run: it matched nothing, so `main` was red from 2026-09-23 with no one told. - cargo audit runs a prebuilt cargo-audit (taiki-e/install-action, pinned by commit) with `--deny warnings`, replacing rustsec/audit-check@v2 - Node 20, a check-run write token, and on a pull request a failure only for "critical", which is how September's advisories passed every PR. .cargo/audit.toml's contract (a new informational advisory fails CI) is now what runs. - security-scan.yml: both audits daily against `main`, so an advisory against something already merged is reported the day it is published, not at the next PR. - cargo deny (licences, sources, bans) with deny.toml: the licence allowlist makes "every bundled licence is GPL-3.0-compatible" a test. The workspace declares `publish = false`, which it never had - and without which cargo-deny judged the app crates as published ones. - CodeQL analyses rust and actions as well as javascript-typescript. The comment saying CodeQL had no Rust support stopped being true in 2025. - ci-node.yml: Pages and id-token write move from the workflow to the one job that needs them (Sonar S8233); the audit installs with --ignore-scripts (S6505); a new `tauri lockstep` job fails when a Tauri crate and its npm package drift apart on Cargo.lock and package-lock.json. - release.yml: build (read-only token, no persisted credentials) and publish (attest + draft) are separate jobs; the tag must match all five version fields; SHA256SUMS.txt is LF, which `sha256sum -c` elsewhere needs; actions/attest-build-provenance attests the .exe and .msi; softprops/action-gh-release is pinned by commit; `workflow_dispatch` with `dry_run` builds any ref without attesting or drafting. - ci-integration.yml also runs for the CLI, exec, audit, release metadata, errors, store, index, Cargo.lock and rust-toolchain.toml - every one of which its end-to-end steps run through. - dependabot.yml: cooldowns, a group per ecosystem for Tauri packages and for actions and pip, TypeScript held below 6.1 (typescript-eslint's peer range), and the rust-toolchain ecosystem. A multi-ecosystem group would put both Tauri halves in one PR, but what it does to dependencies outside its patterns is undocumented; the lockstep job covers the gap instead. - Sonar: NOSONAR with reasons on the dev scripts' argv and PATH lookups; bundle-cli.mjs no longer claims to run from beforeBuildCommand. The dev CSP moves out of index.html into a Vite plugin that reads devCsp from tauri.conf.json, so a release build carries one policy, the strict one (S7039); checked in the dev server, where React Refresh's preamble still runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
7c6a506652 |
chore: remove what nothing uses, and finish what was half-wired
Dead code, each checked for callers first: - graph::ReverseDeps::leaves (only its own test called it), health::run::sink_for (no caller, and a doc describing something else), SnapshotProof::id and is_waived (no caller). - Two whitespace collapsers become one, errors::catalog::collapse_whitespace; the classifier's normalize is that plus lowercase. Three hand-folded SHA-256 hex digests become model::sha256_hex (build.rs keeps its own: a build script cannot use the crate it builds). - Six copies of asPdError become one, beside isPdError in ipc/errors.ts. - Thirteen strings no screen renders, from both catalogs (status.resolving/executing/ready, actions.confirm/browse/retry/openLogs, env.requiresPython/unusable, packages.updateSelectedSoon, health.notInstalled, settings.localeSystem/saved). - fixtures.rs is compiled only for tests and for xtask (feature `fixtures`), not into release. Half-wired, finished rather than deleted: engine_info had a typed wrapper and no caller, while ARCHITECTURE §7 promised a version beside each engine radio. Settings now shows it for the selected environment, and says "not found" for an engine that is not installed. Docs that described another project: core's "Phase 0" status, model.rs's specta, pip.rs's "lands in M1", snapshot.rs's "execute takes a Snapshot" (it takes a SnapshotProof), declared_source's doc stranded on validate_project, the pin validators' "character-class check" (they share pep440::is_version now), three health wrappers in ipc/index.ts each under another's doc, and three %LOCALAPPDATA% paths missing the data\ folder. Repo: production builds carry no source maps - Tauri embeds dist/ in the executable, so `sourcemap: true` shipped 2 MB of them to every user (X51). .gitignore covers insta's pending snapshots and a downloaded SHA256SUMS.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
4da4c0f3ec |
fix(ui): the shell - window, grants, CSP, language, keys, table, contrast
The window (U21). It may now be maximized and snapped; the 1600x1100 cap is gone, and the content column stops at max-w-content (87.5rem) instead, centred in what is left. The window is created hidden and src-tauri/src/window.rs fits it to the monitor's work area before showing it: 1180x760 is taller than the work area of a 1920x1080 panel at 150% and of a 1366x768 laptop, so the status line and the plan panel's Confirm opened under the taskbar. Never below 900x560; pinned to the corner rather than centred off-screen when even that does not fit. UI-SPEC §5 says so. The webview's grants (U1, U32). core:default granted some sixty core commands nothing called and not core:window:allow-close, so Decline on the legal gate did nothing in the installed app while its component test - which mocks close() - passed. default.json now holds exactly the five the frontend calls, and a test in lib.rs pins the union of every capability file, plus the opener's four hosts. CSP (U56): object-src, base-uri and form-action 'none'. A release build's style-src drops 'unsafe-inline' - React sets styles through CSSOM, which CSP does not govern. index.html keeps it for `npm run dev`, where Vite injects <style> elements; both policies are enforced, so the stricter decides. To be confirmed on the installed build. Language (U3): the choice is stored and applied at start. save() sent locale: null every time, so choosing Vietnamese lasted until the window closed. Settings now load before the legal gate, so the gate is in the chosen language too, and <html lang> follows the UI. Keys: a screen's data-autofocus wins over the heading (U12) - Search's field lost focus to the shell's effect, which runs after its children's - and `/` works from Search itself. Ctrl+1..9 by e.code (U49): on AZERTY Ctrl+3 reports `"`. A release build swallows F5, Ctrl+R, Ctrl+P, Ctrl+F, F3 and Alt+arrows (U20), which reloaded, printed and found in a single-page app. Also: Security scrolls (U2); the legal gate shows a consent that cannot be recorded (U29); Report bug asks for the link again with the environment, so the issue carries the Python and engine versions, at one subprocess per click rather than per row (U31); the package table's header and rows share one set of widths and one gutter, and narrow tables drop Size so names stay visible at 900px (U22, U23); the grid is focusable (Sonar S6852); --color-danger is #F26A63 and danger badges use a 15% tint, with tokens.test.ts now compositing every badge tint over every surface (U46 - 3.92:1 before); test seeds typecheck instead of `as never`, the IPC mock uses the real isPdError and has the audit cache entry (U10). U14 and U26 were already fixed by earlier commits in this release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
8e4b87e4ab |
feat(ui): the PEP 668 override asks first and is shown; the preview says what the report says
SECURITY §3 asks for two things the override never had: a confirmation before it turns on, and a persistent chip on every mutating screen while it applies. Turning it on now opens PdDialog with Cancel focused; turning it off saves at once. PdOverrideChip shows on Installed/Updates, Search's dock bay, the plan panel and an environment's detail - only where the override applies: the setting is on and the environment carries the EXTERNALLY-MANAGED marker. A venv never does, and a chip there would claim the flag is being sent. The preview renders the three fields ResolutionReport gained in this release, which nothing showed: - forced: "Will break (n)" in danger, each dependent named with the constraint the forced version violates; the Confirm button carries the count and the danger treatment (DISCLAIMER §2). - incompatible: left out for Requires-Python, with the range against this interpreter (invariant 10). A plan whose only content is one is no longer "nothing to change". - yanked: PD-PKG-003 as a warning row beside the change it belongs to. The summary says when the post-run check could not run (CheckReport.error) instead of showing nothing, which read as a pass (M30). The same defect survived on the empty-plan path of plan::execute, which kept its own unwrap_or(ok: true); it now goes through post_check like every other path, with a test that failed first. Also: settings load at app start once the documents are accepted, so the status line's engine and the chip are right before anyone opens Settings (U13); the plan panel names the interpreter it changes (part of U15); pins.suggestIntro no longer claims a pinned package can still be updated one at a time - an Exclude pin filters a named package too (DATA-FLOW §9.5). flow_step_forced.json is computed by derive_forced and release::mismatch over the scenario rows rather than written, for the reason fixtures.rs gives for its other computed fixtures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
73e65303ca |
fix(ui): an answer for what the user has left is dropped
Every store awaited a command and then wrote what came back, without asking whether the question was still the one being asked. A slow answer for the environment the user had just left landed on the one they switched to: - the package list and the outdated badges (U5), pin suggestions (U43) and the snapshot timeline check the environment after each await; - a pin write re-joins the rows from the store as it is after the write, not as it was before two awaits (U6); - two clicks down the timeline show the second entry's diff whichever answers first (U42); - the dependency view loads the environment switched to while the previous one was loading, rather than bailing on "already loading" and showing nothing (U34). The plan store counts generations. Leaving a plan the backend is still working on - Back during a resolve or a guard, or out of a parked preview - now stops it there with plan_cancel, and its late answer no longer re-opens the panel the user closed (U9). A failed decision round keeps the preview (U24, the UI half). The progress subscription stays open 50 ms past the command's reply, which arrives separately from its last events and in no promised order. The uninstall guard's probe has its own phase, so the table is not swapped for the plan panel for half a second and its scroll position kept (U14). - Back from a preview is not a finished run: the selection is kept and nothing is refetched (U11). - Search asks again while the index warms instead of waiting for another keystroke (U7); the backend now always answers the first search at once. - Install from the dock bay keeps the queue until the resolve answers (U30). ui/src/stores/races.test.ts holds a command open, moves on, then lets it answer: six of its seven tests fail on the previous stores. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
a9f476a2ae |
fix(app): a claimed slot releases itself; IO errors say what happened; quieter locks
- The session slot is claimed through a guard that releases it on drop unless it was parked (U4). Release was a call every exit path had to remember, and plan_resolve, uninstall_guard and the rollback preview each had a `?` between claim and release: one failed settings read left the slot Busy and every later plan answered PD-RES-003 until a restart. The slot is a std mutex now, held only to swap a value, so the drop can take it; a test returns early through a claim and finds the slot free and the token gone. - A guard refusal in uninstall_execute keeps the flow parked: the dialog is still on screen and Force remove is still a choice, and its buttons used to answer "no plan". - A file the user chose - an export, a saved report, a requirements file - fails with the code that fits: read-only is PD-PRM-003, in use is PD-PRM-002, a full disk is still PD-SYS-002. Every one of them was PD-SYS-002, "not enough free disk space" (U25). - cache_clear holds the slot of the feature that owns the target - Health for the tools venv, the Security tab for the audit venv, the plan slot for snapshots - so a clear is refused while that feature runs instead of deleting the venv in use, and a parked preview is put back (U36). The deletion runs off the async workers. - The name index loads in the background on its own connection (U35). The load held the store's lock for 140 ms - every command that wanted the store waited behind a keystroke - on a worker the app shares; the triggering search answers ready:false, as the command's doc always said. - Environment probes run four at a time instead of in series (U19, part). - The audit's cancellation token is registered before the freeze, so Stop during it is honoured (U37); a run stopped that early skips the venv sync and reports itself cancelled. - A cache test named its scratch folder after the clock alone, so two tests in one tick shared it and the fresh-install test read the other's files. It failed once in this run; a counter fixes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
040571c7f7 |
fix(cli)!: one JSON document per command, env use is honoured, Ctrl-C stops the run
Changed for scripts: every `--json` invocation now prints exactly one document on stdout
(CLI-SPEC §6), with prompts, previews-before-a-prompt and prose on stderr (X5). The preview and
then the summary used to be two documents, so `pipdock install x --json | ConvertFrom-Json`
failed on the second. The document is: the ResolutionReport when nothing runs (a dry run, an
empty plan, a declined prompt - exit 2), the ExecutionSummary when something does, the FlowStep
when there is nothing to plan, the GuardReport for a refused removal (with --force, only the
summary), and the entity itself for env use, pin add/remove, snapshot create, engine and
pip-upgrade ({before, after}). Prompts moved to stderr in both modes.
- `env use` is honoured (X3): --env, then the default it set, then a .venv here - as --env's help
always said. It was written and never read. A default whose interpreter is gone is said and
skipped. The help line says "the one `env use` set" now (32 help snapshots re-blessed for that
line alone).
- Ctrl-C (and Ctrl-Break, which a supervisor can send) trips the flow's token (X6): the engine's
process tree is killed, what ran is summarized with the snapshot to roll back to, and the exit
is 130; a second press quits at once. Verified against a resolve hung on a server that never
answers: exit 130 the instant the signal arrived, no python left running.
- `update` with neither names nor --all exits 2 instead of planning nothing (X16); `audit` uses
--engine (X14); `engine` needs no environment (X15); `doctor` judges the configured engine, not
pip, so a uv-only venv passes (no pip is the uv default); an impossibility skipped off a TTY says
what and why (X26); `list` probes once instead of twice (X28); names and versions honour
`{:<32}` (X27); `snapshot diff` compares the way a rollback would across engines.
Verified with a script driving the real binary through each of these: every stdout parses as one
JSON document and every exit matches CLI-SPEC §5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|
|
77ca18cc33 |
feat(app): the GUI logs, says when it cannot start, and shows where the log is
- The GUI writes data\logs\pipdock.<date>.log through the same core::logging the CLI uses, with
the panic hook installed, so a crash leaves a record where it used to leave nothing.
- A data folder that cannot be opened is said in a dialog before any window exists (U18). The
store was opened inside Tauri's setup hook, whose failure is a panic in the event loop: a
release build has no console, so the user double-clicked and nothing happened. It now opens
before Tauri starts, and the failure shows the code, the message and the log path through
rfd - already in the tree via tauri-plugin-dialog, so Cargo.lock gains one dependency edge and
no crate. It is the one place GUI copy is written in Rust (both languages at once), because no
webview exists yet to load a catalog.
- logs_tail returns LogTail { dir, lines } - a new schema, so schema-LogTail is blessed and
schema-unknown-type lists one more type. NOT_YET is down to one entry, env_add_manual.
- Settings gains a Logs row: the folder, as a path, and "Copy recent log", which re-reads the tail
at the moment of copying so the clipboard holds the run that just went wrong. The clipboard
permission "Copy full log" already had is enough; no capability changes. en + vi copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|
|
b7fa16a281 |
feat(logging): a log exists, and the CLI's logging flags do something
There was no log. tracing was a dependency of three crates and called zero times, --verbose and --log-file were parsed and ignored, LOG_RETENTION_DAYS had no reader, and the privacy policy described "log files (14-day rotation)" that did not exist. A bug report could attach the last run's engine output and nothing about what PipDock itself had done. core::logging owns what both heads share: one file per UTC day under data\logs (<prefix>.<date>.log, so the GUI and CLI never interleave), a sweep that keeps LOG_RETENTION_DAYS and never touches a file it did not name, tail() for reading it back, and a panic hook. What is logged: every spawn's argv, exit code and duration, every stop and its reason (exec); each resolve's outcome, each snapshot, each run's counts or refusal (flows); and the engine's own lines at DEBUG. The CLI always writes its file, at PIPDOCK_LOG or INFO; --verbose adds stderr at DEBUG; --log-file adds a copy; an internal error (exit 10) prints the log's path on stderr. Nothing goes to stdout - verified: `install --dry-run --json --log-file x` leaves one JSON document on stdout and nothing on stderr. The golden suite runs under a scratch LOCALAPPDATA now, and no golden changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
f4cf9e4959 |
build(tools): pin the tools venvs' whole dependency tree, not just the tools
tools-requirements.txt pins four tools and nothing beneath them, so every sync resolved their thirty-odd dependencies against whatever PyPI held that day: a Code Health report was reproducible for a build only as far as the top of the tree, and a broken or compromised release of requests, rich or msgpack reached every user on their next sync (H27). tools/tools-constraints.txt is that tree, compiled once with `uv pip compile --universal --python-version 3.10 --only-binary :all: --no-emit-package pip` (the command is in its header), embedded in the binary and passed to the bootstrap as `-c`. One file serves both venvs because a constraint does not install anything. pip is left out on purpose: it is the installer, and pip-audit's dependency on it would otherwise make pip replace itself half-way through installing pip-audit. A test refuses a ledger pin the constraints do not match, with the command to fix it, so a Dependabot bump cannot ship half-applied. The manifest hash still covers the tool pins alone, so no existing venv is forced to re-sync. Verified by syncing both venvs from nothing: every installed package is the constrained version. Hashes (`--require-hashes`) remain in the backlog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
535b4c8707 |
fix(health, audit, index, snapshot): what was previewed is what is fixed, and smaller holes
Code Health - ruff --fix ran `check . --fix` with none of the exclusions the previewed run used (C4). Real ruff 0.17.1, verified: it rewrote every .ipynb in the tree - the preview excludes notebooks - and, in a project whose pyproject sets its own `exclude` (which replaces ruff's defaults), the files under .venv as well. The fix argv is now the read-only argv plus --fix, by construction; re-run against both cases, neither file changes. - git status runs with -c core.fsmonitor=false (M40): a project folder that carries its own .git/config could name a program for `git status` to run, and asking "is it safe to write here" would have run it. - One tool whose output cannot be read is that tool's problem, not the run's (H24). A `?` at the last step returned from the whole run, taking the other tools' findings with it. - The fix's own failures speak Code Health's codes, and a timeout says files may already have been rewritten (M39). Project paths lose Windows' \?\ prefix, which every filename in the report carried (M47). Security tab - pip-audit is given pins, not the raw freeze (H21): one editable install failed the whole audit. Index - TLS failures read the error's source chain (M32): reqwest's top-level message never mentions the certificate, so PD-NET-002's guidance never showed. - Typed, borrowing parse instead of a Value tree of 700k objects; the ingest runs on a blocking thread; connect/read timeouts replace a single 120 s total a slow link could exceed while making progress (M36). An empty project list is refused rather than ingested over the index (L55). Snapshots - Ids are fixed width and the list orders by created_at (M43): the timestamp's trimmed fraction made `…09-42Z` sort after `…09-4235606Z`. A sidecar whose id is not a PipDock id is ignored rather than used to build a freeze-file path (L54). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
545e86bd31 |
fix(flow): rollback across engines keeps pip; Hold pins hold; a failed round keeps the preview
- A rollback never removes pip, and across engines leaves pip, setuptools and wheel out of the comparison (C7). uv's freeze has no --all, so a uv snapshot never lists them; compared with pip's freeze every one looked added since, and the restore uninstalled pip from the environment. Meta::engine was recorded for exactly this and read by nothing. Verified: a uv snapshot previewed for a pip rollback now reports the environment already matches. - Hold pins are restated at their version in every resolve (H17). hold_requirements existed and nothing called it, so a held package was only left out of the upgrade list and free to move as anyone's dependency. A hold never releases the packages it collides with - only a forced pin does - so its impossibility is shown as it stands. - PinMode::Exclude's doc promised one-at-a-time updates that filter_upgrades never allowed. The rule stays DATA-FLOW §9.5 and the doc now says so (schema-Pin re-blessed for the wording). - decide() is transactional and the GUI keeps the flow parked when it fails (U24): a failed re-resolve used to leave the new request beside the old report, and plan_decide dropped the flow, so the preview on screen had a Confirm that answered "no plan". - An install no longer runs `list --outdated`, a network sweep of every installed package that nothing in an install reads (M28). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
e2e75f63fb |
feat(flow): PipDock enforces Requires-Python itself, as hard invariant 10 says
Invariant 10 says PipDock enforces Requires-Python because the engines disagree, and nothing did (C2): PD-PKG-001 existed in the catalog and was never raised. pip refused an incompatible exact pin with the "No matching distribution" it gives a typo (PD-PKG-002); uv honours the lower bound, ignores the upper one, planned scipy==1.7.3 on Python 3.14 and failed at install time building it from source. The update flow now checks three places: - exact pins the user typed (name==v, name===v), before any engine sees them. A request that is nothing but such pins is PD-PKG-001 with the range and the interpreter; otherwise the pin is left out and the preview says so (report.incompatible). - forced pins: forcing a release this Python cannot run stays held back, with the reason. - what the engine planned. pip's report already says what each release requires, so nothing is asked; for uv's plan PyPI is, and each release that excludes this Python is ruled out by name (`name!=v`) and the engine asked again, at most twice - it, not PipDock, picks what is next. crate::release asks https://pypi.org/pypi/{name}/{version}/json for info.requires_python, at most eight at once with a 15 s watchdog each, and remembers every answer forever in a new store table (an uploaded release's metadata never changes). A failure is asked again; unknown never blocks. The PyPI client is shared per process now, rather than rebuilt for every request (M37, part). Store v4. Migrations ran on every open - a journal_mode write and eight CREATE TABLEs, on a store some paths open twice per lookup - and an older build set user_version back down, so the next newer build re-ran them (M38). Both fixed, with tests. Verified on Python 3.14: `install scipy==1.7.3` is PD-PKG-001 under pip and uv alike, and `install scipy==1.7.3 six==1.17.0` plans six and says why scipy was left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
6ff2a10631 |
fix(flow): Force latest forces, and says what it breaks before it runs
Choosing Force latest recorded the decision in the request and nothing read it, so the "forced" resolve was the held-back one again (C6). forced_requirements had existed since M2 with no production caller. The flow now turns Strategy::ForceLatest into the resolve's GuardAdjust: the forced package pinned to its latest, and the packages whose constraints held it back released from the guard set. Forcing still failed in the canonical case, because the guard set pins every installed package the plan does not move - the forced package's own dependencies included: httpcore 1.0.9 needs h11>=0.16 and the guard had h11==0.12.0. Which pins collide is resolution, and PipDock does not resolve (invariant 3), but the engine names them in its impossibility; forced_collisions releases exactly those, installed and still pinned, and asks again, at most three times. report.forced carries each forced package with its blockers - the "Will break" rows DISCLAIMER §2 requires before anything runs - and the CLI prints them. Verified on a venv seeded with httpx 0.23.0: under pip and uv both, httpcore -> 1.0.9 and h11 -> 0.16.0, breaking httpx, named. The underlying over-pinning (a selective upgrade cannot move its target's dependencies) is recorded in the audit backlog rather than changed here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
3cfb8f82ec |
fix(flow): PEP 668 is decided on a fresh probe, and the override works
The gate read env.externally_managed - whatever the caller last cached - before anything was probed, and the rollback flow had no gate at all (H12). The Settings override saved and nothing read it, so turning it on changed nothing (H11). Every mutating flow now starts with one preamble: probe, then decide on what the probe says. Without the override a managed environment is PD-ENV-002 before any engine command; with it, the flow carries SystemPackages::OverrideAllowed to every mutating engine call. SystemPackages is a named value, not a bool, for the reason SnapshotProof is a named waiver: hard invariant 5 says the flag is never passed implicitly, and this makes "implicitly" greppable. It reaches pip and uv installs and removals, and uv's dry run, which refuses a managed environment without it (verified, uv 0.13.1); pip's --dry-run --report is exempt and is never given it. pip implemented PEP 668 in 23.0 and added the flag in 23.0.1, so below 23.0 nothing is passed and pip 23.0 itself is PD-ENV-002. The CLI reads the override from the store both heads share - deliberately with no flag of its own - and says on stderr, every run, that it is in force. Verified against a uv-managed CPython 3.13 with an EXTERNALLY-MANAGED marker: refused without the override (exit 3); with it, pip installed and uv dry-ran and removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
5d63b31098 |
fix(flow): a stale or drifted preview is refused, before the snapshot
DATA-FLOW §9.3 refuses a preview older than ten minutes or one whose environment changed. Both checks existed in AcceptedPlan::verify and neither could fire (C1): the flow created the plan inside execute() with the current time, so its age was always zero; it passed the resolve-time listing as the "current" one, so the fingerprint always matched; and plan::execute compared the plan's env hash with itself. AcceptedPlan::accept now takes the basis the report was resolved over - the listing and the resolve time - and the flow re-probes in take_snapshot, after the user confirmed and before anything is written, so a refusal costs no snapshot. plan::execute verifies against the hash of the environment it is actually changing, and acts on the re-probed listing. The same rule reaches the other two flows (M44): an uninstall re-probes before its snapshot, since a package installed after the guard ran may depend on what is about to go, and a rollback compares the freeze it takes with the one its restore plan was diffed against. One plan id (M31): the snapshot said "update-<env>" for every plan ever made in an environment and the summary carried a different id. Both now carry the flow's, which is unique per plan. Five new flow tests fail on the previous code and pass on this one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
f9984fa4fb |
refactor(flow): FlowOptions and an Engine::probe seam
Every flow probed through a free function, so nothing `start` decides - the PEP 668 gate, the graph, the drift basis, what reaches the resolver - could be reached by a test without a real interpreter, and the bugs the next commits fix were all there. Engine::probe is a provided method (it is probe.py, not an engine command; no adapter overrides it), and tests/flows.rs drives whole flows against a scripted engine that owns a small, mutable world. FlowOptions carries what the caller decides before a flow starts: the cancellation token and a clock. The token is the caller's because the first resolve runs inside `start`, and a token made there could only be handed out after the resolve it was needed to stop. The GUI registered a token of its own for that window which nothing listened to, so Stop during a first resolve did nothing at all (H13); plan_resolve now hands its token to the flow, and a test proves a hung resolve ends on Stop rather than on its watchdog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
7e6ad52b4f |
fix(graph): platform markers are read, and the lexer is safe on any text
The marker evaluator knew python_version and python_full_version and treated every other variable as unknown, which keeps the requirement in force. The platform markers had been left out as "constants for a Windows-only v1" - but a constant still has to be read. Unread, ipython's `pexpect; sys_platform != "win32"` was in force on Windows, so the dependency view reported pexpect missing from every Windows environment with ipython in it, and the uninstall guard and pin suggestions counted edges that do not exist there (H25). ReverseDeps::for_probe evaluates against probe schema 3's marker environment: platform variables compare as strings with ==, != and PEP 508's `in` / `not in`, which the lexer now reads. Whatever the probe did not report - platform_release on Windows - still keeps the requirement. Every production graph (update and uninstall flows, deps_graph, pin suggestions) is built this way; build_for remains for callers that know only the Python version. The lexer skipped whitespace a byte at a time and sliced a word's length before checking the prefix, so a no-break or ideographic space in some installed package's Requires-Dist cut a character in half and panicked the command (H19). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
53dedf8625 |
fix(probe): one METADATA parse, a marker environment, and paths with spaces
probe.py read each distribution's METADATA three times - dist.metadata, then dist.version and dist.requires, which each re-parse it - on the path every environment open pays (M42). One parse now; an .egg-info still gets its requires.txt. On CPython 3.14 with 64 distributions the probe went from 154 ms to 118 ms (median of 15, twice), and the dists array is byte-identical. Probe schema 3 adds the PEP 508 marker environment, so the graph can tell a requirement in force from one gated to another platform (H25, consumed in the next commit). It is built from sys and os: platform.uname() is a WMI query on Windows (55 ms on 3.14) for two values almost no requirement mentions, which are left out there and stay unevaluated. Discovery: - py -0p and uv python list rows are "<key> [*] <path>", and the path may contain spaces (H26). Taking the last token turned C:\Program Files\Python312\python.exe - where every all-users python.org install goes - into a relative path the existence check dropped. - A 32-bit all-users Python registers under Wow6432Node, which a 64-bit process does not see through the default registry view (M48). HKLM is now read in both views. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
c0301fa3e8 |
fix(parse): uv is read by its exit status; check findings name the right package
uv's adapter handed every outcome to the plan parser, which looked for the words of a plan
(C3). A build that failed still printed "Resolved 1 package", so it previewed as "no changes";
a refused connection matched nothing and was reported as a uv newer than PipDock (PD-ENG-003);
an unknown name came through the resolver as an impossibility and was auto-skipped as a
conflict. uv_resolution and pip_resolution now decide by exit status first: zero is a plan, an
impossibility is a report, anything else is classified like every other engine failure. A new
corpus test asks that function - the one each resolve returns through - about every failed
capture; classifier_corpus.rs had proved each stderr classifies correctly while the adapter
never asked the classifier. Verified against real uv 0.13.1: PD-PKG-002 and PD-NET-001 (exit 6).
check_text read one of the three shapes real engines print (H18, and one found by breaking an
environment on purpose): pip's version conflicts say "has requirement" and were dropped - the
case a post-run check exists for - and every uv finding ("The package `httpx` requires ...")
was filed under a package called "the".
- A pip yank reason is the one line after the warning that names the package (H23). Flattening
the whole stderr ran it over pip's [notice] lines, which carry the user's home directory, and
gave the first of two yanked packages both reasons.
- pip's unreadable output is PD-ENG-999, not PD-ENG-003, whose advice is to switch to pip (M34).
- A pip below 22.2 stops at --dry-run, the first option it does not know, so that line is
PD-ENG-002 too.
- uv 0.11 (miette glyphs) and 0.13 ("cause:" labels) now explain one conflict in the same words.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|
|
8b18dc4795 |
feat(engine): a resolve can be stopped, and pip's impossibility is a report
Engine::resolve takes a ResolveCtx: the flow's cancellation token, which now reaches the dry-run command, and a GuardAdjust the flow will use for Force latest, Hold pins and Requires-Python exclusions (pins replace a name in the request and the guard set, releases leave the guard set, exclusions ride as `name!=v`). A stopped resolve is FlowStep::Nothing(Cancelled) - nothing planned, nothing ran - instead of an error (H13). pip's ResolutionImpossible was a hard error, so under pip one unsatisfiable package failed the whole preview while uv offered a per-package Skip. The pip adapter now returns report.impossible, built from pip's "Cannot install A and B" line (H15). The same request now exits 2 under both engines. Running it found a defect the requirement files introduced: pip names a requirement that came from a file as "-r <temp path> (line N)", so the impossibility lost the package the user asked for and every error row showed a temp path that had already been deleted. RequirementFiles::humanize puts the line back; uv names requirements by their text and needs none of it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
d2993bbd7d |
feat(wire)!: the preview carries what it was missing, and stops carrying the engine's output
A contract change, deliberately in one commit; four schema goldens re-blessed for it (`ResolutionReport`, `FlowStep`, `CheckReport`, `ExecutionSummary`). **`ResolutionReport.raw` leaves the wire.** It was pip's whole `--report` document — every package's README — cloned into each `FlowStep`, serialized over IPC on every round and printed by `--json` (33 KB for two packages, megabytes for "update all"). Nothing in the UI ever read it. It stays in Rust (`#[serde(skip)]`) for the log, and for pip it now holds stderr — pip's warnings — rather than the report the parser already consumed. **New fields, all omitted when empty, so existing JSON reads the same:** - `incompatible: [PythonMismatch]` — pins whose `Requires-Python` excludes this environment (PD-PKG-001), as structured data: the preview shows the required range against the environment's version, which a sentence assembled in Rust could not let it do (invariant 4). Filled by a later commit. - `forced: [HeldBack]` — what "Force latest" will break. Filled by a later commit. - `yanked: [YankWarning]` — **both adapters parsed yank warnings and then dropped them** (`.map(|p| p.report)`), so PD-PKG-003's preview warning has never been shown. `ParsedPlan::into_report` keeps them. **`CheckReport.error`.** A post-execution check that could not run was reported as `ok: true` — "verified" exactly when nothing was, for instance when the run had broken pip itself. It is now `ok: false` with the reason's code; the rows still carry the per-package truth. `CheckReport` therefore embeds `Code`, which makes it the sixth schema that does. **`NothingReason::Cancelled`**, for a resolve the user stopped (wired in a later commit); the CLI maps it to exit 130. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
80b2cee9e7 |
fix(engine): requirements and constraints reach the engine as files
**The command line no longer grows with the environment.** Every plan restates the whole
installed set as requirements (SP-1), and it did so as one argv entry per package — at about 1,300
packages that passes Windows' 32,767-character command line, the spawn fails with os error 206,
and the user was told to install an engine. Resolves and installs now pass `-r <file>` (and
`-c <file>`), written under fresh random names with `TempFile` and deleted on drop. The files hold
exactly the tokens argv held: rendered `PinnedSpec`s and validated `Spec`s. A test restates 2,000
long names and asserts the command line stays under 1,000 characters.
**Every install step holds the rest of the environment still.** SP-1's rule was applied to the
resolve only. Phase B then ran `pip install alpha==2` bare, free to move any dependency — pip warns
and exits 0 when it breaks an installed package's bound — so a failed batch could leave a state
the preview never showed. `Engine::install` now takes an `InstallSet { specs, constraints }`:
Phase A constrains everything the plan does not touch to its current version; a Phase B step adds
the rest of the plan at its planned versions; a rollback restore holds the rest of the restore at
the snapshot's.
Verified against real engines in a throwaway venv (pip 26.2.1 and uv 0.13.1): `-r`/`-c` dry
runs, the SP-1 held-back case and a real install all behave as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|
|
6559ebcc84 |
feat(model): PEP 440 at the boundary where text becomes argv
SECURITY §2 has always said names *and versions* are validated before argv. Names were; versions were plain strings, so a dock-bay entry of `2.0 ; python_version<'0'` reached argv as one token pip read as a requirement whose marker is false — a silent no-op install — and requirements import failed outright on any range, because `build_request` split on `==` alone (`django>=5.0,<6` became a "package name"; `pkg===1.0` became version `=1.0`). New `pep440` module, the one place that says what a version and a specifier set may look like: a hand-written reader of `packaging`'s `VERSION_PATTERN` (epochs, every pre/post/dev spelling, local labels — nothing legitimate is refused), a specifier-set grammar (`===`, `.*` prefixes, whitespace only between an operator and its version), and `is_argv_safe` for installed versions that are not PEP 440, which the guard set now restates with `===` (packaging dropped `LegacyVersion`, so `==` would be refused). Wired in at every way text arrives: - `Spec::parse` for CLI/GUI install specs and imported requirements; `Spec` and `PinnedSpec` now deserialize through the same checks, closing the IPC door the way `PkgName` already did. - The guard set skips an installed version that could be read as more than one token. - uv's `+ pkg==0.1.0 (from file:///…)` keeps only the version (it reached argv whole). - pip report changes and freeze lines with such versions are dropped / unrestorable. - `pins::validated_hold` and `health::validated_version` were the same charset check twice; both use `pep440::is_version` now, which also rejects `1.0--break-system-packages`, a string whose every character is in a version's alphabet. `version_req` is normalized to an operator form (`==0.28.1`), which `plan_argv_specs` already rendered identically. The one golden that moved is `schema-PlanRequest`, for its doc text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
3e4f3d0243 |
fix(plan): Phase A under Stop, a watchdog and an environment-wide failure
`plan::execute` ran the batch with `engine.install(...).await?`. The real adapters return `Err` when the batch is stopped or cannot start, so that `?` sent all of these out of `execute` as PD-INT-001 — no summary, no "cancelled", no rollback offer: - **Stop during Phase A**, which is most of any run: the cancelled-Phase-A branch right below was unreachable outside a test whose fake engine returned `Ok` on cancel. - **The watchdog** on a long sdist build: the whole run aborted, contradicting the skip-and-continue requirement it exists to keep. - **An engine that will not start**. Now an `Err` is an outcome: a user's cancel marks every row Skipped with `cancelled: true`; any other failure becomes the batch's code on every row. **Phase B only runs when it could help.** Isolating re-ran every package one at a time after *any* batch failure — offline, read-only site-packages, a full disk, a missing or too-old pip, a watchdog — each meeting the same wall after pip's own retry backoff. `isolates()` keeps those in Phase A, with the stderr tail on the first row only instead of N copies of one network trace. **Rows say what they moved from** (`StepResult.from`), taken from the plan's changes; the engines cannot know it, so every row carried `None` and the summary and `--json` called every upgrade a fresh install. A rollback no longer runs `pip check` between its removals and its restores — it nested `execute_uninstall`, post-check included; both now share the removal loop. Five new tests, each failing before this: a fake engine that returns `Err(Stop::Cancelled)`, `Err(Stop::TimedOut)` and a spawn failure the way the adapters do, an offline batch that must not be isolated, and `from` through both phases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
8ddb2317f4 |
refactor(exec): a stopped run says why in its type; the pump survives any bytes
**Typed stops.** A cancelled or watchdog-killed command now returns a `PdError` carrying `stop: Some(Stop::Cancelled | Stop::TimedOut(_))` (never on the wire). Three modules decided "was this a cancel or a timeout?" by matching the `"cancelled:"` / `"timed out"` prefixes `Command::stopped` happened to write — so pip's own "Read timed out" network error was relabelled a watchdog by Code Health's remap. They ask `is_cancelled()` / `is_timeout()` now. A timeout carries PD-ENG-004 at this layer; Code Health and the audit still remap it to their own codes. **The pump reads bytes.** tokio's `lines()` errors at the first byte that is not UTF-8, and the loop treated that as end of stream: it stopped reading and dropped the pipe, so the child died on a broken pipe mid-install and the stderr the classifier needed was cut short. MSVC prints in the OEM code page, so a non-English Windows was one failed source build away. Lines are now read with `read_until` and decoded lossily; a test writes raw cp-1252/cp-932 bytes through `cmd /C type` and asserts the line after them arrives. **Watchdogs per kind of work** (`exec::watchdog`): install 30 min, resolve and `--outdated` 10 min, local queries 3 min, `probe.py` 60 s, `py -0p` / `uv python list` 30 s. One 600 s budget let a hung `py -0p` hold the Environments screen for ten minutes and killed a slow scipy build. **Spawn failures map by cause**: a missing interpreter is PD-ENV-001 (it was PD-ENG-001, "install the engine"), a command line past 32,767 characters is PD-SYS-001. **`TempFile`** replaces `write_temp`: `create_new` with retry, deleted on drop. The old function documented that an overwritten temp file would be harmful and then called `fs::write`, and its comment described a nonce scheme the code did not use. `io_error` maps filesystem failures to the code whose advice fits (disk full, path too long, permission) instead of always "disk full". **`Command::python_tool`** gives vulture, deptry and pip-audit the UTF-8 environment `Command::python` gives interpreters; they are Python launchers and were spawned without it. **`probe.py` runs with `-X utf8`.** `-I` implies `-E`, which ignores PYTHONUTF8 and PYTHONIOENCODING, so the probe wrote through the ANSI code page: a venv under a folder named with Vietnamese diacritics crashed it with UnicodeEncodeError (PD-ENV-003, reproduced) and a Latin-1 path came back as mojibake. `-X` is a command-line option, which isolated mode honours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
9409a82e84 |
test(fixtures): pip 26.2.1 and uv 0.13.1 captures, both uv renderings under test
Re-captured by the drift job itself (workflow_dispatch on this branch, Python 3.12.10, artifact `captured-fixtures`) rather than on a dev machine, so next Monday's run compares like with like. Copied byte for byte; CRLF counts unchanged where the engine's output did not change. What actually moved: - **uv 0.13.1** renders every failure as `error: …` / `cause: …` instead of miette's `× …`, `╰─▶` and "Caused by:". The phrases the classifiers key on survived, so nothing reclassified — `both_uv_renderings_classify_identically` now pins that, against the frozen `uv-0.11/` corpus. The build failure also moved from `build_wheel` to `get_requires_for_build_wheel` and gained a `hint:` line. - **pip 26.2.1** (it was 25.0.1 all along — the capture never upgraded it) prints no release notice, and for an unsatisfiable `scipy==1.7.3` now says *which* versions it ignored and why: "Ignored the following versions that require a different python version: … 1.7.3 Requires-Python >=3.7,<3.11". pip 25 said only "No matching distribution found", which is why ERROR-CATALOG calls PD-PKG-001 unclassifiable from stderr. On pip ≥ 26 it no longer is. - `clean-upgrade` now upgrades to the pinned idna 3.10 in both live corpora. `plan_parsers.rs` and `classifier_corpus.rs` run over `pip/`, `uv/` and `uv-0.11/`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2b4681954b |
feat(errors): PD-ENG-004 for an engine watchdog; WinError rules match exactly
**PD-ENG-004 `EngTimedOut`.** Every engine command shares one watchdog, and when it fired the run reported PD-INT-001 — "PipDock hit an internal error" — for an sdist build that was simply still compiling, and in the batch phase that error aborted the whole run with no summary and no per-package retry. A timeout is a fact about the engine, not a PipDock bug, so it gets its own code. Raised by PipDock, never classified from stderr, so it joins the `internally_raised` table of the corpus gate. The exec layer starts producing it in the next commit. The nine places: the catalog variant (`as_str`, `area`, `ALL`), both count tests (34 → 35), the corpus gate, both `errors.json` catalogues, `codes.json` and `generated.ts` (regenerated, not edited), the ERROR-CATALOG row (31 → 32 rows), and the five schema goldens that embed `Code` — `Code`, `StepResult`, `ExecutionSummary`, `HealthReport`, `AuditReport` — each re-blessed for exactly one new `const`, which is the contract change this is. **WinError needles include the closing bracket.** Python prints `[WinError N]`, and the bare "winerror 5" also matched 50, 53 and 59: `[WinError 53] The network path was not found` came out as PD-PRM-001, "use a venv". `[WinError 53]` and `[WinError 10013]` (a firewall refusing the socket, raised *as* a PermissionError) now classify as network failures, ahead of the permission rules that would otherwise take them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2b07d4057b |
test(fixtures): the drift gate measures engines, not PyPI
The weekly re-capture has failed seven Mondays running (since 2026-08-31), and for most of them no engine had changed at all: - `clean-upgrade` asked for the *latest* idna, so 3.18 → 3.20 was "drift". Pinned to idna==3.10. - pip's "(from versions: …)" listed every scipy release, so the requires-python fixture grew with each one. Redacted, like the release notice before it; no classifier reads it. - The capture never upgraded pip: every venv ran the CPython-bundled 25.0.1 while 26.2.1 was current, so the job meant to catch a pip output change could not see one. `venv.create(..., upgrade_deps=True)`, and the report's `pip_version` is redacted because it now moves with each pip release (provenance still records it). - `python-version: '3.12'` floated with the runner image, and the Python patch is recorded in both engines' output. Pinned to 3.12.10, the version every committed fixture was captured with. The job now uploads what it captured whether or not the gate passes, so a real drift is fixed by reviewing and committing exactly those bytes. `capture.py` also refuses an unknown `--only` name (it used to capture nothing and exit 0) and exits 1 when nothing was captured; its two backtracking-prone patterns (SonarCloud S8786) became a `[ \t]` class and a `partition`. The other half of the red was real: uv 0.13.0 (2026-10-09) replaced its miette rendering — `×`, `╰─▶`, "Caused by:" — with "error:" / "cause:". `UV_MIN_VERSION` is 0.10, so both renderings stay under test: the current captures are frozen as `uv-0.11/` (uv 0.11.32, byte-identical copy) before `uv/` is re-captured against the newest uv. The disposable-venv suite also stops running twice on Monday mornings (the drift cron matched it too). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
91a846c0fd |
build(deps): every dependency to its latest release
Supersedes Dependabot #75, #76 and #77, which could not merge while `main`'s audits were red. Rust (floors raised to what is locked, so the manifests say what is built): - tauri 2.11.5 → 2.12.4 and tauri-build 2.7.3, with the plugins dialog 2.8.3, opener 2.7.2, clipboard-manager 2.5.0 and single-instance 2.5.4 — in lockstep with `@tauri-apps/*` 2.12, which Tauri's own version check requires. - **rusqlite 0.37 → 0.40.2** (libsqlite3-sys 0.38.2, SQLite 3.53.2). ARCHITECTURE §10 held it because libsqlite3-sys used the then-unstable `cfg_select!`; that is stable since 1.95 and the toolchain is now 1.99.1. Nothing here used `u64`/`usize` `ToSql` (disabled by default since 0.38) or `prepare_cached` (optional since 0.38), and 0.40.1 fixes a SAVEPOINT-name injection. - reqwest 0.13.5, tokio 1.53.3, tokio-util 0.7.20, jiff 0.2.38, clap 4.6.7, schemars 1.2.3, sha2 0.11.1, thiserror 2.0.21, serde_json 1.0.154, async-trait 0.1.92, insta 1.49.0, and 211 transitive updates (h2 0.4.20 among them). npm: React 19.3.1, Vite 8.3.4, @vitejs/plugin-react 6.1.2, **Vitest 5.0.5** (all 18 `vi.mock` calls were already top-level), ESLint 10.12.0, typescript-eslint 8.71.2, jsdom 30.1.3, @tanstack/react-virtual 3.14.21, i18next 26.4.7, react-i18next 17.0.19, @types/* current. **TypeScript stays 6.0.3**: typescript-eslint 8.71.2 still peers `>=4.8.4 <6.1.0`. Code Health pin: ruff 0.16.3 → 0.17.1. Verified by running it, not by reading its changelog: `health/sample/capture.py` reproduces all four committed `ruff/*.json` byte for byte, and exit codes 0/1/2 still mean clean/findings/error. Two things the upgrade surfaced in the frontend, both real: - virtual-core 3.19 measures the scroll element with `clientWidth`/`clientHeight` (it used `getBoundingClientRect()`), and that first reading replaces `initialRect`. jsdom reports 0, so 13 table tests and 5 App-level ones went back to rendering an empty grid; the setup now stubs the two properties beside the `offset*` ones. - jsdom 30.1 implements "a closed `<dialog>`'s contents cannot take focus", which is the spec. React applies `autoFocus` by calling `focus()` during commit — *before* PdDialog's effect calls `showModal()` — and never writes the `autofocus` attribute, so neither path focused Cancel. It worked in WebView2 only because Cancel is the first focusable element. PdDialog and the palette now focus explicitly after `showModal()`, and return focus to whatever opened them on close (it fell to `<body>` before). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
d9c62ec6c9 |
fix(deps): rustls 0.23.46, quinn-proto 0.11.19, and the npm highs — main is green again
`main` has failed `cargo audit` since 2026-09-23 and every PR with it, because both audit checks are required: - rustls 0.23.42 → 0.23.46 (RUSTSEC-2026-0285, TLS 1.3 handshake messages accepted across key changes). `cargo update -p rustls` alone stops at 0.23.43: the fix needs aws-lc-rs 1.18 and rustls-webpki 0.103.15, which a conservative update will not move, so it is pinned with `--precise`. - quinn-proto 0.11.16 → 0.11.19 (RUSTSEC-2026-0338..0342). Lockfile-only — nothing compiles quinn — but `cargo audit` scans the whole lockfile. - chacha20 0.10.1 → 0.10.2 (the old one is yanked). - npm: undici 8.9.0 → 8.12.2 (via jsdom), source-map-js 1.2.1 → 1.2.2, brace-expansion → 5.0.12, all dev-only. `npm audit fix` without `--force`; `npm audit --audit-level=high` reports 0. Dependabot could not have done this: there are no Dependabot alerts for rustls, and its grouped PRs only move direct dependencies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
1af0ec127b |
build(toolchain): Rust 1.99.1
Five stable releases behind (1.94.1, 2026-03-25). Two reasons to move now rather than on the next Dependabot nudge: - The rustls fix for RUSTSEC-2026-0285 (>= 0.23.45) does not resolve under `rust-version = "1.94"`: resolver 3 is MSRV-aware and stops at 0.23.43, so `main`'s red `cargo audit` cannot be fixed on the old pin at all. - `cfg_select!` is stable since 1.95, which is the condition ARCHITECTURE §10 set for lifting the rusqlite 0.37 hold. `rust-version` moves with the pin, so the workspace never claims a floor it is not built with. Clippy 1.99 adds `chunks_exact_to_as_chunks`; the build script's SHA-256 now uses `as_chunks`, which also removes two `try_into().unwrap_or` fallbacks that could never fire. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2300b637a9 |
build(deps): Bump @vitest/mocker and vitest
Bumps [@vitest/mocker](https://github.com/vitest-dev/vitest/tree/HEAD/packages/mocker) to 4.1.11 and updates ancestor dependency [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest). These dependencies need to be updated together. Updates `@vitest/mocker` from 4.1.10 to 4.1.11 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.11/packages/mocker) Updates `vitest` from 4.1.10 to 4.1.11 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.11/packages/vitest) --- updated-dependencies: - dependency-name: "@vitest/mocker" dependency-version: 4.1.11 dependency-type: indirect - dependency-name: vitest dependency-version: 4.1.11 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> |
||
|
|
f770e9c85f |
fix(deps): h2 0.4.16 — RUSTSEC-2026-0258
Unrelated to this slice, and blocking its required `cargo audit` gate. `main` is equally affected: the advisory was published 2026-08-17 and reached the RustSec database at 10:23+02:00 on the 18th, while main's last audit ran at 07:08 that morning and passed. The next push to main would have failed on it regardless of this branch. Low severity, denial-of-service: h2 accepted and queued empty DATA frames without limit, so an undrained stream could grow memory without bound or panic on length overflow. Reached transitively through reqwest and hyper; PipDock's only network use is the package index and metadata fetches, both to pypi.org, so nothing here is exposed to an attacker-chosen peer. Fixed rather than ignored anyway, because SECURITY.md is explicit that the vulnerability gate is never relaxed — the `.cargo/audit.toml` ignore list is for *informational* advisories on crates we cannot influence, and this one has a patch release. `cargo update -p h2 --precise 0.4.16` and nothing else. The lockfile diff looks alarming and is not: sixteen of its eighteen lines are dependency *edges* re-pointing between `windows-sys` copies that already coexist in the lock — five of them before this change and five after. No package is added, removed or downgraded, and the only version that moves is h2's own. `cargo check --workspace --all-targets` and the full test suite pass on it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>v1.3.0 |
||
|
|
02cc17d95d |
docs: the dependency view recorded, and 1.3.0
UI-SPEC §4 gains the screen and **loses the sentence it contradicted**. It said the third row action folds all three into a `⋮` menu "with the budget intact"; that makes uninstall four clicks where §5's table records three, hand-counted. The correction is written as a correction rather than an overwrite, because the reason it slipped through is the useful part: four is under the ceiling of five, and a ceiling is not a ratchet — a table of measured counts is. §5 gains the row, §6 the component, ARCHITECTURE §4 the forward direction and the whole-graph value. **The dangling cross-reference is repaired by writing what it promised.** `ROADMAP.md` has pointed at "the analysis above" for what blocks P1-6 and P1-7 since 1.2.0, and no such analysis was anywhere in the document — the survey lived only outside the repository, and the sentence had been copied into CLAUDE.md as well. P1-6's half is its slice record. P1-7's is now written too, and counted against the tree rather than recalled: no toast component, no notification/autostart/tray dependency, one plan-scoped `tokio::spawn` and zero intervals in either head, and no surface that can report a failure at 03:00 while `logs_tail` is still `NOT_YET`. Drafting this commit I nearly shipped a CLAUDE.md line claiming that survey existed before I had written it, which is the same defect one layer up. Version in five places, moved together: the workspace inherits it, so `Cargo.toml`, `package.json` and `tauri.conf.json` are the only hand edits and the two lockfiles are regenerated. Hand-editing `Cargo.lock` would have been wrong twice over — `scopeguard` and `simd_cesu8` are also at 1.2.0 and `fs_extra` was already at 1.3.0. `cargo metadata --locked` passes, which is the one-command check. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
8609518a37 |
test(ui): drive the shell against a logging bridge
The jsdom form of the recipe that has found more real defects here than any suite: render the app, log every command that crosses, read back what actually happened. Stage 2 found every screen fetching twice this way and Stage 4 found a plan resolving into a screen that does not render it — both faults *between* components, which is the one place a component suite cannot look. It proves the premise the slice is built on where it can actually be observed: `deps_graph` crosses **once** when the view opens and **zero** times on a re-centre. It also covers the seam nothing else did — the row's new button through the table, the screen, the store and out to the bridge — and pins the three row actions with none of them a tab stop. Writing it found the trap the browser recipe already records, in its jsdom form. `App` calls `checkConsent()` on mount and `useLegalStore.check` **fails closed**, so setting `accepted: true` in the store is undone a tick later by the real command rejecting and the legal gate replaces the entire shell. The store reached `phase: 'ready'` with the graph in hand and every assertion was reading a licence agreement. Both halves have to be stubbed; the comment says so. The browser pane could not reach localhost in this session, so this stands in for the live drive rather than replacing it — the Rust side of a command and the real window still want a human. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
6ef677bc01 |
feat(ui): the dependency view, drawn at the one depth that survives the data
A mode of the package screen, not a tenth tab. `PdEnvironments` switches
to `PdEnvDetail` on `openFor`; this switches on `focus`, for UI-SPEC §4's
reason: `Ctrl+1..9` is positional over `NAV_KEYS`, appending is free and
inserting is not, and a Dependencies tab would have to sit beside
Installed to read as related. `NAV_KEYS` is already nine, so a tenth
entry would have no digit at all.
Three columns at depth 1, and depth is navigated by re-centring rather
than drawn. That is a measurement, not a preference: on the 352-package
fixture a depth-1 neighbourhood is a median of 7 nodes, and depth 2 is a
median of 172 and exceeds 60 for 212 of 352 packages. No layout
algorithm makes 172 nodes legible, so the eleventh runtime dependency, a
THIRD-PARTY-NOTICES edit that re-shows the legal gate, and a CSP
argument all buy a picture nobody can use. Transitive reach is two
numbers instead, and paths are not offered at all — `setuptools` has
more than 2000 distinct paths to a root in that environment.
**UI-SPEC §4 said the third row action folds all three into a `⋮` menu.
It does not.** A menu spends one click opening and one choosing, so
uninstall becomes four clicks where §5's table records three,
hand-counted. Four is under the ceiling of 5, which is exactly why the
budget alone would have let it through. A third inline button costs
nothing: the row is the only tab stop, so the controls are a roving
sequence and a third is one more arrow step, not 200 more stops.
Nothing is carried by colour. `styles.css` rebinds every `--color-*` to
a system keyword in forced-colors, so every edge states its specifier as
text and the columns are told apart by heading and position.
`deps_graph.json` is computed by `fixtures::deps_graph`, never written —
`numpy_blockers`' lesson. It turned out to carry two dependents with two
different specifiers *and* two packages with unsatisfied requirements,
which is more than a hand-written one would have thought to include.
Two defects the tests found by being run against mutations rather than
by being written: a column helper keyed on copy silently matched nothing
once the heading pluralised ("2 packages require this", not "requires"),
and a name-only comparison of the dependents column passed a mutation
that dropped the version and the specifier from every row.
The invalidation is the one this slice was warned about: `freshGraph`
keys on `envHash`, which a mutation does not change, so `App.tsx` resets
the slice in `onFinished`. Health and Security guard and never reset
because nothing they read is altered by an install. Edges are exactly
what an install alters.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
c58fcac523 |
feat: deps_graph, and the shape it deliberately is not
`pin_suggestions`' shape, not `audit_run`'s. No `Sessions` slot, no progress channel, no cancellation: those exist because an audit is 18-68 seconds, and a probe is 605 ms. Borrowing them here would be a constant carrying its original units — the mistake `AUDIT_TIMEOUT` already records. One call per environment rather than one per package, which is the whole reason the value is shaped this way. The view re-centres on a click; a `deps_for(pkg)` command would read more naturally and pay a probe for every click to answer a question the previous probe already held the data for. No store read, so there is no guard to drop — `pkg_list` is the same and for the same reason. All five sites: the command, the handler list, `COMMANDS`, the wrapper with `DepsGraph` added to the `import type` list (`export type *` does not bring it into scope for a wrapper's own signature), the `test/ipc.ts` mock, and ARCHITECTURE §7 — with its trailing pipe, which the test added two commits ago now checks. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
4ddec61ebb |
feat(wire): DepsGraph is a schema type
Registered in `schema_for!` and `SCHEMA_TYPES`, and in `golden.rs`'s own copy of that list — the deliberate second list, which `schema_lists_exactly_the_documented_types` holds in step by reading the real one back out of the binary. Only the root type, as the comment beside `HealthReport` says: the generator hoists every `$defs` entry, so `DepEdge` and `DepsNode` arrive as their own TS declarations without being listed, and listing them would emit each twice. `golden__schema-unknown-type.snap` churns because the error message enumerates every known type, which is a real behaviour change rather than noise. 67 snapshots. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
bf2947b6c3 |
feat(core): the forward direction, and the graph as one value
`ReverseDeps` has been reverse-only since S3. Three features read it and all three look exactly one edge out, so nothing ever needed to ask what a package requires. PRD P1-6 does. `forward` is built in the same pass, from the same parse, and filtered by the same `applies_in` rule — a second traversal is how the two directions would come to disagree. `edges_to` goes further and projects `breaking_dependents` rather than walking `edges` again, so the dependents column and the uninstall guard are the same set by construction; the test asserts it whole rather than by name, after a mutation that dropped the version and the constraint passed a name-only comparison. `unsatisfied` is the one thing this can say that the package list cannot, and it is only trustworthy because the markers are evaluated. Measured on the 352-package fixture: counting raw `Requires-Dist` names reports **7** missing packages; evaluating markers reports **1**. The other six are backports gated on a Python this environment is not. That gap is the whole argument for this living in Rust. `view` crosses the bridge whole rather than a package at a time, because the alternative pays a 605 ms probe on every re-centring click. Uncapped on purpose: the window is bounded in the view, but the "+ N more" count has to come from the full set or a capped view misreports a total. Measured in --release against C:\Python314, 352 packages: build 1.8 ms, view 42.9 ms, payload 249 KB, 1858 in-force edges, impact median 20 / p90 111 / max 178. Having `reach` walk `forward` itself takes the view to 31.4 ms — 1.8% of the probe the user is already waiting for, bought with a second copy of the in-force rule. Declined, and the number is in the doc so it is not re-litigated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |