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
2 changes: 1 addition & 1 deletion .commitrail/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ for current product capability.
| [WS-AGENT-001](initiatives/WS-AGENT-001/OVERVIEW.md) | Planned | Neutral document tools plus OpenAI Agents SDK and OmniCoreAgent original-guide qualifications are delivered through the same public API, durable worker, parser and MinIO path. Retain the exact external provider/account and selected-image AWS evidence, then prove the broader hosted Flow contribution journey before deployment claims. |
| [WS-DB-002](initiatives/WS-DB-002/OVERVIEW.md) | Complete | Shared UUIDv7 record generation, native-UUID relationships and fresh v0.1 baseline; natural-owner retry custody and aligned CI/local setup |
| [WS-MCP-002](initiatives/WS-MCP-002/OVERVIEW.md) | Planned | 108 tools through WS-MCP-002-12 cover access, guide setup, contributor workspace, contribution policies, checker/artifact operations and task execution/submissions; task operations/imports and assembled release proof remain. |
| [WS-CLI-001](initiatives/WS-CLI-001/OVERVIEW.md) | Planned | Public Go CLI setup, contributor/manager workflows, administrative and operational commands, Finance policies and contribution exports are detailed in the overview; -43 proves the connected local unpaid automated-acceptance journey. -44 prepares four native release archives and a gated manual publisher; -47 hardens its administrator-bypass guard. First publication and public-asset audit remain operational work. -46 adds the separate system-reader project catalogue; -48 adds contributor TUI navigation and -49 adds findings pages and confirmed verified guide downloads. Evidence remains a manual CLI handoff; TUI product writes/management, public human-review controls and hosted proof are separate. Current revision context never substitutes for historical evidence. |
| [WS-CLI-001](initiatives/WS-CLI-001/OVERVIEW.md) | Planned | Public Go CLI setup, contributor/manager workflows, administrative and operational commands, Finance policies and contribution exports are detailed in the overview; -43 proves the connected local unpaid automated-acceptance journey. -44 prepares four native release archives and a gated manual publisher; -47 hardens its administrator-bypass guard. First publication and public-asset audit remain operational work. -46 adds the separate system-reader project catalogue; -48/-49 add contributor navigation, findings and verified guide downloads; -50 establishes the reading workbench. -51 bounds confirmed Claim/Start and direct collection navigation. TUI ZIP preparation/submission, automatic crash-safe recovery, contribution evidence, management, public human-review controls and hosted proof remain separate. Current revision context never substitutes for historical evidence. |
| [WS-ARCH-001](initiatives/WS-ARCH-001/OVERVIEW.md) | Planned | Public admission-backed initial/remediation Submission entry and supported false-policy guide activation are implemented over selected production delivery. New false/pass effects require LIVE REV; a known pre-effect non-live refusal has bounded retry, with exhausted delivery dead-lettered. The [bounded local public/worker drill](initiatives/WS-ARCH-001/planning/PLAN.md#first-complete-contributor-milestone) starts from public guide inputs with recorded inference; hosted operation and live human review remain. |
| [WS-ART-001](initiatives/WS-ART-001/OVERVIEW.md) | Planned | Verified input/output custody, exact-cause replacement and public admission-backed ZIP/Submission entry are delivered. The bounded local public/worker drill passed; hosted operation and setup-fault handling remain separate. |
| [WS-AUTH-001](initiatives/WS-AUTH-001/OVERVIEW.md) | Planned | Exact fixed-router custody, checker remediation and checker retry are delivered. The ART Operator backend prerequisite adds exact system-Operator artifact reads and independently guarded verification retry; WS-CLI-001-43 consumes all nine public ART operations, while hosted S3 proof remains separate. Public entry and supported false-guide activation use current exact AUTH/SQL custody; human decision authority remains later work. |
Expand Down
36 changes: 33 additions & 3 deletions .commitrail/initiatives/WS-CLI-001/OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,40 @@ ordered locked-guide selection with explicit verified single-document download.
[WS-CLI-001-50](WS-CLI-001-50.md) replaces their contributor presentation with
visible collections/sections, readable instructions and truthful page/evidence
states; it changes no public operation or lifecycle authority.
Contribution evidence remains an inert CLI handoff. Product mutations, management
screens and operation-specific recovery remain separate TUI boundaries; this
Contribution evidence remains an inert CLI handoff. Claim/start is bounded by
-51 below; other product mutations, management screens and their recovery remain
separate TUI boundaries; this
interface does not depend on first binary publication or system-wide discovery.

## Connected contributor workbench

The human's post-merge evaluation of -50 found that the read-only workbench was
not a usable complete workflow and collection/detail navigation was difficult.
Presentation proof is not completion of the contributor journey. Continue in
the existing TUI and typed API client, not a second client or simulated demo.

1. [WS-CLI-001-51](WS-CLI-001-51.md): direct collection navigation and deliberate
claim/start using existing public writes, exact confirmation, caller-owned
replay keys and uncertain-outcome recovery. This is the current bounded work.
2. ZIP preparation: explicit local package selection, summary/attestation,
actual intake feedback and exact replay. Preparation is not Submission.
3. Submission and continuation: deliberate immutable creation, current outcome,
checker remediation and only API-supported human revision responses. No
automatic acceptance, hidden mutation route or invented reviewer workflow.
4. Contribution evidence: inspect the contributor's returned records and awards
inside the workbench, retaining the distinction from fulfillment.

Only the first boundary is specified for implementation now. Each following
boundary needs inspected API/replay contracts, its own bounded record and native
public-API proof before starting. A durable automatic recovery design is needed
before replacing caller-owned saved keys with generated keys; the current CLI
contract must not become an unsafe in-memory TUI retry token.

Risk is L1 for mutation, cancellation, disclosure and local artifact handling.
Preserve backend authority, locked lineage, immutable evidence and atomicity.
No new API is required for claim/start. Backend gaps discovered for subsequent
steps must be named and independently implemented, never hidden by a UI mock.

## Current boundary

[WS-CLI-001-26](WS-CLI-001-26.md) adds deliberate draft-guide summary editing
Expand All @@ -78,7 +108,7 @@ and separate guide-bound review/revision policy configuration. The commands
the existing public writes with caller-owned replay keys and policy `If-Match`.
The backend owns manager authorization for new writes, policy semantics, replay and activation;
editing/configuring a guide does not approve or activate it. Other public API
client gaps and the broader TUI beyond -49 remain separate work. Binary distribution's
client gaps and the broader TUI beyond -51 remain separate work. Binary distribution's
workflow is prepared by -44; a protected release run and public-asset audit
remain operational work.

Expand Down
128 changes: 128 additions & 0 deletions .commitrail/initiatives/WS-CLI-001/WS-CLI-001-51.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# WS-CLI-001-51 — Claim and start from the contributor workbench

- Initiative: `WS-CLI-001`
- Durable disposition: `Planned`
- Intended merge outcome: Let a contributor deliberately claim and start exact tasks through the existing public API, with discoverable navigation and honest uncertain-outcome recovery.

## Intent

The merged -50 workbench is an observation interface, not a complete contributor
journey. The human found navigation difficult and missing actions made the UI
feel temporary. Main `f16dfe055` exposes working `api.Client.ClaimTask` and
`StartTask` and explicit CLI commands, but TUI `ReadClient` and `Model.key` do not
expose them. No backend prerequisite is needed. The existing real-API TUI drill
proves reads and fresh revocation only; it must not be relabelled mutation proof.

## Bounded change

Allowed: `cli/internal/tui/`, TUI wiring in `cli/internal/command/tui.go` and its
affected tests, focused existing CLI native HTTP/public-API tests and an opt-in
POST capture hook in their existing socket fixture, CLI README,
the single terminal design document, affected roadmap/initiative/index claims.
Reuse the existing typed mutation client, sanitizer, response validation and
backend authorization. No backend/client transport/CI/dependency changes.

Not allowed: upload/Submission/revision/Review/Finance mutations, automatic
chained actions, polling, credentials/history storage, generic operation journal,
shell execution, compatibility paths, new auth rules or weakening tests.

## Design and decisions

- Add visible `a actions` on freshly inspected Ready task or Mine Overview.
Offer only Claim for observed ready work, Start for observed claimed Mine.
Observed status determines UI relevance, never server authority.
Gate both on exact freshly fetched `ContributorTaskDetail`, not row status;
Mine rows carry assignment status (`active`), not task status (`claimed`).
- Require a caller-owned UUID replay key saved outside this session, matching
the explicit CLI contract. Explain this requirement before entry. Do not
generate a transient key or imply crash recovery exists. Reason is omitted
consistently in this slice (JSON `{}` through existing client).
The UI cannot verify external saving: require user input and an explicit
save-warning acknowledgment at confirmation, with no generated fallback.
- Confirm exact action, actor, project, task, key and available locked terms;
Enter in key entry only advances to confirmation. Only a deliberate `y` at a
usable terminal dispatches one POST. No request on selection or resize.
- Freeze the packet while sending. Navigation/refresh cannot replace it or
dispatch another action. Quit cancels the client request, not server effects.
Unknown, malformed success and transport cancellation never mean rollback.
- Preserve unknown packet in the session, with explicit same-packet replay and
inert CLI recovery arguments. No automatically retried POST; no new key after
uncertainty. Session loss clears protected work; retained recovery references
must not expose previously cleared descriptions/terms or bearer.
- Confirmed receipt and subsequent read are separate outcomes. Do not erase a
successful claim/start because a refresh fails; do not automatically start
after claim. Reauthorize through existing API on every write/replay.
- Use a separate write outcome handler, not `failed()`'s read-page reset.
Bind returned task/project to the frozen packet and claim assignment contributor
to the bound actor; the existing typed decoder does not check the latter two
against the caller's selection. Any mismatch is unknown, never success.
Complete canonical 4xx is a known denial of that request; transport, cancellation
and malformed responses remain unknown. A denied replay cannot retroactively
prove an earlier unknown request failed. Keep unknown history until a validated
receipt resolves it. On 401/403/concealed 404, clear protected descriptions and
terms, retaining only minimal inert replay references; session failure disables
replay in this session. Pending writes consume navigation/refresh/action keys.
Quit cancels the request and exits, never claims server rollback; the caller's
externally saved key is the restart recovery contract, not an in-memory journal.
- Add visible direct collection shortcuts `1 Ready`, `2 Mine`, `3 Submissions`
from ordinary list/detail views and reverse Tab navigation. Text entry,
confirmations, pending operations and overlays must consume their own keys.
Preserve current keys and exact-resource cancellation semantics.

The caller-owned key is an explicit initial limitation, not the desired final
consumer UX. Automatic crash-safe operation recovery needs a separately bounded
private-storage design; do not hide it in this action slice.

## Acceptance criteria

- Native TUI can inspect Ready, confirm claim, see receipt, inspect Mine, then
separately confirm start. Exact assignment/locked lineage remains backend-owned.
- Decline, resize below minimum, repeated keys, read movement and text entry
cannot cause a write. Different task/project/actor cannot receive a late result.
- Lost response retains original action/key and only explicit replay reuses it.
Read failure does not manufacture rejection, rollback or confirmed success.
- Real signed public API/PostgreSQL native drill proves claim/start, exact-key
replay, ownership and fresh revoked-authority rejection; preserve old GET-only
drill. HTTP tests prove exact wire/no automatic retry and corrupt receipt.
Use the separate ready task from `create_task`, not `_prepared_packet`'s already
started task. Prove claim replay before start, then start replay before revoke:
claim replay after progression may validly return state-conflict. Assert
caller/project substitution is unknown and that a successful write plus failed
read still shows the confirmed write receipt without restoring protected text.
- Go build/test/vet/race, native HTTP tests, layout/hostile text/download guards,
links, wording and full hosted proof remain required. Add a discriminating
hidden-confirmation/duplicate-dispatch regression; do not weaken old assertions.

## Risk and review routing

L1: contributor mutation, uncertainty and untrusted terminal content. Plan review
before implementation; focused security, product/operations, architecture/reuse,
QA/test-delta, CI integrity (shared native socket fixture) and docs review on a
frozen candidate. Human focus: actions are
obvious, claim and start remain separate, exact confirmation and uncertain-result
copy are understandable. No merge without specific human approval.

## Evidence

Focused model regressions exercise confirmation, frozen request identity,
substituted receipts, denied replay, protected clearing, bounded paste and
cross-resource navigation. Native HTTP tests exercise the built binary and
exact POST bytes. The separate signed public-API drill exercises claim and
start, same-key replay and live grant revocation against isolated PostgreSQL;
the earlier GET-only drill remains unchanged. These are distinct proof
boundaries, not evidence of the remaining submission journey. Exact-head
execution and reviewer results belong in the PR trust summary.

Independent review exposed a late-read/session-denial interleaving: opening
replay while a refresh was pending could leave confirmation actionable after
the read blocked the session. Dispatch must recheck session and replay
eligibility, not rely solely on the earlier modal entry check. A focused
regression must reject the old dispatch behavior. Same-collection shortcuts
from detail must also return to the list rather than silently doing nothing.

## Reconciliation and remaining journey

This chunk closes Ready -> claimed -> in_progress inside the TUI. Subsequent
bounded work: ZIP preparation with feedback and safe replay; immutable submission
and outcome/revision navigation; contributor evidence and awards. Those are not
delivered by this chunk. Human Review controls require their own public API proof.
43 changes: 32 additions & 11 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,35 @@ terms remain available separately. Workstream rechecks each public read.
|---|---|
| Arrows / Enter | Select a row or scroll detail; Enter inspects freshly |
| Tab / Esc | Change section / go back or cancel |
| Shift+Tab | Previous collection or detail section |
| `1` / `2` / `3` | Go directly to Ready / Mine / Submissions from ordinary views |
| `a` in task Overview | Open Claim or Start when the freshly inspected task supports that action |
| `g` | Fetch the project picker again |
| `n` / `r` | Fetch the next page / refresh the current view |
| `/` | Filter loaded names/titles locally; Enter finishes and Esc cancels |
| `c` / `?` | Show inert CLI arguments / keyboard help |
| `d` in Guide | Enter an existing download directory; Enter reviews the scrollable exact target, `y` confirms |
| `q` / Ctrl+C | Quit and cancel outstanding client reads; `q` is text during text entry, Ctrl+C always quits |

The workspace makes no product mutation requests: it does not claim/start work,
prepare or submit ZIPs, export records, poll, acquire tokens or save local
history. Guide metadata is not proof of downloaded-byte integrity. In Guide,
| `q` / Ctrl+C | Quit and cancel outstanding client requests, not committed server effects; `q` is text during text entry, Ctrl+C always quits |

Claim and Start are separate deliberate actions through the existing public
API. Inspect an exact Ready task to claim it; inspect a claimed Mine task to
start it. Supply a UUID key you have saved outside this session, review the
exact action/actor/project/task/key, press `s` to acknowledge the save warning,
then `y` to confirm. Enter alone never sends the action. The workbench does not generate or persist these keys. Save the
action, task ID and key together for recovery; this slice omits the optional
reason. A read or displayed action is not write authority.

There is no automatic retry or claim-to-start chain. A lost response means
unknown outcome, not rollback. Explicit replay uses the unchanged action, task
and key (`p`, then review and acknowledge with `s` and confirm with `y`);
a later denial cannot prove the earlier request failed. Quit cancels
the client request, not any committed server effect. After restarting, use the
explicit CLI with your saved inputs and the same API origin and actor. Do not
substitute a fresh key or infer success from a refreshed list. Automatic
crash-safe recovery is not implemented.

The workspace does not prepare or submit ZIPs, export records, poll, acquire
tokens or save local history. Guide metadata is not proof of downloaded-byte integrity. In Guide,
select one document, enter an existing real directory and confirm its label,
document/task IDs, path, UUID filename, byte count and hash. Verified bytes are
published under that filename without overwriting an existing file. Cancelled
Expand All @@ -72,11 +91,12 @@ automatically.
A denial clears affected content; expired authentication clears the session's
work data. A failed current read clears its content and continuation and is
shown as unavailable, never as an empty queue or successful operation. Refresh
is deliberate. No background request retries or write recovery occur. The
is deliberate. A confirmed write receipt remains distinct from a failed refresh;
minimal inert replay references do not restore protected task content. The
profile read may perform Workstream's existing actor
admission, last-seen and audit effects; “read-only” does not mean no server-side
effects. This local interface does not establish a deployed service, payment,
or future write/management workflows. See the [terminal presentation contract](../docs/design/cli-terminal-experience.md).
admission, last-seen and audit effects. This local interface does not establish
a deployed service, payment or complete submission/management workflows. See
the [terminal presentation contract](../docs/design/cli-terminal-experience.md).

## Explicit commands

Expand Down Expand Up @@ -375,8 +395,9 @@ and contribution evidence with PostgreSQL, MinIO and Celery; see
[the journey evidence](../.commitrail/initiatives/WS-CLI-001/WS-CLI-001-43.md).
That proof is not hosted deployment verification or proof of human review.
The [capability ledger](../docs/roadmap_status.md) identifies those remaining
product boundaries. The interactive workspace above is still read-only;
explicit commands remain the interface for supported mutations.
product boundaries. The interactive workspace exposes claim/start alongside
contributor reads and guide downloads; explicit commands remain the interface
for preparation, submission and the other supported mutations.

### Download and install

Expand Down
Loading
Loading