306 Commits
Author SHA1 Message Date
poli0981andClaude Opus 5 3152c55eaa fix(docs): three things main was carrying, and the gate that missed one
Found while surveying P1-6. None is caught by any suite, which is the
common thread rather than a coincidence.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 09:05:59 +07:00
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 adaa363f7c fix(ui): the held-back row named the dependent twice
The preview rendered `scipy requires scipy 1.11.4 requires numpy <1.28.0,>=1.21.6`.
`graph::blockers_for` assembled a whole English sentence into `Blocker.constraint`
while also setting `by`, and `PdConflictRow` passed both to `plan.blocker`, whose
template is `{{by}} requires {{constraint}}`. It has shipped in every release that
had a preview.

The sentence lived in Rust because the CLI prints that field alone, so the CLI was
the one head it looked right in — hard invariant 4 the wrong way round. `Blocker`
now carries `by`, `version` and a bare requirement: the shape its own doc has
described since M1 (`"requests<2.31"`) and the shape `graph::BrokenDependent` has
always used. Each head writes its own sentence — `run.rs` gains `blocker_line`,
mirroring the guard composition a few hundred lines below it, and the GUI
interpolates the same three fields `PdUninstallDialog` already does.

Why the suites were green. `PdPreviewDiff.test.tsx` *did* assert this sentence, and
asserted the correct one, because the fixture's blockers were hand-written to the
documented shape while core had drifted away from it. `fixtures.rs`'s own module doc
says hand-writing that JSON "would defeat the guarantee", and `guard_report()` is
computed for exactly that reason; the plan fixture's blockers were the one exception.
They are computed now, from the same rows — which is also why there are two: `pandas
2.1.4` and `scipy 1.11.4` both exclude 2.5.1, and only one was ever written down. The
force-latest confirm consequently names both and exercises the plural branch of
`forceWarning`, which nothing did before.

`PdConflictRow` gets its first test. Checked against the bug rather than trusted
green: restoring the sentence in core and regenerating the fixture fails it on the
doubled text, and removing it passes again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 09:05:59 +07:00
poli0981andClaude Opus 5 2068f73f6a fix(fixtures): redact pip's release notice, which broke the drift gate weekly
pip's "[notice] A new release of pip is available: 25.0.1 -> 26.1.2" is a statement
about what is on PyPI today, not about anything the engine did, so it moves with
every pip release. `redact()` stripped the disposable venv path out of the *next*
line and left this one alone, so the weekly re-capture job failed on 2026-08-17 the
moment pip 26.2.1 shipped — across all nine pip fixtures carrying the line, not just
the one the truncated log happened to show.

Both halves go. The installed version is already in capture-provenance.json, and a
runner whose bundled pip moves would otherwise re-break this the same way. Safe for
the usual reason: no CLASSIFIERS entry reads a version out of stderr. The unit test
that proves the notice is not a failure keeps its real-pip literal, because what it
asserts about is what pip actually emits.

Also re-blesses one byte: uv's build-backend-failure stderr now ends with a newline.
Taken from the CI capture rather than a local one — uv is not on PATH here and that
scenario needs a numpy sdist build. Only two fixtures lacked a trailing newline, and
the other is report-encoding-crash, which is host-dependent and skipped in bulk runs,
so normalising inside redact() would have rewritten a fixture nothing re-captures.

One trap worth recording: `sed -i` under Git Bash rewrote every one of these files
in text mode and stripped the CRs, which is exactly the byte-exactness .gitattributes
`-text` exists to protect. The re-bless was redone in binary, asserting the CRLF
count is unchanged per file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 09:05:59 +07:00
poli0981andClaude Opus 5 6e22c7d502 docs: 1.1.0 in the CLI guide and the README's feature table
The guide said it was run against 1.0.0, which would leave a reader wondering whether
`pin suggest` exists. It does not: all four of 1.1.0's features are GUI-only, and the
guide now says so in a table with the nearest CLI equivalent for each, plus the note
that `pins::suggest`, `requirements::parse` and `cache::usage` are in core so a
subcommand is small when someone asks for one.

The README's feature table still described pin auto-suggest as a promise and did not
mention requirements files, disk usage or the palette at all. Also dropped "(v1)"
from its heading, which stopped being true at the tag.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 21:37:07 +07:00
poli0981andClaude Opus 5 19b5df46a7 fix(test): poll for the process tree instead of guessing how long it takes
`cancelling_kills_the_grandchildren_too` failed on CI while passing locally, and it
failed on its **setup** assertion — "the fixture never started, so this test proves
nothing" — after a fixed 700 ms sleep. Nothing in this branch touches `exec.rs`; a
loaded runner simply had not spawned the fixture yet.

Both tests used fixed sleeps for two different waits: 700 ms for the tree to appear
and 800 ms for it to be gone. Those are fine on an idle developer machine and neither
is a promise a shared CI runner keeps. A required check that fails on timing blocks
every future PR, which is worse than the flake itself.

`wait_for` polls the condition to a 20 s deadline. The assertions are exactly as
strict — a tree that never dies still fails — it just takes the timeout to say so
rather than reporting a guess. The memory note this belongs to already said it: for
any test whose subject is a *timing* or an *absence*, assert on an observable the OS
can answer, not on an elapsed duration.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
v1.1.0
2026-08-14 21:16:52 +07:00
poli0981andClaude Opus 5 edb7544b93 chore(release): 1.1.0, and the P1 wave closed
Five places again — Cargo.toml, Cargo.lock, package.json, package-lock.json,
tauri.conf.json — and `cargo metadata --locked` earned its place in the checklist by
failing on the first attempt, exactly the way `main` was broken this morning. The
shipped CLI reports `pipdock 1.1.0`.

