gunk-dev/the-valley
the-valley:oc-3d00ef5outcomedone

The web UI renders the plan for drill-down

State
done
Created
2026-10-17 by contributor
Source
2026-10-17, plan-graph-design.md Who reads what
Changes
  • valley:the-valley/tymmslvypsnzvzqlpkvnyknlppxtykqs

Body

The web UI renders the plan from `valley plan --json`. The operator browses from the milestones (the outcomes with no parent) a level at a time, answers questions, comments, and approves. Human views live in the UI, not in CLI flags.

Done when the operator can drill from a milestone to a knot, answer a question and add a comment from the UI.

Source: 2026-10-17, `plan-graph-design.md`, "Who reads what" and "The CLI".

Comments

  1. contributor2026-10-24 12:39 UTCedited2026-10-29 01:09 UTC by contributor
    Operator, 2026-10-24: the plan page the coordinator publishes as a private artifact (generated from valley plan --json and valley pending --json) is the starting point for this UI. Its sections: approval waves, what waits on the operator, work in flight, paths, and each milestone as a cord of knots. Three of them (waves, in flight, paths) are hand-curated today and need a source in valley data.
  2. contributor2026-10-24 12:57 UTCedited2026-10-29 01:09 UTC by contributor
    Design for slice 1, 2026-10-24 (Astra, after a Claude source review; operator decisions pending: which projects export, and that the web edge can read the exported plan text). Coordinator note: if the private network policy is still allow-all, the web edge node could reach every device, the valley host included; the rules below only restrict it once the broad grant is replaced. That console change is the operator's and comes first.
    
    Summary
    
    The supplied plan page runs at a hosting provider (the web edge) and keeps its look and reading order.
    The operator's workstation and phone reach it through the private network without an application login.
    The valley host reads project storage and pushes signed snapshots.
    The web edge serves the last verified snapshot and shows its age.
    Slice 1 is read-only; knots say “Free to start.”
    
    Decisions
    
    1. Who can reach it
    
    Deployment choice: one continuously running machine at the hosting provider joins the private network under a dedicated network tag. Its browser listener binds only the private network address on TCP 8080. Snapshot uploads use TCP 8081.
    
    The hosting configuration contains neither `http_service` nor `services`, and allocates no public IP. Private network traffic bypasses the provider's proxy, so this design requires a running Machine rather than traffic-triggered startup.
    
    The operator manually adds these rules in the private network's admin console. No repository holds the policy. Source aliases identify each device’s exact private network IP:
    
    - the operator's workstation → the network tag, TCP 8080.
    - `operator-phone` → the network tag, TCP 8080.
    - the valley host → the network tag, TCP 8081.
    
    The valley host remains untagged. The operator owns the new tag and removes overlapping broad permissions that would admit other readers or let the web edge initiate connections into the valley host. Narrow grants do not override broad ones.
    
    Keep the private network's device identity on a persistent volume. The operator supplies a tagged, one-use enrollment key through the provider's secrets store. Ephemeral nodes add changing addresses and repeated enrollment; reusable enrollment keys require renewal within 90 days. Persistent identity is simpler for this single Machine.
    
    2. Where each section gets its data
    
    Milestones and cords use plan JSON’s roots, children, states, progress, owners, and blockers. The tally retains its the-valley outcome scope. Snapshot knot details supply bodies and comments.
    
    Waiting on you includes ready, unlanded versions without a matching request. A stale, rejected, or refused outcome at the active head also belongs here, even while its request stands. Otherwise, a matching request appears under “Awaiting integration.” Same-head re-approval cannot be inferred from the request ref; the last reported problem stays visible until the recorded outcome changes.
    
    Approval waves remain an unordered card labelled “Ready changes — order not assessed.” oc-926bd5f supplies the missing pairwise conflicts, tied to the target tip and active heads. Unknown results must remain distinct from clean results. Conflicts support suggestions, not guarantees about a group landing.
    
    Decide or do shows active outcomes, bugs, and questions owned by the configured operator principal. “Yours” refers to that principal.
    
    In flight shows claimed or explicitly in-progress knots and unlanded drafts. Linked changes appear together. Stale claims and drafts retain those labels; neither proves an agent is running. Hand-written meeting narratives remain outside slice 1.
    
    Paths use selected outcomes’ children as steps. Full `blocked_by` edges carry dependency order; independent steps appear together. Only outcomes and bugs can carry those edges, though questions and ideas can be blockers. The graph therefore cannot express arbitrary editorial ordering among every knot type. Missing steps need knots; slice 1 invents neither steps nor order.
    
    3. How the valley host reads and publishes
    
    Choose signed snapshots over mirrored refs. The web edge needs neither source history nor Git and valley readers.
    
    The publisher runs the existing JSON commands from one service-owned bare repository whose origin is the local instance repository. `XDG_CACHE_HOME` holds the readers’ other repository caches. Projects come from `refs/the-valley/projects`; landing-verification material comes from the host’s signer publication. Nix supplies neither inventory nor verifier material. Export selection is separate from discovery.
    
    Use `DynamicUser` with membership in the git group. The module ensures repository read access and supplies an explicit `safe.directory` entry for each locally served repository opened by Git. There is no wildcard. Host repositories remain read-only in the sandbox; service state and caches are writable. The publisher does not run as the git user or receive its mirror credentials.
    
    A complete snapshot contains plan JSON, pending JSON, and knot details. Its signed statement binds the schema, instance, destination, collection time, source tips, sequence number, and payload. Existing `note.Sign` and `note.Open` provide the Ed25519 note envelope.
    
    The valley host holds a dedicated snapshot-signing key. The web edge pins its public verifier key. This key authorizes snapshot publication only. The operator’s approval key stays on the operator's workstation. Agents receive secret references and public keys, never secret values.
    
    4. Freshness and failure
    
    The publisher reacts to relevant ref-update events, combines bursts, and also publishes on startup and every minute. The timer covers missed events and retries failures.
    
    Read failures or inconsistent graph tips prevent publication. The web edge rejects invalid signatures, wrong destinations, malformed payloads, and older sequences. Identical retries are harmless.
    
    The web edge atomically persists the accepted note and sequence on its volume and verifies them at startup. Failed uploads leave the last good snapshot intact. The page shows collection time and age, with a stale warning after five minutes. Refresh reads the web edge's accepted snapshot, never the valley host.
    
    5. Code, configuration, and deployment
    
    The-valley exports a `webui` package containing the server and publisher, plus a `webui-image` Nix image. Its host-module option runs only the publisher.
    
    The infrastructure project holds the app's base and production CUE files. The deployment project owns the valley host's provider-specific deployment job: app name, pinned infrastructure checkout, `skopeo`, the provider's CLI, and deploy-token reference. It builds an integrated source revision, pushes the image, and deploys its immutable reference. No GitHub Actions or repository dispatch is required.
    
    The operator provisions the app-scoped deploy token on the valley host. It is unavailable to the publisher and agents.
    
    6. Vocabulary and presentation
    
    Use “Free to start” for the UI’s knot `ready` label. The legend says: “An outcome or bug that is open, unclaimed, and unblocked.” Model and JSON names remain unchanged.
    
    Keep Waiting on you, In flight, Paths, and Milestones in order. Use the template’s system font stacks, without font files or external font requests. Go renders escaped content; small browser scripts handle filters without a build step.
    
    Slice 1
    
    The new mechanisms are not built.
    
    Add `webui/` with the server, publisher, assets, and tests, plus Nix image and check definitions. Touch `nix/packages.nix`, `nix/checks.nix`, and `nix/valley-host.nix`. The infrastructure project adds the app's CUE files. The deployment project owns deployment wiring. Private network policy remains a manual console step.
    
    There are no human writes, approvals, conflict calculations, public routes, or repository mirrors.
    
    Done when:
    
    - Both operator devices preserve the supplied layout and support knot drill-down.
    - Stale and refused requests remain visible under Waiting on you.
    - Ref events and timer retries deliver updates; outages show increasing age.
    - Invalid or replayed uploads cannot replace accepted data.
    - Restarts preserve the snapshot and replay protection.
    - Unauthorized devices cannot connect, and the publisher cannot modify host repositories or read mirror keys.
    - The deployment project deploys from local sources without GitHub automation.
    
    Claim-to-code checklist, verified at valley HEAD `a0911fc`:
    
    - Implemented — plan data: `status/plan.go:847`; pending versions: `status/list.go:79`; details: `status/knot.go:1028`.
    - Implemented — standing stale/refused requests: `integrator/main.go:49`, `integrator/main.go:58`; request/outcome matching: `rebase/snapshot.go:224`, `rebase/snapshot.go:242`.
    - Implemented — discovery and caches: `status/list.go:202`, `status/list.go:423`; signer publication: `status/signers.go:10`.
    - Implemented — ownership exception precedent: `nix/valley-host.nix:1903`; readiness and edge limits: `knot/derive.go:204`, `knot/derive.go:249`.
    - Implemented — note signing/verifying: `note/note.go:268`, `note/note.go:315`. Service settings and access rules above are deployment choices.
    
    Later slices
    
    Answering and commenting need an attributed writer. Candidates are registered signing credentials or private network identity with explicit delegation; prefer signed operator statements that the valley host pulls from the web edge.
    
    Approval uses the operator’s key on the operator's workstation, potentially through a local helper. The web edge holds no approval key.
    
    Public browsing can share the app only with a separate public export and enforced storage boundary. Outsider identity and contributions retain their later phases. Slice 1 does not complete oc-3d00ef5’s answering-and-commenting criterion.
    
    Open questions for the operator
    
    Which projects export? Recommendation: explicitly select the projects in the supplied page. Discovering another project does not automatically export it.
    
    May the web edge and its administrators read the exported plan text? Recommendation: accept this for the selected projects. Signatures authenticate the snapshot; they do not conceal it from the hosting provider.
  3. contributor2026-10-24 23:49 UTCedited2026-10-29 01:09 UTC by contributor
    Design for the public web UI, 2026-10-24 (Astra; supersedes the private-network-only design above for where it runs and who reads). A Claude source review is in progress.
    
    ## Summary
    
    The public site serves the valley’s public plan and source browser.  
    The valley host pushes signed exports; the web edge never connects to the valley host.  
    Anonymous visitors read public projects; personal grants unlock private projects.  
    The plan keeps its ledger layout, sections and reading order.  
    Slice 1 is public and read-only; sharing and comments follow.
    
    ## Decisions
    
    These mechanisms are **not built**. Hosting and access choices below are **deployment choices**.
    
    **1. Serve the public internet, without the private network.**
    
    The Go server runs in the production web app, behind the provider's proxy, on port 8080. The `www` host name redirects to the apex domain. The existing DNS records remain.
    
    One Machine uses one volume for accepted exports, bare repositories, sequence numbers and later sessions. Suspension remains enabled. Requests and publisher uploads wake the Machine, so regular publishing limits the savings from suspension. The volume preserves state across deployments.
    
    **2. Enforce visibility at export and on every request.**
    
    A project is public only when its instance policy and its own policy both explicitly permit public reading. Missing or invalid declarations mean private. This needs a small visibility schema and reader; the existing verification policy does not supply it.
    
    Slice 1 exports the-valley. klaus appears after it becomes a valley project. The deployment project and the instance repository remain private. From slice 2, active grants also select private projects for export. The operator’s grant covers every project, so it exports their private data too.
    
    The web edge and its administrators can read everything exported. This is an accepted trust boundary.
    
    Every page and data response checks project access. Hidden projects return the same response as nonexistent projects. Lists, counts and cross-project links follow the same rule. Public project prose and source history are public as written; access checks cannot redact private information embedded in that text.
    
    **3. Push signed data, with bounded staleness.**
    
    The valley host sends plan JSON, pending JSON and knot details, limited to the exported projects and enabled views. Operator-only data starts in slice 2. Grant records accompany the export then.
    
    Source travels as a full bundle of each project’s main, sent only when its tip changes. Plan updates reuse stored source. Full bundles avoid prerequisite tracking and recovery logic. They include main’s reachable history. [Git bundle semantics](https://git-scm.com/docs/git-bundle).
    
    One signed manifest authenticates the payload hashes, project tips, visibility, grants, instance identity, sequence number and expiry. Its Ed25519 signature uses the valley’s note format. This authenticates the bundles without another signature format.
    
    The web edge accepts uploads over public HTTPS. It pins the publisher’s public key and requires an increasing sequence number. Both ends persist their counters. The web edge checks hashes, bundle contents and declared tips before activating data. Invalid or incomplete uploads leave the last good copy intact.
    
    The publisher coalesces ref events and reconciles every five minutes. Each authorization manifest expires after ten minutes. Revocations and visibility restrictions take effect without waiting for source transfers. After expiry, the web edge retains the data but refuses content access until fresh authorization arrives. Revocation cannot retract copies already read.
    
    Pages render per request and show the snapshot’s time and age.
    
    **4. Keep the publisher a reader.**
    
    The publisher calls the existing JSON commands. This reuses their interpretation of knots, changes and integration results without reshaping `status`.
    
    It has one service-owned bare repository whose origin is the local instance repository, plus an `XDG_CACHE_HOME` directory. Project discovery and valley verification material come from the host’s publications. Nix supplies neither inventory nor those verifier files.
    
    The service uses `DynamicUser`, the git group and exact `safe.directory` entries. Canonical repositories are read-only in its sandbox. Only its state and cache are writable. Mirror and deploy keys are inaccessible.
    
    Its own signing key authorizes exports only. It grants no SSH, approval or deployment authority. The operator places the key; agents never receive it. The web edge receives only its public verifier.
    
    **5. Preserve the plan’s sections and meaning.**
    
    The page keeps the template’s layout and order: **Waiting on you, In flight, Paths, Milestones**. Operator sections appear only under the operator grant. Fonts use the template’s system fallbacks, with no downloaded fonts or font files.
    
    - **Milestones and cords:** plan JSON supplies roots, children, states and progress. Knot details supply bodies and comments. Existing data suffices.
    - **Ready changes:** pending JSON supplies active, unlanded ready versions. Request and outcome data distinguish work awaiting integration from work needing attention.
    - **Waiting on you:** operator-owned active outcomes, bugs and open questions supply “Decide or do.” Stale, rejected or refused outcomes at the active head also belong here, even while a request remains standing.
    - **Approval waves:** slice 1 invents no order. The minimal addition is oc-926bd5f’s pairwise conflict results, tied to the compared heads and main tip. Later waves are suggestions; conflicts alone cannot establish review or operational prerequisites.
    - **In flight:** claims and explicit in-progress states supply knot work. Slice 2 adds draft summaries and requests awaiting integration. Claims show their age; drafts do not prove an agent is running. Handwritten meetings stay out.
    - **Paths:** milestone children and full `blocked_by` edges supply dependency order. Independent steps remain parallel. Only outcomes and bugs carry these edges. Editorial steps need their own knots; repeated prose steps attached to one knot are not derivable.
    
    “No drafts leave the valley host” applies to source objects and refs. The operator’s draft **summaries** must travel in JSON for that view to work.
    
    The UI calls knot `ready` **“Free to start.”** The legend says this applies only to outcomes and bugs that are active, unclaimed and unblocked. The model keeps `ready`; changes say “Ready for approval.”
    
    **6. Browse source safely.**
    
    The web edge keeps one bare repository per exported project. The Go server reads README, the file tree, files and main’s log directly. It performs no checkout and fetches no submodules.
    
    Only main and its history enter source bundles. Change refs and unlanded source stay on the valley host. Source routes accept only commits reachable from the published main tip.
    
    Repository text is escaped. README formatting disables raw HTML and remote embeds. A strict CSP permits only packaged assets. Repository files never execute at the public site. Public HTTPS clones and raw files on a separate content domain remain later work.
    
    Source links identify project, commit and path, providing stable anchors for later comments.
    
    **7. Use personal grants, with separate sessions.**
    
    Slice 2 adds an operator command that creates a grant and prints its link once. The record names a person, an explicit project set and any operator-view permission. The secret contains 256 random bits; only its SHA-256 hash is stored.
    
    Records live at `refs/the-valley/web-grants` in the instance repository. This needs narrow, operator-only hook admission: the existing hook rejects unknown refs in that namespace. Grant records travel inside the signed export.
    
    The link carries its secret in the URL fragment. A small packaged script exchanges it by POST, clears it and opens a clean URL. Secret attempts are rate-limited. Secrets never enter access logs.
    
    The cookie is an opaque session identifier, marked `HttpOnly`, `Secure` and `SameSite=Lax`, with a host-only `__Host-` name. Its server-side record binds it to a grant ID, grant revision and expiry. Every request checks current permissions. Revoking one grant invalidates only its sessions. Possession authenticates the grant; the person’s name is not yet verified identity.
    
    ## Slice 1
    
    the-valley adds a self-contained `webui/` for the server, publisher, templates and tests, plus a narrow web visibility schema. It touches `nix/packages.nix`, package exports, `nix/valley-host.nix` and relevant checks. It exports server and publisher packages and a Nix `dockerTools` image. The host-module option runs only the publisher.
    
    The deployment project owns the valley host's deploy job, pinned infrastructure checkout, app name, skopeo, the provider's CLI and token reference. It builds the image, pushes it to the provider's registry and deploys that image. The operator supplies an app-scoped token. No GitHub workflow participates.
    
    The infrastructure project reuses its web app's base and production CUE files, adding the volume and server configuration. Its old web deployment workflows and obsolete image wiring are retired. DNS stays unchanged. Platform logic stays in Go or Nix.
    
    Slice 1 excludes grants, private exports, drafts, comments, approvals, clones and raw downloads. I recommend keeping the operator’s private artifact until slice 2; this keeps the first release public-only.
    
    **Done when:** anonymous visitors browse the-valley’s knots and source at the public site on desktop and phone. Private projects are absent from exports and responses. Tests cover both-policy visibility, hidden links, hostile content, corrupt uploads, replay, expiry and restart recovery. Deployment from the valley host replaces the old site without GitHub.
    
    ## Later slices
    
    **Slice 2 — sharing and the operator view.** Grant creation, revocation and cookie exchange unlock private projects and operator sections. Done when two people see only their granted projects, the operator sees the full plan, and revocation removes one person’s access within the stated bound without affecting another.
    
    **Slice 3 — comments and answers.** An invite binds its grant to the first passkey; signed actions identify the writer. The valley host pulls submissions outward from the web edge and checks their authority before recording knot comments, answers or source comments. Done when authorized actions reach project storage with attribution, while revoked and replayed actions fail.
    
    Approval remains separate. It requires the operator’s approval key where that key is available.
    
    ## Open questions for the operator
    
    - **What revocation delay is acceptable during an upload outage?** Recommend ten minutes, followed by refused access until publishing recovers.
    - **Who receives the first private grants?** Recommend the operator’s full grant first, then explicit project sets for each other person.
    
    ## Claim-to-code checklist
    
    Verified against the-valley HEAD `c3e97f0` and the infrastructure project at its main. New mechanisms above are **not built**.
    
    | Existing claim | Kind | Verified source |
    |---|---|---|
    | Plan JSON supplies hierarchy and operator sections; details include bodies and comments | implemented | `status/plan.go:847`, `status/knot.go:1028` |
    | Pending includes ready changes, drafts, requests and outcomes | implemented | `status/pending.go:79`, `status/list.go:79` |
    | Stale and refused requests remain standing | implemented | `integrator/main.go:49`, `integrator/main.go:58` |
    | Free-to-start and dependency edges are limited by knot type | implemented | `knot/derive.go:204`, `knot/derive.go:249` |
    | Discovery, cached repositories and published verifiers exist | implemented | `status/list.go:202`, `status/list.go:423`, `status/signers.go:10` |
    | Named ownership exceptions, ref events and note signing exist | implemented | `nix/valley-host.nix:2219`, `nix/valley-host.nix:479`, `note/note.go:268` |
    | Visibility is absent from the current policy; the proposed grant ref is closed | implemented limitation | `schema/verification.cue:36`, `valleyhook/policy.go:135` |
    | App, domains, port, suspension and DNS match the stated deployment | deployment choice | the infrastructure project's app and DNS configuration |
    | The existing production workflow deploys through GitHub Actions | deployment choice | the infrastructure project's production workflow |
  4. contributor2026-10-25 00:06 UTCedited2026-10-29 01:09 UTC by contributor
    Final design for the public web UI, 2026-10-25 (Astra, after a Claude source review; supersedes the two designs above). Coordinator note: knot comments are append-only ("comments are never changed or deleted"), so the disclosure question resolves through an export-time exclusion (knots or comments withheld by policy/web), not by editing comments.
    
    ## Summary
    
    The public site serves public knots and a read-only source browser.  
    The valley host pushes signed exports; the web edge never connects to the valley host.  
    Public pages keep serving and show their age.  
    Personal **shares** unlock private projects and the operator’s view.  
    Slice 1 publishes public projects only.
    
    ## Decisions
    
    The new mechanisms below are **not built**. Hosting and access settings are **deployment choices**.
    
    **1. Public hosting, with project access checks.**
    
    Reuse the production web app, its HTTPS service on port 8080 and its production DNS. Redirect www to the apex domain. One Machine keeps accepted data on a volume and can suspend between requests. The web edge has no private network membership or valley host credentials.
    
    Public reading requires explicit permission from both instance and project policy. Missing or invalid permission means private. New declarations live under `policy/web/`, outside the closed verification-policy directories.
    
    Slice 1 exports the-valley. klaus appears after becoming a valley project. Private projects export only when an active share covers them. The operator’s share covers every project. The web edge and its administrators can read everything exported.
    
    The publisher removes foreign titles and statuses from plan `edges` when their project is not exported. The server also filters every response, including embedded JSON, for the visitor’s access. Hidden project routes answer like nonexistent ones. Public prose can still mention private projects.
    
    the-valley’s main and tags are already public through its mirror. The knot graph is the new disclosure.
    
    **2. A small reader on the valley host.**
    
    A five-minute timer runs a publisher oneshot. It calls the existing plan, pending and knot-detail JSON commands. One service-owned bare repository points its origin at the local instance repository; `XDG_CACHE_HOME` holds fetched data. Project discovery and valley verification material come from the host’s publications, not Nix configuration.
    
    The service uses `DynamicUser`, the git group and exact `safe.directory` entries. Canonical repositories are read-only. Its state and cache are writable. It cannot read mirror or deploy keys.
    
    On first start, it generates its own Ed25519 export key. The operator pins the public verifier on the web edge. The private key authorizes exports only and never reaches agents.
    
    The publisher uploads when the export digest changes. Generated timestamps and display ages do not change that digest. Failed uploads retry. Deployment and volume recovery force a fresh synchronization. No bus subscription is needed.
    
    **3. Authenticate the manifest before accepting data.**
    
    The export contains selected plan and pending data, knot details and full bundles of main. Shares and operator-only summaries enter in slice 2. No change refs or unlanded source leave the valley host.
    
    Full bundles avoid incremental prerequisites. An upload reply lists the verified tips the web edge holds; the publisher sends missing bundles, including after a failed transfer or volume replacement.
    
    The receiver follows this order:
    
    1. Read a manifest capped at 64 KiB. Verify it with `note.Open` and the pinned key. Require the exact first line `the-valley/web-export/v1`.
    2. Check the instance, app, sequence and any share-authorization expiry.
    3. Accept bodies only within declared sizes and configured limits. Reject `Content-Encoding`. Hash while streaming. Run no git command until the declared hash matches.
    4. Require `list-heads` to report exactly `refs/heads/main` at the declared tip, with no prerequisites. Fetch into staging with an explicit refspec and `transfer.fsckObjects=true`; verify the objects before activation.
    5. Activate the complete export through an atomic pointer swap. Failure preserves the last good copy.
    
    `git bundle verify` alone does not establish the expected tip. [Git bundle checks](https://git-scm.com/docs/git-bundle).
    
    The sequence is signing time in Unix nanoseconds. There is no publisher counter. The web edge persists its greatest accepted sequence. Clock regression delays publishing rather than resetting ordering.
    
    Incoming manifests must be at most three days old and no more than one minute ahead. This bounds replay admission after volume loss. **It does not expire accepted public pages.** Slice 1 has no serving expiry or authorization heartbeat.
    
    **4. Keep the plan page and its data mapping.**
    
    Keep the ledger layout and reading order: **Waiting on you, In flight, Paths, Milestones**. Operator sections appear only with the operator’s share. Use the template’s system font stacks, with no font downloads, framework or JavaScript build step.
    
    - **Milestones and cords:** plan JSON supplies hierarchy, states and progress. Knot details supply bodies and comments.
    - **Ready changes:** pending JSON supplies active, unlanded ready versions and their request/outcome records.
    - **Waiting on you:** operator-owned active outcomes, bugs and open questions supply “Decide or do.” Stale, rejected or refused outcomes at the active head remain here despite a standing request.
    - **Approval waves:** no order is invented. oc-926bd5f’s proposed pairwise conflicts, bound to heads and main tip, provide the minimal missing data. Suggested waves cannot replace review or operational prerequisites.
    - **In flight:** claims and explicit in-progress states supply knot work. Slice 2 adds draft summaries and requests awaiting integration. A draft does not prove someone is working.
    - **Paths:** children and full `blocked_by` edges supply dependency order. Only outcomes and bugs carry those edges. Independent steps remain parallel; editorial steps need separate knots.
    
    The UI says **“Free to start.”** The legend limits this to active, unclaimed, unblocked outcomes and bugs. The model keeps `ready`; changes say “Ready for approval.”
    
    **5. Read source without executing it.**
    
    The web edge keeps one active bare repository per exported project. The Go server reads README, trees, files and main’s log directly.
    
    A bundle can contain unreachable objects. Browsing therefore checks each commit’s reachability from the published tip and resolves files by path. There is no arbitrary-object endpoint, checkout or submodule fetch.
    
    Repository text is escaped. README formatting disables raw HTML and remote embeds. A strict CSP permits only packaged assets. Source links identify project, commit and path for later comments.
    
    Raw content belongs on a different registrable domain in a later slice, not a subdomain of the public site's domain. SameSite treats sibling subdomains as one site. [Browser security boundaries](https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html).
    
    **6. Personal shares use ordinary sessions.**
    
    A share names a person, project set and optional operator-view permission. One operator command creates it and prints its link once. It stores only the unsalted SHA-256 hash of a random 256-bit secret.
    
    Share records live at `refs/web/shares` in the instance repository. An existing named **ref grant** opens that exact ref to the operator. No hook change is needed. Shares travel in signed exports.
    
    The secret sits in the link fragment. A packaged script exchanges it by JSON POST, clears it and opens a clean URL. The exchange and every later browser POST require the exact public site Origin and JSON content type. Session replacement is explicit. Rate limiting controls load; secret entropy prevents guessing.
    
    The opaque cookie is host-only, `HttpOnly`, `Secure` and `SameSite=Lax`. Its session record binds it to a share ID, revision and expiry. Possession authorizes the share; passkeys later establish the writer’s identity.
    
    Slice 2 renews signed share authority every five minutes, even without content changes. After ten minutes without renewal, sessions fall back to the public view. Revocation affects only that share and takes effect without waiting for source bundles.
    
    ## Slice 1
    
    the-valley adds `webui/`, its tests, `schema/web.cue` and a small `nix/webui-publisher.nix`. Package and module exports expose the server, publisher and Nix image. Visibility declarations accompany the instance and project source. Existing packages and the large host module remain intact.
    
    The deployment project owns the valley host's deploy job, infrastructure checkout, app name, skopeo, the provider's CLI and token reference. It builds the image, pushes it to the provider and deploys it. The operator supplies the token; no GitHub workflow participates.
    
    The infrastructure project reuses its web app's base and production CUE files and adds the volume. Retirement includes the old production deploy workflow, staging and preview apps, their CUE and workflows, obsolete image wiring and the `staging.web` CNAME. Production DNS remains.
    
    Slice 1 excludes shares, private exports, drafts, comments, approvals, clones and raw downloads. The operator’s private artifact remains until slice 2.
    
    **Done when:** anonymous visitors browse the reviewed public knots and source on desktop and phone. Tests cover foreign-edge disclosure, upload ordering, malformed bundles, replay, interrupted transfers and volume recovery. Public pages survive publisher silence with their age shown. Deployment from the valley host replaces the old site.
    
    ## Later slices
    
    **Slice 2 — shares and the operator view.** Done when each person sees only their shared projects, the operator sees the complete plan, and independent revocation and ten-minute expiry work without interrupting public browsing.
    
    **Slice 3 — comments and answers.** The first passkey binds the share to its holder. The valley host pulls signed submissions outward and records authorized knot answers, comments and source comments. Done when attribution survives into project storage and revoked or replayed actions fail.
    
    Approval remains separate and requires the operator’s approval key. Public clones and isolated raw downloads are later work.
    
    ## Open questions for the operator
    
    - **What knot material belongs in the public export?** Before slice 1 ships, review and edit the graph, especially oc-9a93fe7’s rotation runbook and oc-3bc80df’s hardware identifiers. Recommend removing unnecessary operational detail before enabling public visibility.
    
    ## Claim-to-code checklist
    
    Verified at the-valley `c3e97f0`, the infrastructure project at its main and the deployment project at its HEAD. New mechanisms above are **not built**.
    
    | Existing claim | Kind | Source |
    |---|---|---|
    | Plan/details and pending expose the required fields | implemented | `status/plan.go:847`; `status/knot.go:1028`; `status/pending.go:79`; `status/list.go:79` |
    | Foreign edges contain titles and statuses | implemented | `status/plan.go:294`, `status/plan.go:434` |
    | Stale/refused requests remain; readiness and dependencies have type limits | implemented | `integrator/main.go:49`, `integrator/main.go:58`; `knot/derive.go:204`, `knot/derive.go:249` |
    | Discovery, caches and published verifiers exist | implemented | `status/list.go:202`, `status/list.go:423`; `status/signers.go:10` |
    | Worker key generation and exact ownership exceptions provide precedents | implemented | `nix/valley-host.nix:313`, `nix/valley-host.nix:2219` |
    | Note verification does not enforce statement type | implemented | `note/note.go:315` |
    | Verification policy rejects extra fields; named ref grants admit other refs | implemented | `schema/verification.cue:369`; `schema/valley.cue:59`; `valleyhook/policy.go:181` |
    | Mirror publishes main/tags to the mirror's organization | implemented / deployment choice | `nix/valley-host.nix:432`; the deployment's host configuration |
    | Production and retired web environments have the stated configuration | deployment choice | the infrastructure project's app, DNS and workflow configuration |
    
    Disclosure examples are also checked at knot-storage tip `13e70c0`: `comments/oc-9a93fe7/20261018T144540Z-fd40909f8c18ff80.md:7` and `comments/oc-3bc80df/20261022T224437Z-21fa7be181f3d649.md:5`.
  5. contributor2026-10-25 14:15 UTC
    Critique of the slice 1 build plan (Astra, 2026-10-25), against HEAD c3e97f0. The coordinator adopts it: a contract change comes first, then the publisher and the server in parallel, then the receiver.
    
    The A/B/C split separates publishing, rendering, and activation sensibly, and immutable export directories give the reader a useful boundary. A and B can work in parallel once that boundary specifies exact data, filtering, and snapshot semantics.
    
    Against HEAD c3e97f0:
    
    1. The shared contract is still a sketch, so B’s fixture can disagree with A’s output. Upload framing, bundle filenames, missing-bundle negotiation, response JSON, and failure semantics are unspecified; leaving these to C forces publisher rework. Fix: establish shared types, a literal fixture, and the upload protocol before A/B start. Give C ownership of the protocol now, even if implementation follows later.
    
    2. The JSON documents have materially different shapes. Plan uses projects[].project; pending uses repos[].repo; knot show returns {schema, project, tip, knot}. Plan/detail tips identify knot storage, not source main (status/plan.go:847; status/list.go:45; status/knot.go:1105). A global knots[id] also assumes IDs are unique across projects. Fix: specify each envelope, distinguish source and graph tips, key details by project and ID, and use project-qualified detail commands.
    
    3. “Filtered pending” is insufficient to enforce slice 1. Pending includes drafts, branches, all recorded versions, repository URLs, and errors—not just active ready versions (status/pending.go:99; status/list.go:51). Plan also carries operator and waiting_on_you data. Fix: define an explicit public projection selecting active ready versions and their request/outcome records, excluding drafts, branch inventories, operator summaries, and internal URLs/errors. Apply it before export and to every served representation.
    
    4. Withholding needs a precise transformation. Comment JSON has author, at, op, and body, but no path (status/knot.go:1052). Removing a detail entry alone leaves the knot’s title and relationships in plan, and possibly pending links. Fix: define comment identity through project, knot, timestamp and operation—or expose its path—and specify removal across summaries, details, references, counts, and progress. Preserve dependency meaning: withholding a blocker must not make work appear “Free to start.”
    
    5. Note reuse is valid, but verification omits design requirements. note.Sign accepts arbitrary newline-terminated text; note.Open authenticates it without enforcing its type (note/note.go:115,315). The plan omits instance checking, the three-day/one-minute admission window, Content-Encoding rejection, and declared/configured body limits. Fix: restore those checks in order; define destination as the configured app identity, reject duplicate records and unsafe names, and require manifest/JSON agreement.
    
    6. Bundle checks need executable acceptance criteria. Checking advertised heads does not establish absence of prerequisites, and a bundle hash does not establish object validity. Fix: separately reject prerequisites; require exactly the declared main ref/tip; fetch into a fresh staging repository with an explicit refspec, no tags, and transfer.fsckObjects=true; verify objects before activation. Test wrong tips, prerequisite bundles, corrupt objects, and unreachable-object browsing alongside extra refs.
    
    7. Digest skipping currently conflicts with both stability and recovery. sequence/generated change each run, but so do plan.now and claim.age_seconds (status/plan.go:847; knot/derive.go:129). Conversely, skipping solely on the last successful digest cannot detect a replaced volume. Fix: define a canonical content digest excluding signing/display time, distinguish attempted from acknowledged exports, and specify receiver inventory checks plus forced synchronization after deployment/recovery. Derive display age from timestamps and keep accepted public pages serving indefinitely.
    
    8. Neither side has a complete snapshot rule. Each knot show rereads the current graph, so details can disagree with the preceding plan (status/knot.go:339,1093). On the receiver, repeatedly opening active during one request can mix generations despite an atomic swap. Fix: require matching graph tips or retry collection; resolve one immutable generation per request and retain it while readers use it. Define crash-consistent activation/high-water persistence and serialize competing activations.
    
    9. B needs explicit mapping and rendering requirements. HEAD’s in_flight includes claimed knots only, whereas the design also includes explicit in-progress states (status/plan.go:479). Turning off raw HTML does not disable Markdown image embeds. Fix: specify the public section mapping, include active explicit in-progress knots, retain full dependency order without invented approval waves, and disable remote embeds explicitly. Supply the coordinator template as a versioned input and test age display, phone layout, hidden routes, and reachability.
    
    10. Build ownership and the disclosure gate are incomplete. HEAD uses separate Go modules, and its Nix helper assumes standard-library-only dependencies; goldmark needs explicit dependency packaging (nix/packages.nix:95). Assign the module layout, package/module exports, runtime tools, and image wiring before parallel work. Also gate the first public upload—not merely E’s deploy—on reviewed material and effective withholding; review of G’s recommendations alone does not apply them.
    
    The single most useful change is a small prerequisite contract change containing the public data types, sanitization rules, upload protocol, and executable shared fixture before A and B begin.
  6. contributor2026-10-25 21:32 UTC
    Server (valley-web) review, 2026-10-25: three rounds of cross-family review. No injection, deadlock or hidden-project disclosure found. Git output, page size, response memory, admission and export loading are bounded. Accepted residual: loading the active export (open, read, decode, index) does not observe cancellation once it has started, so a stalled local disk read or a large decode keeps one of the two loader workers busy. The export is verified, size-capped data on local disk, written only after the publisher's signature checks, so outsiders cannot trigger it; revisit if exports grow large.
  7. contributor2026-10-26 01:30 UTC
    Change valley:the-valley/tymmslvypsnzvzqlpkvnyknlppxtykqs landed: v10 as c816f44c5851f1dd8dfe39217472f20b3c057813.
    
    Every change the knot links has landed and it has no active children, so klaus set it done.