30 Commits
Author SHA1 Message Date
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 ab16742989 feat(core): interpreters a person adds — validated, stored, listed
PRD P0-1's manual browse, the last command NOT_YET owed (env_add_manual).

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 10:55:11 +07:00
poli0981andClaude Opus 5 b526d1bf81 docs: ARCHITECTURE §7's five missing commands, and a test that keeps it honest
§7 opens with "A command that is not listed here does not exist; adding one means
amending this section in the same commit." The 1.1.0 P1 wave broke that rule five
times: `pin_suggestions`, `env_export`, `requirements_read`, `cache_usage` and
`cache_clear` are registered, wrapped and shipping, and appear nowhere in the
document. 35 rows against 38 registered commands.

The rows are added, and so is a fourth drift test. The three that existed police
`lib.rs`, `COMMANDS` and `NOT_YET` against each other and not one of them reads the
document making the promise — the assertion message of `every_registered_command_is_
declared` even claimed it did, so that message is narrowed to what it actually
checks. `documented()` parses §7's table the way `registered()` parses the handler
macro, and the new test runs both directions: a row for a command nobody registered
is the same lie as a command nobody documented, it just fails later. Checked by
deleting the `cache_clear` row, which fails it by name.

Two stale counts with it. `golden.rs` said "25 as of Phase 3 P3" and there are 30, so
the number is removed rather than reset — the list is directly below it and
`schema_lists_exactly_the_documented_types` already holds it to the binary's. CLAUDE
said 58 goldens; there are 64, now pinned to 1.1.0 per the counting-trap rule.

ROADMAP's screenshot note was **not** stale, which only looking established: the
seven pre-About shots really do show an eight-entry sidebar. The sentence just reads
as though `screenshot/` held seven files when it holds eight. Reworded, and while
there: `about.png` shows nine entries and a build panel reading 1.0.0, so every shot
is now stale in at least one way.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 09:05:59 +07:00
poli0981andClaude Opus 5 14f170cca8 docs: the four places that still credit specta, and three smaller untruths
`legal/THIRD-PARTY-NOTICES.md` was not the only document listing a dependency the
project deliberately does not have. ARCHITECTURE §9, TESTING §3 and CLAUDE.md all
still say types are generated with specta/tauri-specta; `bindings.rs` has recorded
since M1 that they are not, and why. Each now says what actually happens and points
at that file — including the consequence, which is that drift is a `cargo test`
failure rather than a compile error.

PRD G7 carried the same stale claim as the privacy policy: "network traffic limited
to PyPI + GitHub Releases", from before the self-updater was removed.

SECURITY §7 repeated the `cargo about` / `licenses/` claim; §8's reset advice
pointed at "Settings -> Legal & About", a screen that has never existed; §9 promised
a root SECURITY.md that was never written. The last one is now `.github/SECURITY.md`
— a short pointer so GitHub's Security-policy tab is not empty — carrying the
advisory URL and code@poli0981.dev.

SECURITY §4 gains the poli0981.dev entry ahead of the About tab that needs it, per
its own rule that an allowlist widening belongs in prose and not only in
capabilities/. It also now says what the scope actually defends: the two call sites
that pass data rather than constants, one of which hands over a URL that came out of
ruff's JSON. That is the argument for copying the contact addresses to the clipboard
instead of adding a mailto: scheme.