The stage record covers all four slices and the four things running them said that
reading could not: 94 suggestions on a real environment, a parser that turns prose
into a package name, a cache manager for a logs directory that does not exist, and a
palette that ranked an action above the screen it belongs to.

**One PRD row corrected rather than ticked.** P1-4 asked for the engine caches
(`pip cache`, `uv cache`) as well as PipDock's own. Those belong to the engine, live
outside `%LOCALAPPDATA%\PipDock\`, and purging them is a subprocess rather than a
file delete — a different feature wearing the same word. The row says "partly
shipped" and names what is missing, and the roadmap's open list carries it.

UI-SPEC §1's "signature moves" sentence stops saying the palette is P1; §8 gains
Ctrl+K; §4 gains the Disk usage section and why it lists three artefacts.

Two rules into CLAUDE.md, both paid for this afternoon: a parser correct for trusted
input is a hole for untrusted input, and check a thing exists before shipping a size
and a Clear button for it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 21:16:52 +07:00
poli0981andClaude Opus 5 ef9f4f5016 feat(ui): the Ctrl+K command palette — P1-D
UI-SPEC §1 called this a signature move and PRD P1-5 has listed it since the start.
Frontend only: every action already exists as a store action, so no IPC command, no
Rust, no capability change.

`Ctrl+K` collided with nothing and was a **silent no-op** — `App.tsx` parses `e.key`
as a number, so `'k'` became NaN and `NAV_KEYS[NaN]` was undefined. The branch sits
*after* the guard-and-panel bail, which makes both refusals structural rather than
remembered: the palette cannot open while a plan owns the content area, while the
guard dialog is up, or behind the legal gate including About's review mode. A palette
that could navigate during an execution is the defect S3 shipped, through a different
door. Verified in the browser: behind a re-opened gate, Ctrl+K and Ctrl+3 both do
nothing, and the palette works again once it closes.

**Its own matcher, twenty lines, not `index_search`.** That command searches 864,000
PyPI package names over IPC — the wrong corpus and the wrong cost for nineteen
actions. What is taken from `index/mod.rs` is the ranking philosophy SP-3 paid for:
tiered, not score-ordered, because a raw fuzzy score rewards density and puts
`requests-ntlm` above `requests`.

**A ranking flaw the tests caught.** Matching one flat `"${group} ${label}"` string
ranked *Download the index* — group "Search", so a prefix match — above the Search
tab itself, whose label matched only as a subsequence of `go to search`. Someone
typing a screen's name wants the screen. Primary and secondary text now score
separately, with a gap wider than any tier, so every label match beats every group
match. Confirmed in the running app.

Not built on `PdDialog` — it hardcodes a heading and a Cancel-first row for
destructive confirms, the opposite of a filter list — but its `showModal()` pattern
is lifted whole, including the `if (!el.open)` guard that exists for StrictMode. It
*does* dismiss on backdrop click, which `PdDialog` argues against and is right to for
a confirm; nothing here is destructive on its own.

A listbox with `aria-activedescendant` rather than tab stops, so the input keeps
focus while the arrows move the selection — which is what lets someone keep typing to
narrow. `aria-selected` is also what survives Windows high-contrast mode, where the
tint is erased and `styles.css` outlines the selected row instead.

20 tests across the matcher and the palette.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 21:16:52 +07:00
poli0981andClaude Opus 5 0b02bbde1e feat: the cache manager — P1-C
**The scope needed correcting before anything was built: there are no log files.**
`LOG_RETENTION_DAYS` has never had a reader, the only log is the in-memory ring
buffer behind *Report bug*, and `logs_tail` is still owed. So this covers three
artefacts, not the four the roadmap listed — a "logs — 0 B" row would be inventing a
thing that does not exist.

**`index.db` is not a target, and the screen says why.** It holds the package index
*and* the settings *and* the pin list *and* the legal-consent record in one SQLite
file, so a "clear the cache" that removed it would take a user's pins — the same
class of surprise the privacy policy had to be corrected for. Its size is still
reported: a disk report that omitted the largest thing on disk would be answering a
different question.

**This is the first delete-a-tree in production code**, so the safety design is the
feature rather than the UI:

- **Nothing is removed by path.** Callers name a `Target` enum; `cache::path_of` is
  the only thing that turns one into a location, and it is private. There is no
  function here that accepts a path to delete.
- **The resolved path is checked to be inside the data root**, canonicalized on both
  sides. A prefix test on unresolved paths is a string comparison wearing a `Path` —
  on Windows it passes `data\..\..\Users` and fails a legitimate path that arrived
  through a junction or a short name.
- **Symlinks contribute zero and are not walked.** `fs::metadata` follows them and
  would report the target's size; worse, a recursive walk that follows one can leave
  the data root entirely, which is the single thing this module exists to prevent.
  Pinned by a test that builds a real link out of the root.

`PD-PRM-002` rather than a generic failure when the files are held open: a tools venv
whose Python is still running is the ordinary way to hit this on Windows, and it is
something the user can act on.

Clearing goes through `PdDialog` — Cancel first and focused, per UI-SPEC §7 — and the
confirm says exactly what is lost: snapshots take the *record*, not the environment.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 21:16:52 +07:00
poli0981andClaude Opus 5 3d636a4793 feat: requirements export and import — P1-B
**Export needed no formatter.** A `pip freeze` document *is* a requirements file, and
`Engine::freeze` already produces it for snapshots — so `env_export` is that string
and a path, and there is one idea of what a written-down environment looks like
rather than two. A constraints file is the same body under a different name.

Import is the half with work in it, and the work is parsing. `snapshot::parse_freeze`
was deliberately not reused: its narrowness is what makes it the exact complement of
`unrestorable_lines`, an invariant the rollback preview depends on, so widening it to
read a hand-written file would break the thing it exists for.

`crates/pipdock-core/src/requirements.rs` handles ranges, extras, markers, hashes,
continuations and comments, and **reports by line** what it will not use: `-r`/`-c`
includes name files PipDock has not read, `-e` and URLs install from outside the
index, `--index-url` changes how everything installs. Reported rather than skipped,
because a silently shorter install list is the failure DATA-FLOW §9 exists to
prevent — the preview would be honest about itself and wrong about the user's file.

**A real defect found while writing the tests.** `graph::Requirement::parse` splits
the name at the first space, so `this is not a requirement` parses happily as name
`this` with constraint `is not a requirement` — which would have rendered as a spec
containing spaces and gone straight into argv. That is correct for its own job:
`Requires-Dist` metadata never looks like prose. A file a person typed can. So the
constraint is shape-checked here, the same obligation SECURITY §2 puts on every other
user-supplied version, and the check is deliberately a shape test rather than a PEP
440 parse — rejecting a legitimate specifier would make a package uninstallable,
which is the worse failure. Eight specifier shapes are pinned by a test.

Reading and writing both happen in Rust: `capabilities/default.json` grants only
`dialog:allow-open` and `dialog:allow-save`, so the webview can ask for a path and do
nothing with it. `pickOpenFile` joins the two existing pickers; the permission
already covered it.

The UI sits on the environment detail screen beside snapshots — both are the
environment as a document — and **import does not install.** It hands the specs to
the ordinary flow, which previews, snapshots and confirms. Arriving from a file earns
no exemption.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 21:16:52 +07:00
poli0981andClaude Opus 5 929cff898a fix(ui): cap the suggestion list, because a real environment offers 94
Running it against `C:\Python314` — 352 packages, the scale fixture — the default
threshold of 5 qualifies **94 packages**. The ranking is right (setuptools at 150
dependents, then zope at 93, zope-interface at 86; it is a Plone environment and
those really are its workhorses) but a "Worth pinning" section with 94 rows is not a
suggestion, it is a second package list.

No unit test could have said this. The fixtures have six packages because that is
what proves the threshold logic; the usability of the result at scale is a property
of real dependency graphs.

**Raising the default would have been the wrong fix.** A deep tree is exactly where
a bulk update is most dangerous, so it is exactly where the feature has to work. The
screen shows the top 8 and says how many more qualify — `RUFF_ROWS_SHOWN`'s pattern,
including its rule that the count comes from the **full** list so a capped view never
misreports a total. `pins::suggest` is unchanged and still returns everything at or
above the threshold, which is what keeps it composable.

Measured in --release while there: probe **605 ms**, graph build plus the entire
suggest pass **1 ms**. The plan's worry about `dependent_count` being O(n·m) over 350
packages was unfounded — the subprocess dominates completely, and there is no case
for a batched counts method.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 20:19:28 +07:00
poli0981andClaude Opus 5 fc897ef569 docs: P1-A done, and the three things the estimate had wrong
The stage record in the established shape, plus the estimate kept beside it for
comparison — its central claim held: most of pin auto-suggest was already written and
had never been called.

Three corrections, all found by doing the work rather than by planning it:

- **Six registration places for a new command, not five.** `golden.rs` keeps its own
  copy of `SCHEMA_TYPES`, guarded by a test that reads the real list back out of the
  binary. The checklist now says so, and says that blessing
  `golden__schema-unknown-type.snap` is expected rather than suspicious.
- **`/hold/i` matches "threshold".** `PdPins.test.tsx` uses that pattern to prove the
  screen offers no way to create a Hold pin, so any copy on Pins containing the
  substring breaks a test about something else. Recorded in CLAUDE.md as the general
  rule: grep a screen's test for regex assertions before adding copy to it.
- **`ReverseDeps::build`'s doc contradicted `dependent_count`.** Also recorded in
  CLAUDE.md, generalised: a comment describing an intent nothing implements leaves
  the next reader with two readings and no way to choose.

UI-SPEC §4 loses its `(P1)` marker and gains why the section sits above the list, why
it is silent on failure, and why the Settings label avoids one word. PRD P1-2 is
marked shipped with the in-force-edges qualifier. The rough edge that is deliberately
not fixed — unpinning re-offers — is written down rather than left to be rediscovered.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 20:19:28 +07:00
poli0981andClaude Opus 5 ce833c3475 feat(ui): the suggestion section on Pins, and the threshold that governs it
UI-SPEC §4's `(P1) auto-suggest section: "urllib3 — 12 packages depend on it. Pin?"`,
built where the spec put it. Above the pin list, because it is a prompt to act and
the list below is a record of having acted; absent entirely when there is nothing to
suggest, because an empty "Worth pinning" heading is a question nobody asked.

**Its own fetch key, not `loadedFor`.** `useEnvPackages` covers two calls with one
flag, and folding a probe-costing third into it would tie its staleness to theirs.
`suggestionsFor` is the `snapshotsFor` pattern, including the *synchronous*
`loading` check before any await — without it StrictMode's second effect run reaches
the key check before the first has answered, which is Stage 2's double fetch, except
each call here costs a `probe.py` run. Verified against the bridge log: **one call**
per visit.

**Silent on failure, deliberately.** There is no `suggestionsError`. This screen's
job is listing pins and it does that either way, so an error row about an advisory
would be the loudest thing on it.

Accepting writes the count as the pin's reason — PRD P1-2 says "suggest pin with
reason", and the field below is editable so it is a starting point rather than the
last word. It goes through `writePin` like every other pin write, then drops the
entry locally rather than re-probing to learn what cannot have changed.

**The first `type="number"` in the codebase**, so it sets the rule: reject at the
boundary, never store junk. `<input type="number">` reports `''` for anything it
cannot parse, and coercing that writes 0 — which is a meaningful setting ("off") the
user did not ask for. Driven in the browser: `abc`, `-1` and `9999` each write
nothing; `3` writes once.

Copy on this screen avoids the substring "hold" — `PdPins.test.tsx` asserts
`queryByText(/hold/i)` is absent to prove no Hold pin can be created, and "threshold"
matches it. That is why the field is worded "Suggest pinning at" and lives on
Settings.

Eight tests. One of them found a real property while being written: the fixture row
had no `env`, so `pin_suggestions` was never called — which is correct behaviour for
a row whose probe failed, and now has a case of its own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 20:19:28 +07:00
poli0981andClaude Opus 5 446d84a3b8 feat(bridge): pin_suggestions
Takes the whole `PyEnv`, not an `env_hash`. There is no resolver from one to the
other and there cannot be: `envs::env_hash` is a one-way SHA-256 of the canonicalized
interpreter path. Every command that probes takes a `PyEnv` for this reason; the hash
is derived inside, the same thing `flow::UpdateFlow::start` does.

Store read, guard dropped, *then* probe — `pkg_outdated`'s rule. Both the pin list
and the threshold come out of one locked block. Holding it across the await compiles,
passes every test, and freezes `settings_get` and the pin commands for the length of
the probe.

One probe per call, which is why UI-SPEC §4 puts this on the Pins screen rather than
a sidebar badge: only someone who opened the tab pays it. The alternative — asking
the frontend for the `Dist` list it already holds — would send several hundred
packages' worth of `requires_dist` back across the bridge to save a subprocess.

**The drift tests found a fourth registration site the plan had missed.**
`crates/pipdock-cli/tests/golden.rs` keeps its own copy of `SCHEMA_TYPES`, and
`schema_lists_exactly_the_documented_types` reads the real list back out of the
binary to compare — so the local copy cannot silently fall behind. It failed exactly
as designed. Six places, not five: core's `schema_for!`, core's `SCHEMA_TYPES`, the
test's copy, `generate_handler!`, `COMMANDS`, and the typed wrapper.

Two goldens, both read before blessing: `golden__schema-PinSuggestion.snap` is new,
and `golden__schema-unknown-type.snap` gains one word because its error message
enumerates every known type. That is a real behaviour change — the CLI serves one
more schema — which is the only condition under which that file may be re-blessed.
61 snapshots now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 20:19:28 +07:00
poli0981andClaude Opus 5 ed9340e3fa feat(core): the pin-suggest threshold setting
UI-SPEC §4 has listed "thresholds (pin auto-suggest count, snapshot retention)" under
Settings since the spec was written, and neither key existed. This is the first of
the two.

Defaults to `graph::PIN_SUGGEST_THRESHOLD` rather than a second literal `5` — that
const is documented "configurable" and exists precisely so the default has one home.

Two cases the round-trip test alone would not have caught:

- **An unparseable value falls back rather than failing the load**, the same rule the
  engine key already follows. Settings is where a bad value gets fixed, so Settings
  has to open.
- **Zero survives a round trip.** Zero is the "off" setting — `pins::suggest` returns
  nothing rather than offering to pin every leaf — so it must not be mistaken for
  absent and quietly replaced by the default, which is what the obvious
  `filter(|n| *n > 0)` in `load` would do.

`Settings` is not in `SCHEMA_TYPES`; its TypeScript mirror is hand-written, so this
regenerates no bindings and churns no golden. Confirmed: `cargo test --workspace` is
green with no snapshot diff.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 20:19:28 +07:00
poli0981andClaude Opus 5 a7299c29cb feat(core): pins::suggest, the caller graph::dependent_count never had
M2 built the hard half of PRD P1-2 and stopped one layer short. `dependent_count`
carries the doc comment "for pin auto-suggest (PRD P1-2)" and has had no caller
outside its own test since it was written; `PIN_SUGGEST_THRESHOLD = 5` is documented
"configurable" and is read by nothing. This is the function that uses both.

**A contradiction settled rather than inherited.** `ReverseDeps::build`'s doc said
extra-gated edges are ignored by the guard "while pin auto-suggest may still count
them" — describing an intent nothing implemented, since `dependent_count` delegates
to `dependents_of` and always filtered. Settled in favour of what shipped: a
suggestion counts what actually depends on a package *in this environment*, which is
the same set the guard warns about. Two features disagreeing about one edge rule is
the failure worth avoiding, and it is the whole reason this is Rust rather than a
loop over `requiresDist` in the frontend, which already holds it.

`build_for`, not `build`: without the interpreter a requirement gated on some other
`python_version` counts as in force, and the suggestion would inherit the wrong
answer SP-5 found in the preview.

Takes pins and the threshold by value rather than a `&Store`, for the reason recorded
twice in CLAUDE.md — `Store` is not `Sync`, so a future holding one is not `Send` and
cannot be a Tauri command.

Seven tests, and two of them were checked by breaking the thing under test: swapping
`build_for` for `build` fails the marker case, and `>=` for `>` fails the inclusive
threshold. A threshold of zero returns nothing rather than offering to pin every leaf
in the environment.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 20:19:28 +07:00
poli0981andClaude Opus 5 d19ead6f46 docs(disclosure): pin the commit counts to the tag, not to main
A count written into a file is wrong the moment the file is committed. This page
said 172/163, then 175/166, and both were stale before they were pushed — the edit
that corrected the number was itself the commit that invalidated it.

Pinned to `v1.0.0` instead, which does not move, with the arithmetic done so this
commit is the tag point. The note says why, because the next person to update it
will hit the same thing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
v1.0.0
2026-08-14 19:09:42 +07:00
poli0981andClaude Opus 5 c459711799 docs: thirty-five, not thirty-four
The count is public evidence in an AI disclosure, so being off by one undermines
the thing it is there to demonstrate. The thirty-fourth was `app_info` fetching
twice per mount; the thirty-fifth was `self report-bug`'s stray whitespace, found
by reading its output while writing the CLI guide — no test asserts on that text
and no golden covers it, so nothing else could have caught it.

Commit numbers moved to the re-cut 1.0.0 tag, with a line telling the reader to
re-run the commands rather than trust two figures that go stale immediately.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 19:03:58 +07:00
poli0981andClaude Opus 5 55bfbf5fdc docs(roadmap): decompose four P1-wave items against what already exists
Surveyed the real tree rather than the feature list, and three of the four turn out
to be mostly wiring. The survey is the deliverable — an estimate made from PRD line
items would be wrong in both directions.

**Pin auto-suggest is largely already written and never called.**
`graph::dependent_count` exists, is documented "for pin auto-suggest (PRD P1-2)", and
has no caller outside its own test. So does `PIN_SUGGEST_THRESHOLD = 5`, documented
"configurable" and read by nothing. What is actually missing is a settings key, one
command and a section on PdPins. Recorded with it: do *not* compute this in JS even
though the frontend holds `requiresDist` — the counts depend on marker evaluation and
extra-gated edge exclusion, and a JS copy would drift from the guard that shares
those edges.

**Requirements export is nearly free; import is a parser.** A snapshot's freeze
document already is a requirements.txt, and `Intent::Install { specs }` is the
install-many flow PdSearch already drives. The work is a tolerant line parser —
`-r`/`-c`, `--hash`, extras, markers — and the note that matters is: do not widen
`snapshot::pin_of` to get it. Its narrowness is what makes it the exact complement of
`unrestorable_lines`.

**The cache manager needs its scope corrected before it is estimated.** There are no
log files: `LOG_RETENTION_DAYS` has no reader, the only log is an in-memory ring
buffer, and `logs_tail` is still NOT_YET. So it covers three artefacts, not four —
and `index.db` cannot be a delete target because it holds settings and pins too. It
also introduces the first delete-a-tree primitive in production code, which makes the
under-app_data assertion the real work rather than the UI.

**The command palette is frontend-only and Ctrl+K collides with nothing** — verified
against all ten existing bindings. It is a silent no-op today because `parseInt('k')`
is NaN. Two rules written down so it does not reintroduce solved bugs: refuse while
PANEL_PHASES owns the screen, and refuse behind the legal gate including About's
review mode. Also: write a matcher, do not route palette queries through
`index_search` — that searches 864k package names over IPC, wrong corpus and wrong
cost for thirty actions.

Ends with the ten-place checklist for adding an IPC command, which two of the four
need.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 19:03:58 +07:00
poli0981andClaude Opus 5 0a31700f7f docs(readme): point at the wiki, and say which audience it is for
The wiki is now the user-facing set — Getting Started, Troubleshooting, FAQ, AI
Disclosure — and docs/ is for people reading the code. Saying which is which up
front saves a reader opening ARCHITECTURE.md to find out how to install the thing.

The CLI guide deliberately stays in docs/ and is linked from the wiki rather than
copied into it: it describes the behaviour of a specific version, goes through
branch protection like the code, and a wiki page does neither.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 19:03:58 +07:00
poli0981andClaude Opus 5 ba6f19722e docs: an AI disclosure, and a CLI guide written by running the CLI
**AI disclosure.** PipDock was written with substantial help from Claude Opus 5
(Anthropic, via Claude Code), and the fact was only visible as a commit trailer.
`docs/AI-DISCLOSURE.md` is the full statement — model, vendor, period, what it wrote
(source, tests, debugging, the VI catalogue), what review actually meant, what was
not delegated, and how to verify any of it from `git log`. 172 commits, 163 with the
trailer.

It also says the thing worth saying: a green suite was never sufficient. Thirty-four
defects reached or nearly reached `main` and not one was caught by the suite that was
green at the time.

Three surfaces, because three different people look in three different places: the
README for someone browsing the repo, `docs/` for someone reading the code, and the
**About tab** for someone who installed the app and will never open GitHub. The last
one needed keys in both catalogues.

**`docs/CLI-GUIDE.md`.** CLI-SPEC is the contract; this is what you type. Written
against `pipdock 1.0.0` by running every command rather than by reading the spec —
which is how the exit codes in it were confirmed (`PD-ENV-001` really is 3, `schema`
on an unknown type really is 1) rather than copied.

That also turned up a defect: `self report-bug` printed **fourteen stray spaces** in
the middle of a sentence, because a multi-line string literal keeps its source
indentation. Nobody had read the output.

Also: `About.png` -> `about.png` so the seven screenshots share one convention, and
the About shot joins the README.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 19:03:58 +07:00
poli0981andClaude Opus 5 d56ad93564 docs: Phase 4 closed, and the checklist that says so
All six open items are done, recorded with what was actually exercised rather than
"the charter was run": three machines (a real Windows 11 box that had never run
PipDock, Windows Sandbox, a Windows 10 VM), no SmartScreen prompt on any — with the
caveat that reputation is per-hash and unsigned binaries can still warn a future
user, which is why the checksum instructions stay. The three owed charter items plus
a non-ASCII Windows *username*, which is a different case from the non-ASCII path
because the username is in %LOCALAPPDATA% and therefore in the data root, the logs
and the tools venv.

The icon is a decision now, not a deferral. It was called a placeholder because
nobody had chosen it.

RELEASE-CI §5 ticks all eight, and three of the last four turned out to be already
done and never ticked — CodeQL default setup was already not-configured, Discussions
were already on, the secrets were set today. §2's "main protected" claim is true for
the first time; its exact settings, the reason CI / Integration is excluded (a
paths-filtered required check never starts, so it blocks forever), the two contexts
owned by the ops repo, and how to unwedge it are all written down.

Also recorded: the four things Phase 4 found that were not on its list, and the three
rules the About tab settled. Post-1.0 gains the Third-Party-Notices generation
deferred here, a screenshot re-capture, and the OSV host the Security tab will need.

Two long-standing self-contradictions fixed: NOT_YET is two (lib.rs is the
authority; ROADMAP and CLAUDE.md each said two in one paragraph and three or four in
another), and 15 of UI-SPEC §6's 16 components exist, not 16.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 17:32:20 +07:00
poli0981andClaude Opus 5 196f0408e4 chore(release): 1.0.0
Five places, and they have to move together — a stale lockfile is exactly how `main`
has been red since 3eeda05. `cargo metadata --locked` is the check that they did, and
it passes.

The 58 CLI goldens do not churn: `golden.rs` filters any x.y.z to [VERSION], which is
why that filter was added.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 17:32:20 +07:00
poli0981andClaude Opus 5 401c917f20 docs(readme): seven screenshots and a name without a space in it
The screenshots were captured on 2026-08-14 against the installed build and staged
without ever being committed or referenced. The README had no image beyond its five
badges — a GUI whose readme shows no GUI.

`setting (2).png` -> `settings.png`. A space and a `(2)` in an asset path has to be
percent-encoded in Markdown and is a filename nobody meant to publish.

Installed and Code Health lead, because they are the two screens that show what the
tool is for; the other five are behind a `<details>` so the README stays scannable.
Alt text says what each shot demonstrates rather than repeating the tab name.

Caveat worth knowing: these predate the About tab, so the sidebar in them has eight
entries and 1.0 has nine.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 17:32:20 +07:00
poli0981andClaude Opus 5 57c365e36a feat(ui): About — what PipDock is, and a way back to the documents you accepted
UI-SPEC §4 has specified *Legal & About* since the spec was written, as a section
inside Settings, and four milestones shipped without it. That is what folding a
read-only surface into a screen of controls does. It is now the ninth tab.

**The ninth tab cost nothing.** `App.tsx` reads `NAV_KEYS[key - 1]`, so appending
`about` made it Ctrl+9 without moving one existing binding. UI-SPEC's warning was
about *inserting* — which is still true, and is still why Snapshots is a mode of
Environments: it would have to sit beside Environments to read as related. The
comments in four files said "a ninth entry would renumber Ctrl+1..8"; they now say
what the rule actually is.

Contents: what PipDock does and what it does not collect; version and the legal-docs
hash from `app_info` — a command that has existed since M1 with no consumer, so the
version on screen cannot drift from CARGO_PKG_VERSION; the SPDX identifier
`GPL-3.0-only` rather than the looser "GPL-3.0" elsewhere; a control that puts the
gate back; and contact.

**Addresses are copied, not opened.** `mailto:` would widen the opener capability by
a whole URL scheme, and the scope's real job is bounding the two call sites that pass
data — one of which hands over a URL that came out of ruff's JSON. Clipboard-write is
already granted, works with no mail client, and the address has to be on screen
anyway. Only `https://poli0981.dev/*` was added, for the links page. They are also TS
constants rather than catalog entries: an address is data (I18N §2), and a catalog is
a thing a translator is invited to change.

