Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .planning/REQUIREMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Requirements for IPFS infrastructure milestone. Each maps to roadmap phases.
- [x] **SHARE-09**: Write-share recipients see upload/mkdir toolbar and full context menu (rename, delete) in shared folders
- [x] **SHARE-10**: Write operations in shared folders use unwrapped IPNS key with 30s sync polling and withConflictRetry for multi-writer coordination

## v1.1 Hardening Requirements (Phases 50–58)
## v1.1 Hardening Requirements (Phases 50–60)

Tech-debt, security, and reliability remediation surfaced during v1.1 verification and audits. Reopened into Milestone 3 (v1.1) on 2026-06-19.

Expand All @@ -116,6 +116,8 @@ Tech-debt, security, and reliability remediation surfaced during v1.1 verificati
- **HARD-07**: FUSE & IPNS durability hardening — per-file/bin IPNS `Conflict` re-resolve-and-retry (not record-as-success), write-path offset/size/duplicate-name guards (EINVAL/EFBIG/EEXIST), key-wrap/metadata-decode error propagation, inode stable-ID identity reset, and `spawn_metadata_publish` zeroization (macOS+Windows lockstep) — the pre-existing findings surfaced byte-identical by the Phase 55 / PR #538 review (Phase 56)
- **HARD-08**: API CID/provider hardening & module dedup — one shared CID regex + MaxLength across RegisterCidDto/UnpinDto, URL-encoded CID interpolation in LocalProvider, a leaf IpfsProviderModule replacing the triplicated factory, and a shared withCidLock/refcountAndMaybeUnpin unpin primitive (Phase 57)
- **HARD-09**: IPNS signature-verify coverage — CBOR cid/sequence binding + a Rust `resolve_ipns_verified` chokepoint covering all resolve sites, non-CAS embedded-sequence validation, web/sdk-core resolve dedup, and shared cross-language verify test vectors; the S1/S2 residue of Phase 51 / PR #529 (Phase 58)
- **HARD-10**: FUSE IPNS verify/publish hardening & cleanup — propagate the residual swallowed file IPNS key-wrap error (no FilePointer published with `ipns_private_key_encrypted: None`), trigger file re-resolution on a changed `file_meta_ipns_name` (not just `modified_at`), carry the legacy IPNS response in `VerifyError::Legacy` (avoid a second raw resolve), drop the dead `publish_with_cas_retry` journal_entry seam + content_ops dead bindings, and unify the first-publish embedded-sequence convention (FUSE vs SDK) with TEE re-sign verification — the Phase 56/58 long-tail surfaced by the 2026-06-23 pending-todo audit (Phase 59)
- **HARD-11**: IPNS verification cross-layer closeout — route the remaining apps/desktop Tauri `resolve_ipns` sites through the verified resolver (scoped fail-closed parity), and recover the per-operation IPNS signature-verification CPU cost on the API publish/resolve hot path via a safe short-circuit / short-TTL verified-record cache that still fully verifies untrusted / DHT-sourced records (Phase 60)

## v1.2 Requirements

Expand Down Expand Up @@ -230,18 +232,21 @@ Which phases cover which requirements. Updated during roadmap creation.
| HARD-07 | Phase 56 | Planned |
| HARD-08 | Phase 57 | Planned |
| HARD-09 | Phase 58 | Planned |
| HARD-10 | Phase 59 | Planned |
| HARD-11 | Phase 60 | Planned |

**Coverage:**

- v1.1 requirements: 69 total
- Mapped to phases: 69
- Unmapped: 0
- v1.1 hardening requirements: 9 total (HARD-01..09), mapped to Phases 50–58, all Planned
- v1.1 hardening requirements: 11 total (HARD-01..11), mapped to Phases 50–60, all Planned

---

