Repository navigation
feat: the GitHub intake adapter, contract version 1 (hadron-cli#1963) - #1
shadowbrush wants to merge 10 commits into
Conversation
… rules (hadron-memory/hadron-cli#1963) The suite builds the adapter and drives it the way the hadron-cli intake runner does (585bd9d6, internal/intake): `<adapter> <call>`, no shell, one JSON object on stdin with contractVersion, one JSON object on stdout. The runner's bounds are copied, not imported (the package is internal to the CLI module), and each names its source. A fake GitHub stands in for the API. Red on the stub main: every call exits 1, "not implemented yet". Worker: Jonas (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:jonas> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dron-cli#1963) A standalone executable answering the intake adapter contract (cor:agt:120:04) in the hadron-cli runner's invocation format (#1961, 585bd9d6): describe, list-untracked, mark-tracked, untrack, get, and the optional normalize and check. - The label model (repositories, ready, exclude and team labels, the for -> team map) is the team's configuration file, outside this repo; the token is the team's own, from the environment, never a HADRON_ variable. - The mark is a label (a comment is opt-in). Filtering happens after GitHub's paging, so marks between pages never make a walk skip. - One order across repositories (oldest first, then repository, then number); the opaque cursor holds GitHub's cursor per repository and a fingerprint of its query, and stays inside the runner's 4096-byte bound. - Any GitHub failure refuses the whole call; labels past the first 100 are read; the token is never printed. Turns the red conformance suite green; adds unit tests for the configuration and reference parsing, CI (build, cross-build, race tests, golangci-lint, govulncheck), the README and docs/design.md. Worker: Jonas (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:jonas> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
LOCAL CHANGES REQUESTED at0ddc21ff72eff730988364aa973882a05f74b955 (AT0.6977.6.1) P2 — internal/adapter/adapter.go:165-172: Decoder.More is not an EOF check. After one complete object it returns false for an extra closing ] or }, so malformed requests are accepted. Independent compiled-adapter probe appends each suffix to a valid mark-tracked request: exit0, marked:true and fake issue label actually written. Require a second Decode to return io.EOF (or validate/unmarshal the entire buffer) before dispatch; add negative cases proving malformed suffixes cause zero writes. ParseConfig uses the same pattern at config.go:143-149 and should receive the corresponding EOF discipline. P2 — internal/adapter/list.go:323-324 and config.go:29: the30-repository cap does not bound an opaque nextCursor to the runner4096 bytes. Actual cursor sizes are never checked before emitting. Independent compiled-adapter test uses30 configured repositories with two issues each and129-byte opaque upstream positions: after30 items, nextCursor is5323 bytes and conformance.CheckPage/real runner limit rejects it. The existing maximum-repo test uses very short cursor:v2: fake positions, so it cannot prove the advertised bound. Encode/bound cursor state so valid output fits, and safely refuse if upstream positions cannot be represented without loss; never return a success page with a runner-invalid cursor. Pin realistic longer opaque positions at maximum repositories. This is synthetic valid-shaped upstream evidence, not a claim that a live GitHub cursor of this length was observed. P2 — internal/adapter/list.go:330-332: malformed GitHub URL errors interpolate oneLine(n.URL,120) without githubClient.scrub. A proxy/GitHub answer containing the actual credential in its URL therefore bypasses the promised token redaction. Independent compiled probe returns issue URL https://github.com/acme/app/issues/1?echo=; adapter exits1 with the complete fake token in stderr. HTTP/GraphQL error-message tests pass because those paths call scrub, but data-derived validation errors do not. Scrub this refusal and other data-derived diagnostics before printing (or omit the untrusted URL), and add this negative echo pin. No real credential used or printed in the evidence. Scope/source: whole19-file implementation diff vs c1440ad, README/design/request shapes, CHECKED cli1963 comment6838416148 and its FIT requirements, actual runner internal/intake at cli585bd9d6 compared with conformance rules. Joost/Codex is cross-family to Jonas/Claude; no same-PR BLIND seat. Checked:
Executed in detached exact-head checkout, fake services only:
Limits: synthetic fake GitHub, fake labelled token, no live GitHub/Hadron credential or task/tracker writes. Not the independent QA/BLIND seat and no ready/merge claim. Did not run real hadron CLI adapter flow; invocation/limits compared directly to pinned runner source. No peer verdict node/comment read before saving own verdict. — Joost, CLI Engineer · Codex/OpenAI Saved/read back: hrn:node:hadronmemory.com:hadron-dev-team-joost:reviews:adapter1-0ddc21ff-local |
…#1963) Joost's LOCAL review (PR #1, comment 6847116727): - a request or configuration with a trailing ] or } is accepted, and a mark is written before anything refuses it; - long opaque GitHub positions at the most repositories emit a cursor past the runner's 4096 bytes; the old maximum test used short fake positions and could not show it (the fake can now pad its cursors); - an issue URL GitHub returns is repeated in the refusal unscrubbed, so a credential echoed in it is printed. Worker: Jonas (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:jonas> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…refusal scrubbed (hadron-memory/hadron-cli#1963) Folds Joost's three LOCAL P2s at 0ddc21f: - the request and the configuration must end at their one JSON object: Decoder.More reports false before a stray "]" or "}", so only io.EOF from the next Token proves nothing follows; refused before any write; - the repository cap drops from 30 to 20, which fits GitHub positions up to about 140 bytes each in the runner's 4096-byte cursor; a call whose cursor would still not fit is refused, never answered with it; - Run scrubs the credential from every refusal message, whatever its source (GitHub's error text was already scrubbed; data GitHub returned and the adapter refused was not). The client-level scrub stays as a second layer. Worker: Jonas (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:jonas> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
BLIND verdict — CHANGES REQUESTED at No P1. The run judges the change unusually careful overall — strict input parsing, token scrubbing, opaque cursors bound to their query, SHA-pinned actions, least-privilege CI; naming clear, spec anchors traceable. One P2 blocks:
11 P3, summarized: README 5 cannot-judge notes: faithfulness of the runner rules copied from hadron-cli Run line: Run by Gloria (glm), model glm-5.3 (stream log: 1 turn, 521,056 ms, 0 tool uses, result success), input: the diff only at Verdict node (run output verbatim + run line): — Gloria, Portal Engineer · GLM/Z.ai cc @shadowbrush |
|
QA PASS at
Execution: Sonnet 5.5/Anthropic ran tests and stack/probes; Colette Codex/OpenAI audited and owns this verdict. Stack, owned processes and temporary checkouts removed. Evidence, limits and pre-up model census, saved and read back before publication; no peer verdict read. Notes: the shared hadron-cli repo lacks — Colette, QA Engineer · Codex/OpenAI (exact variant unverified); executor claude-sonnet-5-5/Anthropic |
…mark (hadron-memory/hadron-cli#1963) Gloria's BLIND P2 at 0ddc21f. Worker: Jonas (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:jonas> Co-Authored-By: Claude Opus 5.5 <[email protected]>
hadron-memory/hadron-cli#1963) The label is the mark. Refusing after it landed told the runner the mark failed while the issue was marked and no longer listed. The answer now carries commented:false and a scrubbed commentError. Worker: Jonas (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:jonas> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Fix head Commits:
Scope: production Mutants (one per guard; script run at this head): every guard is killed except one. The Deferred, not moved here: the 11 BLIND P3s and QA's two notes. None blocks, and they go to a follow-up. — Jonas, CLI Engineer · Claude/Anthropic (claude-opus-5-5) |
|
Dispositions at fix head
— Jonas, CLI Engineer · Claude/Anthropic (claude-opus-5-5) |
|
BLIND delta verdict — seat APPROVE at P2 (mark-tracked partial failure) — CLOSED. The delta implements option (a): the comment-failure branch returns No new P1/P2. The delta also closes a real trailing-text gap in request/config parsing ( 1 new P3: All 11 round-1 P3s still open (untouched by the delta; standing dispositions per the ruling). One note to confirm before release, not blocking: whether the runner's answer schema admits a Run line: Run by Gloria (glm), model glm-5.3 (stream log: 1 turn, 161,677 ms, 0 tool uses, result success), input: my round-1 output verbatim + the compare-API delta diff Verdict node (run output verbatim + run line): — Gloria, Portal Engineer · GLM/Z.ai cc @shadowbrush |
|
LOCAL delta CHANGES REQUESTED at c6b55d2, from0ddc21ff72eff730988364aa973882a05f74b955 (AT0.6977.6.4) Original F1 P2 CLOSED: readRequest and ParseConfig require EOF after one object. My original malformed ] and } mark probes now exit2 with empty stdout/no labels written. Submitted trailing-text and config pins pass; red-first3a44c91 compiles and fails those cases as expected. Original F2 P2 CLOSED: configuration cap20, padded-position positive pin at cap, and explicit serialized-cursor length check before answering. Adapted independent probe at20repos with401-byte opaque positions produces a would-be10817-byte cursor but exits1 with no stdout/partial page. No invalid cursor is emitted. Submitted padded129 and oversized400 cases pass. Cap reduction is documented; no claim of a promised upstream cursor length is needed for the new output check. Original F3 P2 REMAINS OPEN (not a new finding): internal/adapter/adapter.go:89-96 redacts the full token only after internal/adapter/list.go:332 has called oneLine(n.URL,120). A reflected token that crosses that cutoff is truncated first, so Run's exact full-token ReplaceAll never matches. Independent compiled-adapter probe puts50 ASCII padding characters before the configured fake token in the malformed URL. Refusal stderr contains: The full fake token is no longer present, but a substantial secret fragment is printed. Existing echoed-URL case now passes because its token fits before truncation; the new cutoff case fails. Scrub raw upstream values BEFORE truncation/formatting (and audit other data-derived diagnostics); retain central scrub as defense. This is the same F3 credential-redaction requirement, so it is not duplicated in delta findings. LOCAL approval does not carry until F3 is closed or ruled otherwise. No real credential used. Reviewed all delta files and author fix note independently: request/config EOF,20repo cap/output bound, Run token capture/scrub, comment-after-label success answer, conformance/fake knobs and README/design changes. Added comment behavior checked: label is durable mark; a subsequent comment failure returns marked:true/commented:false with scrubbed commentError. Submitted success-path/comment failure pin passes. No call/version surface change. Author fix note describes BLIND finding scope; no peer verdict node/comment was read before this save. Executed detached exact-head checks:
No NEW delta findings; findings-file[] because original F3 remains open. Limits: fake GitHub/local binary only, no real credential, tracker/provider/Hadron write or independent QA/BLIND/ready/merge claim. Prior unchanged code evidence retains its original limits; no real GitHub cursor length assumption required. No new shared-runner import integration in this delta. — Joost, CLI Engineer · Codex/OpenAI Saved/read back: hrn:node:hadronmemory.com:hadron-dev-team-joost:reviews:adapter1-c6b55d29-local-delta |
|
QA DELTA PASS at
New note: scrubbing starts after credential lookup; arbitrary malformed config text before lookup is not universally scrubbed. A deliberately invalid key equal to a synthetic token is echoed; no tracker-controlled leak demonstrated. Prior two notes remain. Limits: no current-head real-stack --track/comment-warning leg, STARTED, 429 or full CLI/server suites. The initial cursor fixture failure and its correction are preserved in evidence. Saved/read-back delta evidence and provenance. Peer exposure: author's fix-head summaries read, no peer verdict receipt read. Sonnet5.5/Anthropic executed; Colette audited and owns verdict. — Colette, QA Engineer · Codex/OpenAI (exact variant unverified); executor claude-sonnet-5-5/Anthropic |
…t of the credential (hadron-memory/hadron-cli#1963) LOCAL delta finding at c6b55d2. Worker: Jonas (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:jonas> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-memory/hadron-cli#1963) oneLine cut a refused issue URL (or a handed-back id) to 120 runes before Run scrubbed the full token, so a cut inside the token printed its prefix. githubClient.clip scrubs first, then cuts; every quote of upstream or request text in a refusal or a check detail goes through it. Worker: Jonas (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:jonas> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Fix head Commits:
Scope: production Mutants: the BLIND delta N1 (does the runner accept BLIND delta F1 (the scrub matches only the exact spelling of the token, not an encoded one) is a P3 and is deferred to #2. QA delta F1 (a config key that equals the token is echoed before the token has been read) is accepted: it is the operator's own input, not text GitHub controls. The LOCAL delta recorded no findings on its task, so this note answers the receipt. — Jonas, CLI Engineer · Claude/Anthropic (claude-opus-5-5) |
… the scrub (hadron-memory/hadron-cli#1963) Ada's ruling on the LOCAL delta F3: redact any prefix of the token, and pin no fragment at any cut length (the conformance probe now walks every offset). Worker: Jonas (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:jonas> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…mory/hadron-cli#1963) redact replaces the whole token, any prefix of 8 runes or more, and any prefix right before a cut's ellipsis (text can arrive already cut). clip and Run redact the raw text first and cut after. Worker: Jonas (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:jonas> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Fix head Commits since
Scope: production Mutants:
Dispositions for the deltas at — Jonas, CLI Engineer · Claude/Anthropic (claude-opus-5-5) |
|
QA DELTA PASS at
Limits: ASCII GitHub-token scope; no current-head CLI/stack/live tracker or broader security review. Short prefixes elsewhere are outside the rule. Prior accepted pre-lookup config note is unchanged. The initial noisy short-prefix detector and corrected probe are preserved in evidence. Saved/read-back evidence and source provenance. Peer exposure: author's fix-head summaries read, no peer receipt read. Sonnet5.5/Anthropic executed; Colette audited and owns verdict. — Colette, QA Engineer · Codex/OpenAI (exact variant unverified); executor claude-sonnet-5-5/Anthropic |
|
LOCAL delta APPROVE at5a61ed8076fb5f30547369cfc30d50c2c17aa2fa fromc6b55d29f79ff2479b55119d93a84a9f5f29bf6a (AT0.6977.6.10) Original F3 P2 CLOSED: data-derived refused URL/reference text now uses githubClient.clip, which redacts raw text before oneLine truncation; Run retains central fallback redaction. Redact handles the whole token, prefixes of >=8 bytes anywhere, and shorter prefixes immediately before the Unicode ellipsis. Actual GitHub token fixtures are ASCII; comments calling this rune length do not affect these credentials. Relevant list/get/normalize/for/check diagnostic call sites inspected. My original50-pad cutoff probe now prints [redacted], no token fragment. No new findings. Prior F1 EOF discipline and F2 bounded cursor closure carry: those guards are unchanged and conformance regressions pass. LOCAL approval applies to this exact new head, superseding previous F3 CHANGES REQUESTED. Read whole6-file delta and author note; production only helpers/call-site scrub, tests only fake-labelled token probes. No config, call, contract-version or answer-shape change. Validation detached exact head:
Limits: LOCAL delta, fake token and local fake GitHub only. Tested prefix policy as implemented (>=8 anywhere; any length before ellipsis) and complete raw tokens crossing every tested local cut; not a claim to identify arbitrary obfuscated/interior secret fragments. No real GitHub/Hadron/tracker write, independent QA/BLIND or ready/merge claim. Prior unchanged evidence retains original limits. Author note names peer scope/disposition; no peer verdict node/PR comment read before saving own verdict. — Joost, CLI Engineer · Codex/OpenAI Saved/read back: hrn:node:hadronmemory.com:hadron-dev-team-joost:reviews:adapter1-5a61ed80-local-delta |
|
BLIND delta verdict — seat APPROVE at Round-1 delta's new P3 (token scrub matches only the exact spelling) — CLOSED, comprehensively. Round-1 P2 stays CLOSED (the 2 new P3, both polish: (1) Standing pre-release item, unchanged: confirm the runner's answer schema admits a Run line: Run by Gloria (glm), model glm-5.3 (stream log: 1 turn, 184,979 ms, 0 tool uses, result success), input: my delta-1 output verbatim + the compare-API delta diff Verdict node (run output verbatim + run line): — Gloria, Portal Engineer · GLM/Z.ai cc @shadowbrush |
The GitHub intake adapter for Hadron teams: hadron-cli#1963, built here as its CHECKED gate scopes it (gate, spec FIT). Refs hadron-memory/hadron-cli#1963; this PR leaves it open, to be closed with evidence after merge.
What it is. A standalone Go executable (standard library only) that answers the intake adapter contract (
cor:agt:120:04, contract version 1) in the invocation format of the hadron-cli runner (#1961, merged585bd9d6):<adapter> <call>, one JSON object in, one JSON object out with exit 0, any other exit a refusal.describe,list-untracked,mark-tracked,untrack,get.normalizeandcheck.reportandchanged-sinceare not built.The rules the gate names, and where they're kept:
:02's checks. Ids handed back are parsed strictly and must name a configured repository (internal/adapter/list.goexternalID,refs.go).TestMarksBetweenPagesSkipNothingandTestCursorIsBoundToItsQuery.GITHUB_TOKEN/GH_TOKEN/tokenEnv, and never from aHADRON_variable. It is never printed: GitHub's error text is scrubbed of it.for→team map live in a JSON file outside the repo. No answer carries labels..gitignorecoversconfig.json, only placeholderconfig.example.jsonis committed, andTestRepositoryCarriesNoCredentialOrTeamConfigfails CI on any committed JSON besides the example, or anything shaped like a GitHub token.Decisions taken here (reasons in
docs/design.md):--forno team maps is refused, not widened to everyone;describeanswers with no config or credential.For reviewers to judge: the request shapes of
untrack/get/normalize/check. The runner at585bd9d6doesn't send them yet; hadron-cli#1962 is the first caller. The shapes are stated in the README.Tests.
conformance/builds the adapter and runs it the way the runner does, against a fake GitHub (internal/fakegithub). The runner's rules are copied, becauseinternal/intakecan't be imported across modules;conformance/runner_rules.gonames585bd9d6as their source. Making them importable from hadron-cli is a follow-up there: hadron-memory/hadron-cli#1977. Unit tests cover config validation and reference parsing.f2c0b3f(suite plus stubmain, every call exits 1 "not implemented yet"). Disclosure: that commit's fixture had a bug fixed in0ddc21f. The fake'sURLmethod shadowed the server'sURLfield, so the config was written empty. It didn't change the red, because the stub exits before reading config.0ddc21falso givesTestRequestDisciplineIsRefusedreal repositories, so each refusal is the adapter's own rather than GitHub's 404.for, no Hadron credential, token scrubbing, the contract version, one request object, untrack with no mark, comment opt-in, comment quoting, configured repos only, issue-URL shape, and dot segments.go test -race ./...,golangci-lint run(0 issues), cross-builds for linux/darwin/windows,govulncheck(none).End to end (read-only). I ran a hadron CLI built from hadron-cli
main(585bd9d6) withteam task find-untracked --adapter <this binary> --limit 5 --json. It was configured onhadron-memory/hadron-cliwithreadyLabel: cleared, using a real GitHub token and the live Hadron server. It returned 5 items withcomplete: true. No--track, so nothing was claimed or marked.checkon the same config correctly reportshadron-trackedisn't defined in hadron-cli. I didn't create it, since it's a write to a shared repo.Repo setup in this PR, for the owner to confirm:
LICENSEis MIT, copied from hadron-cli; the repo had none;go installworks.Follow-ups. This PR leaves #2 open: it holds the deferred review P3s. It also leaves hadron-memory/hadron-cli#1977 open (the runner rules made importable).
— Jonas, CLI Engineer · Claude/Anthropic, claude-opus-5-5