Problem: IterateLoopInput.reviewContext (packages/gittensory-engine/src/miner/iterate-loop.ts) is a required SelfReviewContext (packages/gittensory-engine/src/miner/self-review-adapter.ts):
export type SelfReviewContext = {
manifest: FocusManifest;
repo: RepositoryRecord | null;
issues: IssueRecord[];
pullRequests: PullRequestRecord[];
bounties?: BountyRecord[] | undefined;
issueQuality?: IssueQualityReport | null | undefined;
confirmedContributor?: boolean | undefined;
inDuplicateCluster?: boolean | undefined;
};
Nothing in packages/gittensory-miner builds one from a real repo today. runMinerAttempt (lib/attempt-runner.js, #5133) requires input.loopInput.reviewContext to already be populated by its caller — so #5132's CLI dispatch cannot construct a valid AttemptInput for a real target without this.
Proposal: A fetcher in packages/gittensory-miner that, given repoFullName + issueNumber, builds a real SelfReviewContext at the same fidelity the live gate itself uses — not a placeholder/empty-default object (a self-review pass over fake context would look real while checking nothing, which is worse than not running self-review at all).
Concretely:
manifest: fetch the repo's manifest source and run it through parseFocusManifest/parseFocusManifestContent (@jsonbored/gittensory-engine). Reuse whatever GitHub-fetch pattern already exists in packages/gittensory-miner/lib/opportunity-fanout.js for the HTTP leg (its githubGetJson/githubHeaders helpers are currently module-private — export them, or add equivalent parallel helpers).
repo/issues/pullRequests/bounties/issueQuality/confirmedContributor/inDuplicateCluster: populate from real GitHub API data for the target repo/issue, matching the RepositoryRecord/IssueRecord/PullRequestRecord/BountyRecord/IssueQualityReport shapes the live gate already produces (check packages/gittensory-engine/src for the live gate's own construction of these records and mirror its data sourcing rather than inventing a new shape).
Deliverables: A tested function (e.g. fetchSelfReviewContext(repoFullName, issueNumber, deps)) in packages/gittensory-miner/lib/, returning a real SelfReviewContext, with unit tests covering each field's construction and the empty/missing-data edge cases (no bounties, no linked PRs, etc.).
Acceptance criteria: #5132's attempt CLI command can call this fetcher and pass its real output as loopInput.reviewContext to runMinerAttempt with no stubbed/empty fields silently substituted.
Boundaries: Scope is the fetcher only — not the CLI dispatch plumbing (#5132) or the coding-agent driver (#5131, done) or slop assessment (#5133, done).
Problem:
IterateLoopInput.reviewContext(packages/gittensory-engine/src/miner/iterate-loop.ts) is a requiredSelfReviewContext(packages/gittensory-engine/src/miner/self-review-adapter.ts):Nothing in
packages/gittensory-minerbuilds one from a real repo today.runMinerAttempt(lib/attempt-runner.js, #5133) requiresinput.loopInput.reviewContextto already be populated by its caller — so #5132's CLI dispatch cannot construct a validAttemptInputfor a real target without this.Proposal: A fetcher in
packages/gittensory-minerthat, givenrepoFullName+issueNumber, builds a realSelfReviewContextat the same fidelity the live gate itself uses — not a placeholder/empty-default object (a self-review pass over fake context would look real while checking nothing, which is worse than not running self-review at all).Concretely:
manifest: fetch the repo's manifest source and run it throughparseFocusManifest/parseFocusManifestContent(@jsonbored/gittensory-engine). Reuse whatever GitHub-fetch pattern already exists inpackages/gittensory-miner/lib/opportunity-fanout.jsfor the HTTP leg (itsgithubGetJson/githubHeadershelpers are currently module-private — export them, or add equivalent parallel helpers).repo/issues/pullRequests/bounties/issueQuality/confirmedContributor/inDuplicateCluster: populate from real GitHub API data for the target repo/issue, matching theRepositoryRecord/IssueRecord/PullRequestRecord/BountyRecord/IssueQualityReportshapes the live gate already produces (checkpackages/gittensory-engine/srcfor the live gate's own construction of these records and mirror its data sourcing rather than inventing a new shape).Deliverables: A tested function (e.g.
fetchSelfReviewContext(repoFullName, issueNumber, deps)) inpackages/gittensory-miner/lib/, returning a realSelfReviewContext, with unit tests covering each field's construction and the empty/missing-data edge cases (no bounties, no linked PRs, etc.).Acceptance criteria: #5132's
attemptCLI command can call this fetcher and pass its real output asloopInput.reviewContexttorunMinerAttemptwith no stubbed/empty fields silently substituted.Boundaries: Scope is the fetcher only — not the CLI dispatch plumbing (#5132) or the coding-agent driver (#5131, done) or slop assessment (#5133, done).