README dropped a "(add the standard GPL-3.0 text at repo creation)" instruction that
had been shipping for three milestones after the text was added.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 17:32:20 +07:00
poli0981andClaude Opus 5 4d687a4a40 fix(core): the program and the data stop sharing a directory
Installing the first bundle put `pipdock-app.exe`, `pipdock.exe` and `uninstall.exe` into
`%LOCALAPPDATA%\PipDock` — the same folder as `index.db`, `snapshots\` and `tools\`, because
Tauri's NSIS per-user installer writes to `$LOCALAPPDATA\{productName}` and
`store::default_app_data()` derived from the same name.

SECURITY §8 tells users that deleting the app data folder is a complete reset. With the two
collided, following our own documented advice would have uninstalled the application.

The data root moves to `%LOCALAPPDATA%\PipDock\data\`. Changed now because it is still free:
**no release has ever been published**, so there is no on-disk layout in the world to migrate
and no migration code belongs here — a `default_app_data()` that checked for a legacy
location would be dead code from its first commit.

`APP_DATA_SUBDIR` is a second constant rather than `"PipDock/data"` in one join: a path built
from a literal containing a separator reads differently depending on the platform's idea of
one, and every comparison against it inherits that.

Verified by moving this machine's real data and asking the binaries to find it: `tools status`
reports `…\PipDock\data\tools` and *up to date with the pins shipped in this build*, and
`search` still answers out of the 53 MB index.

Two doc paths were also corrupted, by me, in earlier commits: `\PipDock\tools` written through
a Python patch became `PipDock<TAB>ools` in SECURITY §2 and ROADMAP. Fixed here rather than
left for a reader to puzzle over.

The uninstall behaviour is recorded in SECURITY §8 because it was tested rather than assumed:
uninstalling removes its own binaries, the Start-menu shortcut and the registry entry, and
leaves the data directory untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 20:59:43 +07:00
poli0981andClaude Opus 5 6840e0378a docs: the write path, the waiver that gates it, and one claim made true
DATA-FLOW gains **invariant 6** and §9.1's state machine. §9.1 and §9.2 are scoped to a
mutating *engine* call and do not reach `ruff check --fix`, which rewrites the user's source
tree — a thing no snapshot in this application describes, so one taken here would have no
consumer that could use it. That is invariant 2's own argument for the pip-upkeep exemption,
a second time, and like that one the exemption is **made visible rather than silent**: the
confirm states that PipDock cannot undo the change and that only the user's version control
can. The fifth proof shape is a `HealthReport` plus a server-checked `FixConsent`.

**A SECURITY paragraph was ahead of the code, and the code caught up rather than the
paragraph coming back.** §2 now says the project folder is canonicalized, existence-checked,
and refused when it resolves inside PipDock's own tools directory — so `validate_project`
exists, `..` is handled by comparing canonical paths rather than strings, and running Health
against `%LOCALAPPDATA%\PipDock\tools` answers `PD-ENV-003`. ruff would otherwise have
rewritten PipDock's own venv, and that failure would have looked like a corrupted install
rather than like the fix that caused it.

§2 also records the git resolution finding: this is the one place PipDock runs a
PATH-resolved program with a user-controlled working directory, and a planted `git.exe` does
**not** win — verified by planting one, not by reasoning about `CreateProcess`. §8 gains the
one exception to "all state is local".

CODE-HEALTH-SPEC §5 replaces "recommends a clean git tree" with what was built. CLI-SPEC §3
carries the `--yes` rule where someone reading the flag will see it. UI-SPEC §5 gains the fix
row and §7 names the confirm alongside the other three destructive ones, with the
forced-colors requirement each of them shares. ARCHITECTURE §7 gains `health_dirty`.

CLAUDE.md's waiver list goes 2 → 3, and the no-snapshot decision is written where the next
person will look for it rather than left to be re-derived.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 19:30:12 +07:00
poli0981andClaude Opus 5 484d1a4693 docs: the fifteenth component, and the decision that was open for three slices
**The deptry question is closed.** ROADMAP has flagged it since P3 as the one decision in
three slices the owner had not made themselves: deptry cannot be told which environment to
compare against, so §2's isolation and §3's comparison conflict. Chosen 2026-08-13 — keep all
four DEP codes and disclose the limitation where findings are shown, rather than
`--ignore DEP003`, which turns a mislabelled finding into a missing one, or dropping deptry
from v1. The screen carries the note under the same condition the CLI does, and the saved
Markdown carries it too, because that file is read away from both.

UI-SPEC §6 goes 14 → **15 of 16**; only `PdEnvSwitcher` is left. §5's Health row gains the
parenthetical the Uninstall row already has: 3 clicks holds once the folder is remembered,
and the first run in a project is 4. §3 gains two rulings it was silent on — that a failed
tool's error row counts into `⚠ n` (three separable tools are three problems, where
forty-seven failed packages are one run), and that Health owns its own console drawer,
because it claims a separate session slot by design and one toggle cannot address two.

CODE-HEALTH-SPEC §6's third bullet is corrected in place rather than left as a known-dead
line: the rule page is keyed by name, `.../rules/<code>` 404s, and the allowlist had to be
widened or every link failed silently.

ARCHITECTURE §7 gains `health_save_report` and corrects `health_fix` to `FixReport` —
`ExecutionSummary` was wrong for the same reason it was wrong for `pip_upgrade`: no plan, no
phase, no per-package counts. Both `EnvRow` rows now say that every per-row field has to be
filled by *both* probe paths, since `upgradePip` replaces the row wholesale.

The ROADMAP stage table records what the plan did not predict: four defects, all found by
running, and the cancellation deferral with the measurement behind it rather than a shrug.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 18:49:59 +07:00
poli0981andClaude Opus 5 3ae4b25331 docs: what the tools actually emit, and what CheckReport was never going to be
CODE-HEALTH-SPEC §3 said the environment is "passed to deptry so installed vs declared vs
imported compares against reality". deptry 0.25.1 has no such option, ignores VIRTUAL_ENV,
and reads whatever its own interpreter can import — so §2's isolation and §3's comparison
are in conflict and isolation wins. §3 now says that, names the bounded cost, and says why
DEP003 is kept rather than suppressed.

§3 also gains what the tools actually emit, since §5's sketch predates anyone running them:
deptry's flat list keyed by module and written to a file *path*, vulture having no
machine-readable output and one message shape with no identifier, ruff's URL keyed by rule
name, and all three exiting non-zero on findings with vulture using 3.

ARCHITECTURE §7 and CLI-SPEC §6 both typed the report CheckReport, which engine.check()
already owns and which is a published `pipdock schema` contract — two unrelated shapes
sharing one name on the wire. It is HealthReport.

CLI-SPEC §5's code 1 now covers "health found something", which is the behaviour a
pre-commit hook needs and the one doctor already had.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 23:31:37 +07:00
poli0981andClaude Opus 5 5bd21de203 feat(app): pip_upgrade, the command P0-10 needs
P0-10 is a ship blocker that has had an Engine method, a CLI command and no way to reach it
from the app. This is the bridge, and NOT_YET is one shorter.

Returns StepResult. ARCHITECTURE §7 typed it ExecutionSummary, which would need an invented
plan_id, phase, CheckReport and counts — four lies for one step. It carries no versions
either; the caller re-probes, which it must do anyway to refresh the row.

Two DATA-FLOW §9 amendments, both narrow and both written down rather than assumed.

§9.1 gains a fourth plan shape: pip upkeep, which is not resolver-planned and cannot be.
This is S5's lesson a second time — the invariant named the shapes that could produce a
proof and left out the one that structurally cannot. pip below 22.2 cannot emit
--dry-run --report at all, which is exactly the case the feature exists for, so demanding
a report would refuse the only environments that need it. One IPC message parking nothing,
so no waiver type: those exist for a decision made in one message and consumed in another.

§9.2 gains an exemption: no snapshot. A snapshot's only restore path is
`pip install pip==X` executed by pip, so one taken to protect against a broken pip has no
consumer that could use it. Made visible rather than silent — the dialog will say so — which
is what keeps it an exemption instead of an erosion.

The slot is claimed and released on both paths. Two pip invocations against one
site-packages would interleave, and a claim that is never released leaves every later
command answering PD-RES-003 for a plan that never existed (S5 bug 1).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 22:45:02 +07:00
poli0981andClaude Opus 5 1df526c1ed feat(app): the five snapshot commands
`snapshot_list|create|diff|rollback_preview|rollback`, all `async` — a synchronous
`#[tauri::command]` runs on the UI thread, and `snapshot_list` reads a directory
while the other four shell out.