**`review` is a flag of its own, not `accepted = false`.** Re-using the latter was
one line and would have made a review indistinguishable from a revocation — offering
Accept, and a Decline that closes the application, to someone who wanted to re-read
their privacy policy. The gate takes a presentational prop instead; first-run
rendering is untouched and `PdLegalGate.test.tsx` (its first test, ever) pins that.

Two things found by running rather than by the suite:

- `app_info` fired **twice** per mount under `npm run dev`. StrictMode's doubling is
  dev-only, but it drew attention to the real one: `key={nav}` remounts `<main>`, so
  every visit to About was a fresh call for a value baked in at compile time. Now
  cached per process in `useAppInfo`. Verified against the bridge log: one call.
- The whole seam — About, re-open, Ctrl+3 refused behind the modal, Close, back on
  About — with zero IPC calls, confirming consent is never touched.

VI catalog complete and checked in the running app; the parity gate gets the rest.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 17:32:20 +07:00
poli0981andClaude Opus 5 10691a117a fix(ui): a shortcut that fires behind a modal, and three neighbours
Four defects found while reading App.tsx for the About tab. None was reported;
all four are the kind that look like nothing until they don't.

**Ctrl+N never refused while a plan owned the screen.** `App.tsx` returned early
on `guardOpen` only, and `PANEL_PHASES` excludes `guard` on purpose — the two sets
are disjoint, so guarding on one guarded neither. The sidebar was disabled and the
panel kept rendering, so nothing looked wrong until the plan finished and dropped
the user on a tab they never chose. UI-SPEC §8 has asserted the opposite since S3.

