gunk-dev/the-valley
the-valley:bd-3826f40bugopen

A project withdrawn from the web stays published while any other read fails the pass

State
free to start
Created
2026-10-26 by contributor
Source
2026-10-26, review of the web UI on main at ac8c5f17
Blocked by

Body

`valley-web-publish` fails its whole pass on any read failure, and the receiver never expires an export it has accepted (`webui/export/manifest.go`). So a project withdrawn from the web, or an instance declaration emptied in a hurry, stays served for as long as any other project's read keeps failing.

The failure paths:
- `main.go` returns before anything is sent.
- `valley.go` fails on any listed project's cache, and needs `plan --all` and `pending --all` to cover every project, private ones included.
- `visibility.go` fails on a `cue` run that does not finish.

Inputs within the graph limits (`knot/contract.go`) reach these failures:
- The comment limit is per graph, not per knot. Comments on one knot can push its `knot show` past `maxValleyOutput`, and comments are never deleted, so the failure is permanent.
- A large public graph needs more memory for Build, Encode and Digest than the unit's default `MemoryMax`.
- Lists and edges across thousands of knots can push `plan --all` past its output bound (arithmetic from the limits, not run).

A fix:
- The pass decides visibility first. That needs no CLI and is cheap.
- When the served set holds a project that is no longer public, the pass publishes without it even if other reads fail.
- `plan`, `pending` and knot reads are scoped to the projects the policy allows, so a private project can neither break a pass nor be read by one.
- The receiver has a documented kill switch, or a bound on how long an export is served.

Fixed when a withdrawal reaches the receiver while another project's read fails, and a test covers exactly that case, including an oversized private graph.

Source: 2026-10-26, review of the web UI as landed on main at `ac8c5f17`.

Comments

  1. contributor2026-10-26 23:53 UTC
    2026-10-26: oc-7ff8899 reads grants before any project and reads only projects granted to anyone, so a private project can no longer fail a pass, and emptying the instance's grants publishes an export with no projects without reading any. What remains: a failing read of a granted project still stops the pass, and with it any withdrawal of another granted project. Deferred with oc-8347700 to after phase 1 goes live.