_Requirements defined: 2026-03-07_
_Last updated: 2026-06-19 — PERF-01..04 directly verified in 18-VERIFICATION.md (PERF-03 via accepted override: Kubo v0.34 emits no libp2p metrics upstream); previously orphaned in the v1.1 milestone audit, now closed. 66/66 satisfied._
_Last updated: 2026-06-19 — v1.1 reopened with a hardening block; added HARD-01..06 mapped to Phases 50–55._
_Last updated: 2026-06-21 — added HARD-07..09 (deferred-findings hardening from the Phase 50–55 / PR #529 + #538 reviews) mapped to Phases 56–58._
_Last updated: 2026-06-23 — added HARD-10..11 (FUSE verify/publish long-tail + IPNS verification cross-layer closeout, from the 2026-06-23 pending-todo audit) mapped to Phases 59–60._
_Last updated: 2026-06-11 by milestone audit (IPNS-02/03, SDK-08/09 checkboxes reconciled with phase verifications)_
43 changes: 42 additions & 1 deletion .planning/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -1035,12 +1035,52 @@ Plans:

Verification gate: full SDK E2E suite (local; redis 6380), apps/api specs, `cargo test`.

### Phase 59: FUSE IPNS Verify/Publish Hardening and Cleanup

**Goal:** Close out the Phase 58 IPNS verification long-tail on the FUSE crate — finish the two partially-done durability fixes and clear the dead-code/cleanup debt across the same durability-critical files (`verify.rs`, `events.rs`, `metadata.rs`, `content_ops.rs`, `fs.rs`, `inode.rs`, `publish.rs`, `replay.rs`), so the verify/publish/CAS paths carry no swallowed errors, no dead seams, and a single first-publish embedded-sequence convention. Touches durability-critical publish paths, so full SDK-E2E + desktop-E2E gated.
**Requirements**: HARD-10
**Depends on:** Phase 58 (resolve_ipns_verified chokepoint), Phase 56 (FUSE durability baseline)
**Plans:** TBD (run /gsd-plan-phase 59)

Scope (captured todos):

- [ ] RESIDUAL of HARD-07 (most fixed by PR #543): FUSE/IPNS robustness finding #3 — `fs.rs:225-227` File branch `wrap_key(...).ok()` swallows a key-wrap error and publishes a FilePointer with `ipns_private_key_encrypted: None`; propagate the error like the sibling Folder branch (`fs.rs:153-157`) — `2026-06-21-fuse-ipns-robustness-findings-from-pr538-review.md`
- [ ] RESIDUAL of HARD-07 (folder side fixed by PR #543): FUSE inode stable-ID — file-side re-resolution must also trigger on a changed `file_meta_ipns_name`, not just `modified_at` (`inode.rs:574`), so a file can't keep stale CID/keys — `2026-06-20-fuse-inode-stable-id-identity-reset.md`
- [ ] Carry the legacy IPNS response in `VerifyError::Legacy` instead of a second raw resolve — `2026-06-22-verify-rs-carry-legacy-response.md`
- [ ] FUSE CAS helper dead `journal_entry` param + `content_ops` dead-binding cleanup — `2026-06-22-fuse-cas-helper-dead-param-and-content-ops-cleanup.md`
- [ ] Phase 58 IPNS verify minor simplify/cleanup follow-ups — `2026-06-22-phase58-simplify-cleanup.md`
- [ ] Unify first-publish IPNS embedded-sequence convention (FUSE 0 vs SDK 1) + verify TEE re-sign path [bridges to Phase 60] — `2026-06-22-ipns-first-publish-sequence-convention.md`

Plans:

- [ ] TBD (run /gsd-plan-phase 59 to break down)

Verification gate: `cargo test` (fuse + winfsp feature sets), winfsp Windows CI, full SDK E2E (local; redis 6380), desktop E2E (dispatch-gated).

### Phase 60: IPNS Verification Cross-Layer Closeout: Desktop and API

**Goal:** Extend verified IPNS resolution beyond the FUSE crate to the remaining desktop Tauri resolve sites, and recover the per-operation IPNS signature-verification CPU cost on the API publish/resolve hot path — without weakening the zero-knowledge integrity model (untrusted / DHT-sourced records must still be fully verified).
**Requirements**: HARD-11
**Depends on:** Phase 58 (resolve_ipns_verified chokepoint), Phase 59 (unified first-publish sequence convention)
**Plans:** TBD (run /gsd-plan-phase 60)

Scope (captured todos):

- [ ] Route `apps/desktop/src-tauri` `resolve_ipns` sites (`prepopulate.rs` ~43/110/177/236, `vault.rs` ~21/250) through a verified resolver with scoped fail-closed parity — `2026-06-22-desktop-resolve-ipns-verified-coverage.md`
- [ ] Cache / short-circuit redundant IPNS signature verification on the API publish/resolve hot path (`apps/api/src/ipns/ipns.service.ts`): skip re-verifying DB-authoritative records this server just signed/persisted, and/or a short-TTL verified-record cache keyed by `(ipnsName, sequenceNumber, signature)`; MUST still verify externally-sourced / DHT records (someguy resolves) — `2026-06-23-cache-redundant-ipns-signature-verification-hot-path.md`

Plans:

- [ ] TBD (run /gsd-plan-phase 60 to break down)

Verification gate: apps/api jest specs, full SDK E2E, desktop E2E (dispatch-gated); a measured per-op verification-cost recovery (benchmark/prototype) for the API short-circuit.

---

## Progress

**Execution Order:**
Phases execute in numeric order: 18 -> 19 -> 19.1 -> 19.2 -> 20 -> 21 -> 22 -> 23 -> 24 -> 25 -> 26 -> 27 -> 28 -> 29 -> 30 -> 31 -> 32 -> 33 -> 34 -> 35 -> 36 -> 37 -> 38 -> 39 -> 40 -> 41 -> 42 -> 43 -> 44 -> 45 -> 46 -> 47 -> 48 -> 49 -> 50 -> 51 -> 52 -> 53 -> 54 -> 55 -> 56 -> 57 -> 58
Phases execute in numeric order: 18 -> 19 -> 19.1 -> 19.2 -> 20 -> 21 -> 22 -> 23 -> 24 -> 25 -> 26 -> 27 -> 28 -> 29 -> 30 -> 31 -> 32 -> 33 -> 34 -> 35 -> 36 -> 37 -> 38 -> 39 -> 40 -> 41 -> 42 -> 43 -> 44 -> 45 -> 46 -> 47 -> 48 -> 49 -> 50 -> 51 -> 52 -> 53 -> 54 -> 55 -> 56 -> 57 -> 58 -> 59 -> 60

| Phase | Milestone | Plans Complete | Status | Completed |
| ----------------------------------------- | --------- | -------------- | -------- | ---------- |
Expand Down Expand Up @@ -1094,3 +1134,4 @@ _Last updated: 2026-06-19 — reopened v1.1 with hardening block; added phases 5
_Total M1.1 phases: 18 (18-35 complete) | Concern resolution: 5 phases | Post-milestone: 5 phases (36-40) | Gap closure: 3 phases (42-44) | Hardening block: 6 phases (50-55)_
_Last updated: 2026-06-21 — added deferred-findings hardening Phases 56–58 (HARD-07..09): FUSE/IPNS durability, API CID/provider hardening, IPNS signature-verify coverage; sourced from the Phase 50–55 / PR #529 + #538 review backlog. Filed resolved todos #5 (IPNS S1/S2/S3 → #529) and #10 (Tier-1/2 refactor → #538) to completed/._
_Last updated: 2026-06-22 — Phase 58 planned: 4 plans (58-01 CBOR binding + resolve_ipns_verified chokepoint, 58-02 non-CAS D-09 sequence gate, 58-03 web/sdk-core resolve dedup, 58-04 shared cross-language verify vectors) in 2 waves (W1: 58-01/02; W2: 58-03/04 depends_on 58-01)._
_Last updated: 2026-06-23 — added Phases 59–60 (HARD-10..11) from the 2026-06-23 pending-todo audit: 59 FUSE IPNS verify/publish hardening + cleanup (the Phase 56/58 long-tail, incl. 2 partial residuals), 60 IPNS verification cross-layer closeout (desktop verified-resolve + API hot-path verify caching). Not yet planned._
2 changes: 2 additions & 0 deletions .planning/STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ Recent for v1.1:
- Phase 56 added 2026-06-21: FUSE & IPNS Durability Hardening (HARD-07) — per-file/bin IPNS Conflict re-resolve/retry, write-path EINVAL/EFBIG/EEXIST guards, key-wrap/decode error propagation, inode identity reset, spawn_metadata_publish zeroization; the pre-existing findings surfaced byte-identical by the PR #538 / Phase 55 refactor review (absorbs the superseded per-file-IPNS-conflict todo)
- Phase 57 added 2026-06-21: API CID/Provider Hardening & Module Dedup (HARD-08) — shared CID_REGEX+MaxLength across RegisterCidDto/UnpinDto, URL-encoded LocalProvider pin/cat URLs, leaf IpfsProviderModule, shared withCidLock/refcountAndMaybeUnpin
- Phase 58 added 2026-06-21: IPNS Signature-Verify Coverage (HARD-09) — CBOR cid/sequence binding + Rust resolve_ipns_verified chokepoint, non-CAS embedded-sequence validation, web/sdk-core resolve dedup, shared verify test vectors; the S1/S2 residue of Phase 51 / PR #529. Master IPNS-sig todo (2026-06-13) and large-file-refactor Tier-1/2 todo (2026-06-19) filed to completed/, the latter with its Tier-3 residue re-captured.
- Phase 59 added 2026-06-23: FUSE IPNS Verify/Publish Hardening & Cleanup (HARD-10) — the Phase 56/58 FUSE long-tail from the 2026-06-23 pending-todo audit: the 2 partial HARD-07 residuals (fs.rs File-branch wrap_key error propagation; inode file-side re-resolution on changed file_meta_ipns_name), VerifyError::Legacy carrying the legacy response, CAS dead journal_entry param + content_ops dead-binding cleanup, phase58 simplify follow-ups, and unifying the first-publish embedded-sequence convention (bridges to 60). Sourced from 6 captured todos.
- Phase 60 added 2026-06-23: IPNS Verification Cross-Layer Closeout — Desktop + API (HARD-11) — route remaining apps/desktop Tauri resolve_ipns sites through the verified resolver (scoped fail-closed), and recover per-op IPNS verify CPU on the API publish/resolve hot path via a safe short-circuit / short-TTL verified-record cache that still fully verifies untrusted/DHT records. Sourced from 2 captured todos: the API verify-caching todo (migrated from issue #549) and the desktop verified-resolve coverage todo.

### Open Concerns

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ files:
- apps/api/src/ipfs/pending-unpin/pending-unpin.module.ts
---

> **Resolved by PR #541** (merged 2026-06-22). Verified already-fixed in the 2026-06-23 pending-todo audit (independent adversarial re-check confirmed). Archived from pending.

## Problem

The IN-04 "accepted circular-dependency" comments in `ipfs.module.ts`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ files:
- apps/api/src/ipfs/pending-unpin/pending-unpin.processor.ts
---

> **Resolved by PR #541** (merged 2026-06-22). Verified already-fixed in the 2026-06-23 pending-todo audit (independent adversarial re-check confirmed). Archived from pending.

## Problem

The `pg_advisory_xact_lock(hashtext($1)::bigint)` lock SQL plus the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ files:
- apps/api/src/ipfs/providers/local.provider.ts
---

> **Resolved by PR #541** (merged 2026-06-22). Verified already-fixed in the 2026-06-23 pending-todo audit (independent adversarial re-check confirmed). Archived from pending.

## Problem

`LocalProvider.unpinFile` (and the symmetric `pin/add` path) builds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ files:
- apps/api/src/ipfs/dto/unpin.dto.ts
---

> **Resolved by PR #541** (merged 2026-06-22). Verified already-fixed in the 2026-06-23 pending-todo audit (independent adversarial re-check confirmed). Archived from pending.

## Problem

`UnpinDto` validates CIDv0 as `Qm[1-9A-HJ-NP-Za-km-z]{44}` (exactly 46 chars,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ files:
- packages/sdk-core/src/folder/registration.ts
---

> **Resolved by PR #543** (merged 2026-06-22). Verified already-fixed in the 2026-06-23 pending-todo audit (independent adversarial re-check confirmed). Archived from pending.

## Context

A second CodeRabbit review of PR `#538` (phase 55 refactor) surfaced 6 more findings (3 Major,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ files:
- crates/fuse/src/events.rs
---

> **Resolved by PR #543** (merged 2026-06-22). Verified already-fixed in the 2026-06-23 pending-todo audit (independent adversarial re-check confirmed). Archived from pending.

## Context

CodeRabbit flagged `spawn_metadata_publish` (and siblings) in `crates/fuse/src/metadata.rs:85-86` taking `folder_key: Vec<u8>` and `ipns_private_key: Vec<u8>` as plain `Vec<u8>` rather than `zeroize::Zeroizing<Vec<u8>>`, so the key material is not cleared on drop. `events.rs` already wraps `folder_key` in `Zeroizing`, so the pattern is inconsistent.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Desktop E2E recycle-bin: stronger bin-published assertion (API round-trip)

Source: Phase 56 ship — diagnosing the Windows desktop E2E failure.
---
created: 2026-06-22T00:00:00.000Z
title: "Desktop E2E recycle-bin: stronger bin-published assertion (API round-trip)"
area: test-infra
severity: low
source: Phase 56 ship — diagnosing the Windows desktop E2E failure
files:
- tests/desktop-e2e/scripts/test-recycle-bin.sh
- tests/desktop-e2e/scripts/test-recycle-bin.ps1
---

## Done in Phase 56

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# FUSE CAS helper dead param + content_ops dead-binding cleanup
---
created: 2026-06-22T00:00:00.000Z
title: FUSE CAS helper dead param + content_ops dead-binding cleanup
area: refactor
severity: low
source: Phase 56 simplify review (gsd-code-reviewer pass during ship-phase 56)
files:
- crates/fuse/src/metadata.rs
- crates/fuse/src/content_ops.rs
- crates/fuse/src/fs.rs
---

Source: Phase 56 simplify review (gsd-code-reviewer pass during ship-phase 56).
Deferred because these touch the durability-critical IPNS CAS publish path and would
require changing the durability test seam — out of proportion to a ship-time cleanup.

Expand Down
Loading