**Ctrl+N also fired behind the legal gate.** The keydown effect is registered above
the `accepted === false` early return, so the listener was live while the modal was
up. Harmless today because nothing renders underneath; not harmless once About can
put the gate back on screen.

**Four call sites opened URLs with `void openUrl(...)`.** `opener:allow-open-url` is
scoped, so a URL outside the allowlist rejects — and a discarded rejection means
nothing opens and nothing says so. SECURITY §4 names that silence as the reason the
allowlist is documented in prose; this is the same fact from the UI side.
`PdLegalGate` handled it by hand. The rule is now `useOpenExternal`, and the sharp
case is `PdHealthReport`'s rule link: `finding.url` comes out of ruff's own JSON and
is the only URL in the app derived from a third-party tool's output — precisely what
`https://docs.astral.sh/*` exists to bound. Its `?? ''` was papering over a narrowing
TypeScript loses inside a closure, and handed the opener an empty string.

**`reportBugUrl` was mocked with the wrong shape.** It resolved a bare string where
the wrapper returns `BugReportLink { url, log }`, so any test clicking *Copy full
log* asserted against `writeText(undefined)` and agreed with itself. A mock of the
wrong shape is worse than none: it makes the seam it covers look tested.

`REPO` moves to `components/legal.ts` with the five-document list, ahead of About
needing both. 15 files, 145 tests still green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 17:32:20 +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 d765140c1c docs(legal): the self-updater the privacy policy still described, and the folder it told you to delete
Two of these are defects a user could act on.