`snapshot_list` takes the `env_hash`, not a `PyEnv`. Snapshots outlive the
interpreter that made them, so an environment whose Python has been deleted still
has a history worth showing — and that is exactly when `EnvRow.env` is `None`.

`snapshot_diff` claims no session. Browsing a timeline must not start a flow:
`RollbackFlow::start` runs `engine.freeze()`, which would be a subprocess per
click on an interaction that has to feel instant, and each start would silently
discard the preview the user is reading.

The declared `snapshot_rollback` row becomes two, so ARCHITECTURE §7 goes 32 → 33.
The preview parks the flow and the execute claims it, for the reason
`plan_resolve` and `plan_execute` are separate: what the user confirms has to be
the plan they were shown, not one re-derived after they answered. The outcome
always carries a snapshot, because the pre-rollback one is what makes a rollback
itself reversible — and is why `latest` moves twice across a single restore.

Every one reads the store and drops the guard before awaiting; `cargo check -p
pipdock-app` after the signatures and before the bodies, as usual.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 21:46:25 +07:00
poli0981andClaude Opus 5 d36e30dd6c feat(app): uninstall_guard and uninstall_execute, and the re-guard they make possible
The last two mutating commands. Both were rows in ARCHITECTURE §7 and names in
`COMMANDS` with nothing behind them.

