Skip to content

Client agent-grade reads: board-search verb + bounded body consumption (v7.58.0) - #76

Merged
SSFSKIM merged 16 commits into
mainfrom
client-agent-grade-reads
Aug 20, 2026
Merged

SSFSKIM merged 16 commits into
mainfrom
client-agent-grade-reads

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Aug 20, 2026

Copy link
Copy Markdown
Owner

What

The dp-side client epic for arkho#12's read surface (server merged as arkho#17, live). The board client now speaks the whole agent-grade read contract:

  • _board_api.py helpers — tickets_search(q, states, principal) (complete envelope walk of /tickets?q=, urlencoded quote(q, safe=""), id-keyed dedupe preserving server order); include_body arms on ticket() / tickets_by_ids() with the 20-id chunk cap (_MAX_BODY_IDS); a client-side claim-gate guard — a run bearer (BOARD_RUN_TOKEN set) dies pre-request with the same verdict the server would 403.
  • board-search.sh (new verb, both bindings) — API arm: all states, server relevance order, --states filter, --bodies first-≤20 hydrate-before-print, -- end-of-options for negation-leading queries; gh arm: gh issue list --state all --search, --states refused exit 2, --bodies note-and-proceed.
  • board-show.sh — body between header and timeline via one ?include=body read; run-context degrades to body: claim-served (a run reads its statement of work from the claim payload).
  • SKILL.md — dedup/prior-art prose routes through the verb (one route, no inline gh spelling); Toolkit rows updated.
  • Tests — new fixture-driven mock suite test-agent-grade-reads.sh (41 drills: wire-path pins, pagination walk, chunk split, claim-gate reqs=[0], run-context, both arms).

Contract adjudications (spec v1.3 Decision Log)

Two points moved during execution, surfaced by task review and adjudicated as reversible: the gh arm searches all states (the verb's charter is prior-art; closed hits are the evidence), and -- makes dash-leading queries reachable.

Verification

  • Hermetic suite: 18 passed / 0 failed (mock tier; one SIGPIPE-class flake re-ran green on the identical tree).
  • Integration tier: 8/8 PASS against a real arkho board-service (arkho main incl. the agent-grade reads server, scratch Postgres container) — the new client drove the live contract end to end.
  • Version 7.58.0 via bump-version.sh, audit clean. Full SDE trail in .doperpowers/sdd/2026-08-20-client-agent-grade-reads/ (5 tasks, per-task reviews, final whole-branch review verdict READY).

Follow-up

Suite-hygiene issue filed separately: exit-status pinning helper + BOARD_RUN_TOKEN hermeticity (final review triage #1+#7).

SSFSKIM added 16 commits August 20, 2026 20:25
…an, gh-arm note-and-proceed, Toolkit-table consumer, wire-spelling pins
…ministic gh stub, walk drill, log-reset counts, runner registration
…-` frees the negation query

Task-2 review adjudications, four findings:

- gh arm searches `--state all`, not `--state open`. The verb's charter is
  the prior-art check and a closed hit is the evidence; the API arm already
  spans every state, so open-only made the two bindings answer different
  questions.
- `--` ends the options. `-*)` made the advertised negation grammar
  (`"-deprecated migration"`) unreachable on the command line; the escape is
  the one route to it. A dash-leading token WITHOUT `--` is still usage.
- The listing header prints AFTER hydration, so a hydration death leaves no
  output at all — the no-partial-listing claim becomes literal.
- `--states ""` is refused instead of silently widening back to all states:
  an assigned empty value is indistinguishable from an absent flag, so the
  arity guard now checks the value too.

Drills: the `--` escape reaching the wire as `q=-alpha%20beta`, the bare
dash-leading token as usage with zero requests, the empty `--states` value as
usage with zero requests, and (closing a review coverage gap) a positive
`--states` drill through the verb.
Spec: §2 gains the `--` escape and the empty-`--states` refusal, the gh arm
delegates `--state all`, hydration precedes ALL output (header included), and
acceptance 5 carries the new spelling. The All-states Decision Log entry now
records that v1.2's open-only gh rationale ("proven spelling") lapsed once §4
routed every prior-art prose route through this one verb — the review's
purpose argument won; the `--states`-refusal reasoning (gh's state model
cannot tell `done` from `wontfix`) still stands, and is what makes a coarse
all-states sweep the honest delegate.

Plan: the Global Constraint gh spelling, Task 2's embedded verb source and
drill block (both re-synced byte-for-byte with the shipped files), and Task
4's Toolkit row. Task 4 has not run — its implementer transcribes the plan,
so the Toolkit row's spelling is load-bearing, not cosmetic.
…tion)

Also restores the exec bit on tests/claude-code/board-api/test-agent-grade-reads.sh
(committed 100644; every sibling test is 100755, and run-skill-tests.sh
chmod +x'd it on disk at first run).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 18eb58e54c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if include_body:
_claim_gated("include=body")
path += "?include=body"
out = request("GET", path, principal=principal, absent=("not-found",))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject bodyless hydration responses

When an API deployment predates this capability or a mixed-version instance ignores the unknown include=body parameter, this request can succeed with the ordinary thin ticket row. The caller then renders t.get("body") or "", falsely presenting an existing statement of work as empty; the batch helper similarly lets board-search --bodies claim hydration while printing blanks. Validate that every successful include_body=True result actually contains a body field and fail closed on version-skewed responses.

Useful? React with 👍 / 👎.

Comment on lines +50 to +53
run_py() { PYTHONPATH="$SCRIPTS" BOARD_API_URL="http://127.0.0.1:$PORT" \
BOARD_CREDENTIALS_FILE="$CREDS" python3 -c "$1"; }
run_py_as_run() { PYTHONPATH="$SCRIPTS" BOARD_API_URL="http://127.0.0.1:$PORT" \
BOARD_CREDENTIALS_FILE="$CREDS" BOARD_RUN_TOKEN=run-tok python3 -c "$1"; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clear inherited run credentials in non-run test helpers

When this suite is launched by a board worker whose environment exports BOARD_RUN_TOKEN, run_py and the ordinary verb/show wrappers inherit that token, so every positive search or body-hydration call takes the claim-gated path instead of exercising the intended automation path. Running the new test this way immediately produces zero requests and multiple false failures; clear BOARD_RUN_TOKEN in every non-run wrapper and set it only in the explicit *_as_run helpers.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant