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>
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>
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>
`pipdock pip-upgrade --engine uv` failed at PD-ENG-001 — while the line immediately below
had already reached past the abstraction to call PipEngine.info directly for the version.
Upgrading pip is a pip operation by definition. There is no uv way to do it, which is why
UvEngine::upgrade_pip exists only to refuse, and the engine setting is a preference about
the *user's* environments. Dispatching on it meant the one command with no resolver
between the user and the result was also the one that could be blocked by an unrelated
choice. Same reasoning P2 applied to the tools venv: pip is present wherever Python is.
Both heads now call PipEngine::upgrade_pip directly. The uv refusal stays rather than
becoming an unreachable!() — the trait is public and for_id can still hand a caller that
adapter, where a catalog code beats a panic.
That refusal was also the only thing standing in front of this path, so PipEngine now
carries its own PEP 668 guard, copied verbatim from UninstallFlow::start rather than
reworded so the three cannot drift. DATA-FLOW §2's preamble is "all mutating flows" and
replacing pip in site-packages is one; UpdateFlow has refused since S1 and UninstallFlow
since S5, and this had no guard at all. It stayed harmless only while nothing but a CLI
command could reach it — the next commit gives it a button.
Verified by running: `pip-upgrade --engine uv` on a 3.12 venv reports pip 25.0.1 -> 26.2.1
and exits 0, and a second run is idempotent.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
DATA-FLOW §8 has always listed "dry-run resolve the restore set" between the plan
and the snapshot, and **neither head has ever done it**. S6 did not add it, so §8
now says which part is real: `RollbackFlow` diffs, plans, and reports the entries
no index can supply — but it does not ask the engine whether each restore spec is
still fetchable, so a release yanked since the snapshot surfaces at execute time.
Adding it is a network round trip on an interaction budgeted as instant, and it
would resolve against the *pre-removal* environment, reporting conflicts the
two-phase execution never hits. It needs its own design and belongs with M3's
engine work. Until then the preview's promise is precise rather than broad: it
lists what *cannot* be restored, not everything that might fail.
UI-SPEC §4 records why the env detail is a mode of the Environments tab rather
than a ninth sidebar entry (§8 fixes `Ctrl+1..8`), why the trigger label is
load-bearing rather than decoration, and why the diff copy names a direction —
"added" is ambiguous the moment you read it from the snapshot's side. §5's
rollback row gains the real path and the 2-click route from a summary. §6 goes to
14 of 16, `PdSnapshotTimeline` having arrived; `PdEnvSwitcher` is now the only one
absent that is not M3's, and nothing needs it.
TESTING §2's L1 list gains the partition property, which is the one a rollback
preview actually stands on.
ROADMAP's Stage 6 table records the four bugs, three of which no test written for
them would have found: the uncancellable restore loop, the freeze lines both
parsers dropped, `snapshot_list` firing twice, and the rollback that left the
timeline empty. CLAUDE.md: Stages 1–6, goldens 52 → 54, and the rule S6 leaves
behind — two slices that key on different things need two resets.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ROADMAP gains the Stage 5 table it never had — the whole S5/S6/S7 definition
lived outside the repo, so `main` described the order and nothing else. Five live
bugs are recorded there because none of them were S5 features: the wedged slot,
the missing lifecycle markers, the removal that ignored its cancellation token,
the swallowed `--no-snapshot`, and the pin button that was a tab stop.
DATA-FLOW §5 now says the dialog is not the enforcement point, and §9.1 names its
proof per plan shape: a `ResolutionReport` for a resolve, a `GuardReport` plus a
`GuardAck` for a removal, a `RollbackPlan` for a restore. It had required a
`ResolutionReport` "accepted in this session", which the uninstall path cannot
produce — there is nothing to resolve — so the one flow with no preview was also
the one flow the invariant did not describe.
UI-SPEC §4 records two inline row buttons rather than the `⋮` menu it specified,
with the click arithmetic that forced it, and the Pins screen's Exclude-only
scope with the reason: `pins::hold_requirements` has no caller and
`plan_requirements` restates the installed version, so a Hold at another version
is a promise nothing keeps. §5 states the click-counting convention it had been
applying inconsistently. §6 corrects the inventory to **13 of 16** — the "16 of
16" claim after S4 had folded in components that are not on that list — and names
the four that are load-bearing but unlisted.
CLI-SPEC §5 and §7 follow the exit code from 1 to 2. TESTING §1.5 says the guard
must be enforced and not merely reported. CLAUDE.md: 31 → 32 codes, and adding
one now re-blesses every schema that *embeds* `Code`, not just `Code`; 46 → 52
goldens; and the rule S5 leaves behind — a decision that sits between two IPC
messages needs a value the executing call demands, or "somebody forgot to look"
stays expressible.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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>
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>
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>