`uninstall_guard` parks the flow it built, so `uninstall_execute` runs the
removal the user was actually shown rather than re-deriving it from names that
may have moved. *Remove dependents too* is this command called **again** over
`withDependents`, which is what DATA-FLOW §5 means by re-guarding: widening a
removal must not skip the check that justified widening it, and a dependent of a
dependent has to surface on the next pass instead of going unannounced. The
previous pass's flow is discarded, exactly as `plan_resolve` discards a previous
preview.

`uninstall_execute` refuses with `PD-RES-004` **before** the snapshot when the
guard objected and `force` is false, via a new `UninstallFlow::check` that shares
its implementation with the one `execute` enforces — one rule, two call sites, so
a plan that will not run leaves no snapshot behind.

Both read the store and drop the guard before awaiting. `Store` is not `Sync`, so
a future holding one is not `Send` and the command would not compile — and where
it does compile it serializes every other command behind a subprocess. Checked
with `cargo check -p pipdock-app` as soon as the signatures were written, which
is the cheap version of finding this out.

ARCHITECTURE §7 corrected in the same commit, as it requires. Four return types
were wrong: `plan_execute` and `uninstall_execute` return `ExecutionOutcome`, not
`ExecutionSummary`, and `plan_cancel` returns `bool`, not `()`. §7 also now
states the one-session-at-a-time rule spans all four flows.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 21:46:25 +07:00
poli0981andClaude Opus 5 82ffab23f3 feat(core): plan-progress carries a lifecycle, not just a line
The other Stage 1 deferral, and the same reason for deferring it: S3 is the first slice
that builds the two things it exists for.

ARCHITECTURE §7 specified `plan-progress { step, pkg, phase, line }`, which made both of
them unimplementable. UI-SPEC §3's per-package section markers in the console drawer had no
event meaning "a step began" to group under, and §8's "13 of 15 complete" live region had
none meaning "one finished" to count. Neither is recoverable from the text: engine output
does not reliably name the package it concerns, and counting lines is not counting steps.

Now a tagged enum — `stepStarted` / `line` / `stepFinished`. Every step emits exactly one
open and exactly one close, whichever way it ended, including the cancelled and
failed-to-spawn paths. That is asserted rather than assumed: a test collects the events off
a real execution and checks the opened and closed step indices are equal sequences, with
the failing package still closing its section carrying the status the summary reports.

Markers are emitted by the executor, not the adapters, for the same reason `step` is — an
adapter runs one command and cannot know it is step 3 of 15.

`line` also says which stream it came from. That is presentation, not judgement: uv writes
its **plan** to stderr (SP-1), so a drawer that treated stderr as failure would colour a
successful resolve red. Verified against a real subprocess rather than the FakeEngine —
the fake returns results without ever producing output, which is how the first version of
that test managed to assert nothing, caught by its own "this proves nothing" guard.