`d829c4f` deleted the self-updater on 2026-07-29 and updated THIRD-PARTY-NOTICES,
but not PRIVACY-POLICY — which has since told users PipDock connects to GitHub
"checking for and downloading PipDock's own updates". The only reqwest client in
the tree allows two redirect hosts (index/mod.rs), neither of them GitHub.

Worse: §2 named `%LOCALAPPDATA%\PipDock\` as the folder to delete for "a complete
reset". Phase 4 moved the data root to `data\` precisely because the program is
installed in the parent, so following the shipped privacy policy uninstalled the
application. SECURITY §8 records the move; the policy never got it.

THIRD-PARTY-NOTICES was wrong in both directions. It credited specta/tauri-specta,
which the project deliberately does not use (bindings.rs says why), and omitted
reqwest, sha2, schemars, thiserror, jiff, tokio-util, winreg, win32job, three of
the four Tauri plugins and @tanstack/react-virtual. Licence fields verified against
the vendored crates rather than assumed. Its header also claimed regeneration by
`cargo about` + `license-checker` into a `licenses/` directory — no about.toml, no
such directory, no such step in release.yml — so the claim now describes what is
actually done.

Smaller: pip-audit and the OSV database are named as if in use; 1.0 ships neither.
Version headers move together so the set reads as one revision.

This bumps PIPDOCK_LEGAL_DOCS_HASH, so the first-run gate reappears once for
existing users. That is the mechanism working, not a regression.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 17:32:20 +07:00
poli0981andClaude Opus 5 2f81b0c6ca fix(build): the lockfile edge that made every cargo job fail
`main` has been red since 3eeda05. `Cargo.lock` carried a dependency edge to
`thiserror 2.0.19` while its own package entry said `2.0.20` — a lockfile Cargo
wants to repair and `--locked` forbids repairing, so every cargo job in every
workflow died before compiling a crate:

    error: cannot update the lock file ... because --locked was passed to prevent this

The Dependabot bump (b4ab2d9) moved the package entry; 2abfef6 touched the file
afterwards and the stale edge survived. CI had gone green on a base predating
the bump, which is the same shape as the ruff-pin defect recorded in P4.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 17:32:20 +07:00
poli0981andClaude Opus 5 3eeda059c8 fix(ui): a hand-written fixture that npm test accepted and tsc did not
CI's Node job failed on the test I had just added: `TS2322` on an `ExecutionOutcome` literal
that was missing `appVersion` and carried three fields `SnapshotMeta` does not have. Vitest
does not typecheck, so `npm test` passed — and I ran the suite and the linter after adding the
file but **not `npm run typecheck`**, which is the one gate that could see it.

Now taken from `snapshot_list.json`, which is the pattern the rest of the suite already uses
and the reason it exists: a fixture serialized from the real Rust type cannot drift from it,
and a literal typed by hand can be wrong in three ways at once.

Also records the Phase 4 state for whoever picks this up: what the pipeline can now do, and
the six things still open — a genuinely clean machine, SmartScreen, the rest of the manual
charter, the icon, the version and RC tag, and README screenshots. CLAUDE.md gains the two
rules this stretch established: building and installing are their own test tier, and the seam
between a tested component and its untested parent is where bugs live.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 22:08:38 +07:00
poli0981andClaude Opus 5 be0f8caa18 docs: the shell rules, each with the number that proves it
UI-SPEC gains the three rules the first installed build established, and each is written with
what was measured rather than what was intended.

Single instance: five launches, **one process, one window** — checked against the installed
build after rebuilding, because a plugin registered in the wrong order fails silently by
simply not being reached.

Maximize: the window style no longer carries `WS_MAXIMIZEBOX` and still carries
`WS_THICKFRAME`, so it is bounded without being frozen — read off the real `HWND` rather than
inferred from the config that asked for it.

Sidebar-disabled-during-a-plan is recorded beside §8's existing `Ctrl+1..8` rule, since they
are the same rule for two input devices and a reader who finds only one will assume the other
was an oversight.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 22:08:38 +07:00
poli0981andClaude Opus 5 2abfef6a7c fix(ui): one window, one way back, and a sidebar that stops mid-plan
Four things from the first real click-through of the installed build.

**Two "Back to packages" buttons after a successful run.** `PdSummarySheet` renders `plan.done`
from its `onDone`, and the panel rendered a second one beneath it. The panel's is now shown
only when there is no sheet — a run that failed before producing an `ExecutionSummary` has an
error row and nothing else, and without a button that phase is a dead end.

Worth naming *why* no test caught it: `PdSummarySheet` has its own tests and `PdPlanPanel` had
none, so the two had never been rendered together. `PdPlanPanel.test.tsx` now does exactly
that, and it was checked against the bug — reverting just the panel change makes it fail with
"expected 2 to have length 1". Adding it exposed a second gap: `ipcMock` had no `reportBugUrl`,
which `PdErrorRow` asks for on mount, so any screen containing an error was untestable.

**No single instance.** Five launches gave five windows — which is five `AppState`s over one
machine: five `Sessions` slots, each certain it owned the mutation in flight, and five
`PD-RES-003` guards that cannot see each other. `tauri-plugin-single-instance` is registered
**first**, before any plugin that could take a lock, and the handler unminimizes before
focusing: focusing a minimized window leaves it minimized, and the user's second launch
appears to do nothing.

Added without the `deep-link` feature `cargo add` selects by default — PipDock registers no
deep links, and it pulls three crates into the audit surface for nothing.

**The sidebar is disabled while a plan owns the content area.** Navigating away left the plan
parked in Rust with nothing on screen driving it, and the next Update answered `PD-RES-003`
about a plan the user could no longer see. `App.tsx` already refuses `Ctrl+1..8` while the
guard dialog is open; this is that rule applied to the panel and to the mouse.

**The window is bounded and cannot be maximized.** `maxWidth`/`maxHeight` at 1600×1100 with
`maximizable: false` and `fullscreen: false`. The layout is a fixed sidebar plus one scrolling
column; stretched across a 4K panel it is a column of text with a metre of empty surface.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 22:08:38 +07:00
dependabot[bot] b4ab2d94ce build(deps): Bump the cargo-minor-patch group across 1 directory with 3 updates
Bumps the cargo-minor-patch group with 3 updates in the / directory: [async-trait](https://github.com/dtolnay/async-trait), [thiserror](https://github.com/dtolnay/thiserror) and [clap](https://github.com/clap-rs/clap).


Updates `async-trait` from 0.1.91 to 0.1.92
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.91...0.1.92)

Updates `thiserror` from 2.0.19 to 2.0.20
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.19...2.0.20)

Updates `clap` from 4.6.4 to 4.6.6
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.6.4...clap_complete-v4.6.6)

---
updated-dependencies:
- dependency-name: async-trait
  dependency-version: 0.1.92
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor-patch
- dependency-name: thiserror
  dependency-version: 2.0.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor-patch
- dependency-name: clap
  dependency-version: 4.6.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-13 22:04:59 +07:00
dependabot[bot] f3ac703382 build(deps-dev): Bump the npm-minor-patch group across 1 directory with 6 updates
Bumps the npm-minor-patch group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) | `7.0.0` | `7.0.1` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.1.2` | `26.2.0` |
| [eslint](https://github.com/eslint/eslint) | `10.8.0` | `10.8.1` |
| [eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh) | `0.5.3` | `0.5.4` |
| [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.65.0` | `8.66.0` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `8.2.0` | `8.2.1` |



Updates `@testing-library/jest-dom` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/jest-dom/compare/v7.0.0...v7.0.1)

Updates `@types/node` from 26.1.2 to 26.2.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint` from 10.8.0 to 10.8.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.8.0...v10.8.1)

Updates `eslint-plugin-react-refresh` from 0.5.3 to 0.5.4
- [Release notes](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/releases)
- [Changelog](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/compare/v0.5.3...v0.5.4)

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

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

---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
  dependency-version: 7.0.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: "@types/node"
  dependency-version: 26.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: eslint
  dependency-version: 10.8.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: eslint-plugin-react-refresh
  dependency-version: 0.5.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: typescript-eslint
  dependency-version: 8.66.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: vite
  dependency-version: 8.2.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-13 22:04:49 +07:00
poli0981andClaude Opus 5 9fee1cd077 fix(ci): a bundling concern had leaked into every compile
CI caught two things the previous commits broke, and the first is pointed: I declared the CLI
sidecar in `tauri.conf.json`, and **`tauri-build` validates `externalBin` at build-script
time** — so plain `cargo clippy` and `cargo test` on `pipdock-app` began failing in a fresh
clone with *"resource path `binaries\pipdock-x86_64-pc-windows-msvc.exe` doesn't exist"*.

It passed locally only because I had already staged the file. That is exactly the "works on
my machine" failure the commit that introduced it claimed to be preventing.

`externalBin` moves to `src-tauri/tauri.bundle.conf.json`, merged with `--config` only when
bundling. Compiling the app does not need the sidecar; bundling it does, and the config now
says so. Verified the way it should have been the first time: **`src-tauri/binaries/` deleted**,
then `cargo clippy -p pipdock-app --all-targets` and `cargo test --workspace` both clean —
and `npm run bundle` from that same state stages the sidecar and produces two installers, the
NSIS payload still carrying `pipdock-app.exe` and `pipdock.exe`.

The whole recipe now lives in one `npm run bundle` script the workflow calls, so nobody has
to remember that `--locked` goes after `--` or that the overlay exists. RELEASE-CI §3.1
records both traps rather than just the command.

Second breakage: `ci-integration.yml` hardcoded `%LOCALAPPDATA%\PipDock\tools` in three
places — it quarantines `ruff.exe` there to prove `PD-HLT-001` — and the data root had moved
under `data\`. A test that reaches into a path by hand is a test that has to be told when the
path moves.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 20:59:43 +07:00
poli0981andClaude Opus 5 62308add6a docs: what the first real install found, and what it could not reach
The Phase 4 record now carries all three defects the bundle exposed, the uninstall behaviour
that was tested rather than assumed, and — the part that matters most — an explicit list of
what was **not** verified.

Three things are still owed and need a human at the keyboard: the OS folder picker, a ruff
rule link (the `docs.astral.sh` allowlist entry fails *silently* if wrong), and the fix
dialog. The screenshot tooling resolves the installed app to a virtualized sandbox path and
masks its window, so it could not be driven from here. SmartScreen was not exercised either —
the installer was run scripted, and SmartScreen is an Explorer behaviour, so a scripted run
proves nothing about it.

And the criterion itself is only approximated: this machine has run PipDock before, so
isolating the app-data root is not the same as a machine that never has.

Charter progress recorded with numbers rather than ticks: a non-ASCII project path
(`E:\sp5\dự án tiếng việt`) runs all three Code Health tools with the path intact, and
`pipdock list` is 1.1 s over a 145-package venv and 1.5 s over a 352-package system Python.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 20:59:43 +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