`ProgressEvent` joins SCHEMA_TYPES, so the frontend gets the discriminated union generated
rather than hand-mirrored. One new golden; `golden__schema-unknown-type` moves because it
lists the known types.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 18:47:15 +07:00
poli0981andClaude Opus 5 8270ea64dc docs: reconcile the IPC command list, and say where installed packages come from
ARCHITECTURE §7 listed 26 commands as prose with `a|b|c` groupings, which made the
count ambiguous enough that Stage 1 added `app_info` and `plan_decide` without anyone
noticing the doc had gone stale. `ui/src/ipc/index.ts` said "there are 26 of them"
while its own COMMANDS array held 28.

Rewritten as a table of 32 with a return type and a purpose per row, and a line saying
that a command not listed there does not exist. The four genuinely new names are the
ones M2 already needs and had nowhere to be written down: `engine_info` (Settings shows
a detected version per engine, and nothing returned `EngineInfo`), `index_refresh`,
`snapshot_create` (§7 had only list|diff|rollback), and `report_bug_url` — built in
Rust so it cannot drift from `pipdock self report-bug`.

DATA-FLOW §7's "List installed" row claimed both engines' `list --format=json`. Neither
head has ever called it: `pipdock list` reads probe.py, and `pkg_list` will too. The
probe carries Requires-Dist, which `list --format=json` drops, and which the reverse-dep
graph, the uninstall guard and blocker attribution are all built from — so reading the
engine there would hand the Installed screen a different package set than the guard
that protects it. `Engine::list_installed` still exists; only `resolve()` calls it, for
SP-1's guard set.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 15:34:33 +07:00
poli0981andClaude Opus 5 d829c4f17c feat!: drop the application self-updater
Removes `tauri-plugin-updater` and everything that existed to serve it.

A self-updater is a permanent remote-code-execution path into a tool that already
runs subprocesses against the user's interpreters, and it has to be defended for
the life of the product: a signing key that must never leak, an endpoint that must
never be spoofable, verification logic that must never be bypassable. For something
people open occasionally to tidy an environment, that is a large standing liability
bought for a small convenience.

It was also never actually functional. `plugins.updater.pubkey` has been the literal
string REPLACE_AT_FIRST_RELEASE_WITH_TAURI_SIGNING_PUBLIC_KEY since Phase 0, so the
capability was granted to a plugin that could not verify anything.

What goes:

  - tauri-plugin-updater, its `plugins.updater` config block and endpoint, and the
    `updater:default` capability
  - the release workflow's signing step, `--bundles ...,updater`, and the *.sig /
    latest.json artifact globs
  - TAURI_SIGNING_PRIVATE_KEY and its password from the secrets bootstrap, and the
    keypair generation item from the RELEASE-CI section 5 checklist

Ten crates leave the dependency tree with it: zip, tar, xattr, filetime,
minisign-verify, osakit, objc2-osa-kit, arbitrary, derive_arbitrary and the plugin
itself -- archive extraction, signature verification and AppleScript execution, none
of which PipDock has any other reason to link.

SECURITY section 4 gets simpler as a result: pypi.org is now the *only* host PipDock
connects to. github.com was on that list solely for the updater; the legal gate and
the bug-report deep link hand a URL to the user's browser rather than fetching
anything.

Users move between versions from the GitHub Releases page and verify SHA256SUMS.txt,
which the README already tells them to do because SmartScreen warns on first run.
Recorded in CLAUDE.md as well: Tauri makes adding this back a three-line change, so
the reasoning needs to outlive the commit.

183 tests, fmt and clippy clean, both Tauri JSON files still valid.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 22:20:33 +07:00
poli0981andClaude Opus 5 465b54f7e8 docs: close M1, and correct the M2 estimate against what the bridge actually is
ROADMAP said L2 "has never run". It had, three times, failing each time; record
what failed and why, since both causes were in the harness rather than the product
and neither is obvious from the job name.

M2 was estimated at 3-4 weeks. Surveying the code for it shows the bridge is
scaffolding: ui/src/ipc/index.ts fixes 26 command *names* with zero wrappers,
src-tauri registers exactly one command (app_info, a smoke test), and 2 of 16 Pd*
components, 1 of 5 Zustand stores and 2 of 14 locale catalogs exist. Scope is
unchanged; the estimate moves to 7-8 weeks to match it, and three pieces with no
home in the core yet are named so they get sequenced before the screens rather
than discovered during them:

  - the flow layer, since plan_and_run is ~200 lines of DATA-FLOW section 3 living
    only in the CLI, and duplicating it would mean two implementations of the hard
    invariants
  - cancellation, which does not exist at all -- plan_cancel is a declared TS name
    with no Rust counterpart, and exec.rs's watchdog drops the future rather than
    killing the child
  - progress, where ProgressEvent.step is hardcoded 0 at all four producers and
    scan-progress has no producer

Also: ARCHITECTURE section 10 still said uv "0.9.x line, minimum pinned after
SP-1" when SP-1 pinned 0.10.0 and shipped it as UV_MIN_VERSION; CLAUDE.md said
"Status: Phase 0" three lines above a paragraph saying M1 was substantially
complete; and the fixture redaction now needs recording under "things that look
like bugs but are not", because "these are not literal engine bytes" is exactly
the kind of thing someone will otherwise try to helpfully undo.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 20:26:01 +07:00
poli0981andClaude Opus 5 1e3e179205 docs: record the version holds and where to pick up
ARCHITECTURE section 10 now lists all three deliberate version holds
together — rusqlite 0.37, TypeScript 6, and ESLint 10 without
eslint-plugin-react — each with the compile or lint failure that forces
it. Dependabot will keep proposing every one of them, and a reviewer
looking at those PRs needs the reason in the version manifest rather than
buried in a commit message.

ROADMAP Phase 1 gains a "where to pick up" section: CI is green on the
published commit, and the next four things are closing the two Dependabot
PRs that would break the build, watching ci-integration.yml actually run
for the first time rather than assuming it passes, the owner-only repo
settings, and the SP-5 tangle environment that is still the outstanding
M1 exit criterion.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 20:53:26 +07:00
poli0981andClaude Opus 5 4ab948ac7b feat: implement the two owner decisions from spike week
Requires-Python is now enforced by PipDock, not by the engine.

SP-2 found the engines disagree: scipy 1.7.3 declares >=3.7,<3.11, and on
Python 3.12 pip refuses it while uv plans to install it. G5 promises one
behaviour across heads, so the preview must not change shape because the
user flipped the engine radio. crates/pipdock-core/src/compat.rs screens
every candidate against the environment's version before any engine
command runs; rejects surface as PD-PKG-001 with the required range shown
against the found version.

This does not weaken "explain, don't reimplement" — resolution stays
entirely the engine's. compat.rs only filters candidates the engine should
never have been offered, using the slice of PEP 440 that actually appears
in Requires-Python: comparison, wildcard and compatible-release operators.
Specifiers it cannot parse count as compatible, because PipDock failing to
read metadata must never be the reason an installable package is refused.
Nine tests, including the exact scipy case the spike captured and the
boundary cases where an off-by-one would reject a supported Python.

probe.py keeps -I, and the cost is disclosed rather than hidden.

Isolated mode is what stops a poisoned environment injecting code into the
probe, so it stays; dropping to -E was rejected because a package in user
site is part of the untrusted surface the isolation exists to exclude, and
probing twice was rejected as a second interpreter start per scan for a
non-primary case. Instead probe.py now reports hidden_user_site — the
user-site path when it exists, sits off sys.path and is non-empty, else
null. Verified: the system Python reports the path (352 dists), a venv
reports null. The Installed screen shows a note naming the path only when
it is non-null, so users of the affected case are told exactly what is
missing while everyone else sees nothing.

ERROR-CATALOG PD-PKG-001 changes from a stderr classification to a
PipDock-raised code, because engine stderr cannot support it: pip reports
it as plain "No matching distribution found", indistinguishable from
PD-PKG-002, and uv does not enforce it at all.

Docs updated: ARCHITECTURE 3 and 4, DATA-FLOW 2, SECURITY 2, UI-SPEC 4,
ERROR-CATALOG 2, ROADMAP, CLAUDE.md, spikes/README.md. EN and VI strings
added for both notes.

Two non-blocking questions remain in spikes/README.md: search-ranking
scope for M1, and how to obtain the five error fixtures this machine
cannot produce.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 18:38:46 +07:00
poli0981andClaude Opus 5 c4fe1c34e6 feat(core): scaffold the Cargo workspace, core crate and CLI surface
Phase 0 scaffold per ARCHITECTURE section 2. Everything compiles; nothing
resolves or mutates yet.

Implemented rather than stubbed, because the spikes need them and they are
the parts the invariants rest on:

- errors/catalog.rs: all 30 launch codes with their wire forms, plus tests
  that the wire codes are unique and match the PD-<AREA>-<NNN> grammar.
  Code::ALL drives the future "no code without fixture" gate.
- model.rs: PkgName::parse does PEP 508 validation and PEP 503
  normalization. This is the only way a name reaches an argv array, which
  makes SECURITY section 2 structural rather than aspirational; the test
  table rejects flags, separators and quoting attempts.
- probe.py: stdlib-only, Python 3.10 floor, per ARCHITECTURE section 4.
- The pip/uv argv builders, with tests asserting one token per argument.
- ExecutionSummary::tally, so the "13 successful, 2 failed" headline is
  derived from the rows rather than accumulated alongside them.

Stubbed with todo!() and a pointer to the milestone that fills them: the
Engine trait impls, discovery, index, graph, snapshot, pins, health.
UvEngine::parse_dry_run stays unimplemented on purpose — SP-1 must pin
uv's text plan format before anything parses it.

Two findings recorded in spikes/README.md:

- probe.py under -I hides user-site packages: 352 dists vs 376 without it
  and 375 from pip list, on a non-venv system Python. Venvs are unaffected.
  The fix trades a documented security control against list accuracy, so
  it is left as an open SP-6 decision rather than settled here.
- Python 3.14 deprecates subscripting absent metadata headers, which wrote
  DeprecationWarning to stderr on most distributions. probe.py now uses
  .get(); the probe must stay stderr-clean because noise reads as
  PD-ENV-003.

rusqlite is held at 0.37: 0.40 pulls libsqlite3-sys 0.38.1, whose build
script needs the unstable cfg_select! and will not build on stable 1.94.1.
Recorded in the ARCHITECTURE version manifest.

cargo fmt, clippy -D warnings and 23 tests are green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 17:25:56 +07:00
poli0981andClaude Opus 5 43c96c134d docs: correct CI docs against the actual ops repo
The CI docs were written against an assumed poli0981/.github suite.
Audited the real one on 2026-07-27; four claims did not hold:

- no reusable Rust workflow and no reusable Tauri workflow exist, and
  only reusable-desktop-csharp.yml uses a Windows runner, so ci-rust.yml
  and release.yml must be project-local
- notifications are Discord-only via discord_notify.py; there is no
  notify.py and no Telegram/Bluesky/Mastodon/X/Facebook fan-out
- dependency updates are Dependabot, not Renovate (no Renovate config
  exists anywhere in the ops repo)
- setup-secrets.sh does not exist; use gh secret set

Also records that reusable-codeql.yml has no Rust support (CodeQL has no
Rust analyzer) and that reusable-web-react.yml has no working-directory
input, which is why package.json sits at the repo root.

Intent is preserved throughout: grouped weekly bumps, immediate security
PRs and isolated tools-requirements.txt bumps are now expressed in
Dependabot terms rather than dropped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 17:10:34 +07:00
poli0981andClaude Opus 5 5e8d78bb27 docs: add design documentation baseline
Commits the full v0.1 design suite written during the design phase:
PRD, architecture, data flow, UI/CLI specs, code-health spec, error
catalog, security, testing, release/CI and i18n docs, plus the roadmap.

The legal documents (EULA, disclaimer, privacy policy, third-party
notices) must be committed publicly because the in-app legal gate links
to their GitHub URLs at first run.

Also adds .gitignore, which the repo was missing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 17:08:14 +07:00