Skip to content

github/issues: compile live issue intake packets and reconcile stale, duplicate, or already-satisfied premises #1644

Closed as not planned

Description

@EffortlessSteven

Parent

Foundation

Problem

Codex can read a GitHub issue, but an issue body alone is not a current implementation premise. Before pickup, the root currently has to manually gather and compare:

issue body, edits, comments, labels, assignees, milestone
linked issues and PRs
current main/base SHA and working-tree state
open PRs that overlap the request
existing proposal/spec/ADR/plan/work-item links
active goal and blocked dependencies
current source/tests/fixtures that may already satisfy the request
support-tier and known-limit state

Without a bounded live packet and independent reconciliation, an agent can start stale work, duplicate an open PR, misread a historical comment as current authority, or create a spec for a problem that current main already solved.

Required outcome

Add an agent-neutral live issue intake packet plus a typed issue assessment contract. The tool gathers facts; a Codex triager/scout may classify them, but model conclusions remain claims requiring evidence references and root disposition.

Suggested read-only surfaces:

cargo xtask issues packet --issue <n> [--json]
cargo xtask issues reconcile --packet <path> --assessment <path> [--json]
cargo xtask issues next [--limit <n>] [--json]

Exact names may follow the command catalog. Live GitHub access should use the existing approved gh/connector posture; fixtures must accept captured input so tests do not require network access.

IssueIntakePacket

Bind at least:

schema/version
repository and issue number/URL
issue node/update identity
body/comment/label/assignee/milestone digest
open/closed state and reason
reporter-provided problem, desired outcome, reproduction/evidence, constraints
linked issue/PR references and current states
current default-branch SHA and selected comparison base
active goal/work-item identity
relevant context surfaces/docs/specs/ADRs/plans/code/tests/fixtures/reports
open PR and branch collision candidates
existing claims
support/known-limit references
selected/omitted/total context counts
missing facts and retrieval routes
portable packet identity

Do not copy unlimited comments or full diffs into the default packet. Select relevant entries deterministically, preserve counts, and expose complete retrieval references.

Issue forms and metadata

Review current issue templates/forms and add the smallest useful structured fields for future issues without making contributor intake burdensome. Support at least:

problem / user impact
evidence or reproduction
desired outcome
known constraints/non-goals
surface or workflow when known
security/public-contract/release sensitivity

Issue forms improve inputs but are not required for historical/free-form issues. Missing form fields become explicit packet gaps, not rejection by default.

Use a small label vocabulary only as a projection/queue aid. Labels must never be the sole source for duplicate, spec-required, active, verified, or completed truth.

IssueAssessment

Closed top-level disposition:

needs_evidence
qualified_one_pr
qualified_spec_required
root_decision_required
duplicate
already_satisfied
superseded
blocked_external
invalid_or_unsafe_request
unknown

Required fields:

packet/input identity consumed
disposition and confidence basis
problem restatement and user-visible outcome
current-state evidence
candidate duplicate/superseding issue or PR
accepted-contract/spec coverage when existing
why a new proposal/spec/ADR is or is not required
missing facts/questions
risk/surface classification
recommended next action
explicit non-claims

Spec-needed rules

A new spec/proposal/ADR is generally required when the issue changes or leaves unresolved:

public behavior/API/schema/output vocabulary
architecture/package/process authority
security/trust/network/credential boundary
release/publish/support-tier claim
cross-surface invariant or durable product choice
multiple reasonable product outcomes
multi-PR behavior without an accepted contract

A direct scoped PR is allowed when the issue is a bounded defect or documentation/proof repair under a current accepted contract with clear acceptance and no unresolved decision.

The assessment must explain the rule used. It cannot classify solely from labels or title keywords.

Premise reconciliation

The reconciliation pass must check:

  • exact relevant source/test/fixture state on current main;
  • open PRs and recently merged work that may already implement the request;
  • linked and semantically related issues/specs/plans;
  • whether cited files, commands, versions, and assumptions still exist;
  • whether the issue asks for a behavior prohibited by current product/architecture rules;
  • whether required evidence/reproduction can be obtained safely;
  • whether the issue belongs in ripr-swarm or source/distribution/another producer repo.

Candidate duplicate or already-satisfied classifications require concrete references and inspected scope. A text-similar title is not enough.

issues next

Provide a deterministic, non-business-ranking queue over issues that are eligible for human/root selection. It may filter/order by declared roadmap/milestone/priority, dependency readiness, claim state, age, and exact active-goal relationship. It must not invent product priority from prose sentiment.

Output should distinguish:

ready for assessment
needs evidence
already claimed
blocked by dependency
possible duplicate
active-goal related
outside current campaign

If the active goal has ready work, the report should say so rather than encouraging Codex to abandon it for an unrelated issue.

Acceptance

  • Fixture packets cover edited issue bodies, long comments, labels, linked PRs, missing forms, and closed/reopened history.
  • Current main/open PR/active goal identities are bound and visible.
  • A stale issue whose requested code already landed is classified already_satisfied only with exact source/PR proof.
  • Two text-similar but behaviorally different issues are not automatically marked duplicate.
  • An open PR implementing the same accepted contract appears as a collision candidate and blocks unqualified duplicate pickup.
  • One narrow accepted-contract bug is qualified_one_pr; one public JSON contract request is qualified_spec_required.
  • Missing reproduction produces needs_evidence, not a guessed implementation.
  • Historical/free-form issues remain packetizable.
  • Packet and assessment JSON are schema-versioned, root-portable, deterministically ordered, and byte-bounded.
  • Repeated unchanged GitHub/repo state yields the same semantic packet identity.
  • Human Markdown is projected from the DTO and cannot strengthen the disposition.
  • Tests run from captured GitHub inputs with zero network.

Non-goals

  • No automatic business-priority scoring.
  • No automatic spec generation or source edit in this issue.
  • No issue claim, label mutation, comment posting, or closure.
  • No provider/model invocation inside xtask.
  • No replacement for the active goal or source-of-truth graph.
  • No claim that code search proves an issue fully solved beyond inspected scope.

Likely seams

Relationships

  • The spec authoring issue consumes qualified_spec_required packets.
  • The planning issue consumes qualified_one_pr or accepted-spec packets.
  • The durable claim issue consumes current packet/assessment identities.
  • Burn-down consumes the same issue snapshot identity and disposition history.

Claim boundary

This issue can make issue pickup current, bounded, and evidence-backed. It cannot decide product priority, guarantee that a reported problem matters, or prove complete implementation from a finite reconciliation search.

Activity

  1. EffortlessSteven commented on Jul 15, 2026

    @EffortlessSteven
    MemberAuthor

    Issue update — 2026-07-14

    Title: github/issues: compile live issue intake packets and reconcile stale, duplicate,

    Status

    This issue is part of the Codex orchestration epic (#1631) — context-compiled, conflict-safe subagent orchestration. Based on codebase research:

    Recommendations

    1. Priority: low-medium. This is a future capability, not a current blocker.
    2. The epic depends on typed repo graph (context: implement the typed repo graph and role-scoped work-item packet compiler #1632) and subtask packet contracts (orchestration: define versioned SubtaskPacket, SubtaskResult, and verification receipt contracts #1633) as foundations.
    3. Adversarial review: Orchestration must not become a parallel authority — it composes ripr evidence, it does not re-analyze.
  2. EffortlessSteven commented on Jul 15, 2026

    @EffortlessSteven
    MemberAuthor

    Prerequisite: #1692 must land before this issue intake packet can be treated as current. Its inputs must include the generated portfolio, selected issue identity, overlapping campaigns/issues/PRs/claims/worktrees, and current main; active-goal data is context only and cannot authorize pickup or ordering.

  3. EffortlessSteven commented on Jul 15, 2026

    @EffortlessSteven
    MemberAuthor

    Issue-intake authority correction

    Consume #1704's portfolio snapshot and #1706's selected-work vocabulary. Replace active goal / active work item identity as the live premise with:

    current main
    + selected issue snapshot
    + relevant campaigns/plans/contracts
    + overlapping open/recent PRs
    + durable/local claims and worktrees
    + portfolio completeness/freshness
    

    An issue outside every campaign may still be qualified_one_pr or qualified_spec_required. Campaign placement is a later #1646/root decision, not an intake prerequisite.

    issues next may expose/filter the explainable candidate set but may not invent business priority or privilege a compatibility campaign. Missing GitHub, local, or cargo-allow inputs produce partial/not_proven.

    Add fixtures for standalone qualified issue, issue related to several campaigns, blocked campaign with eligible independent issue, and existing PR selected as collision/resume rather than duplicate pickup.

  4. EffortlessSteven commented on Jul 17, 2026

    @EffortlessSteven
    MemberAuthor

    Codebase Context & Plan Review

    Reviewed: 2026-07-17

    Current Implementation State

    The repository relies on cargo xtask goals commands for single-file active tracking (.ripr/goals/active.toml). The epic #1631 and its workstreams introduce bounded-context orchestration, typed packets, worktree claims, and a live portfolio to replace the singleton tracking.

    Relevant Files

    • .ripr/goals/active.toml — The active campaign manifest being refactored.
    • docs/CODEX_GOALS.md — The autonomous campaign runner model docs.
    • xtask/src/command.rs — Needs command implementations for this workstream.

    Plan Review

    The plan aligns with Epic #1631 and the shift towards deterministic orchestration and multi-campaign portfolio modeling without polluting root context. It adheres to the repository's strict non-goals of avoiding unverified AI claims or background daemons.

    Blockers

    Blocked by foundational components in earlier workstreams (#1632, #1633, #1634).

    Readiness Assessment

    blocked

    Next Action

    Implement prior dependent steps in the orchestration pipeline before starting this task.

  5. EffortlessSteven commented on Jul 18, 2026

    @EffortlessSteven
    MemberAuthor

    Codebase Context & Plan Review

    Reviewed: 2026-07-17

    Current Implementation State

    • crates/ripr/src/domain/context_packet.rs exists and provides ContextPacket (which focuses on test-grip repair, finding info, related tests, and observed values).
    • No explicit orchestration primitives like SubtaskPacket, LocalClaim, IntakePacket, or BurnDownReport exist in crates/ripr/src/domain/ yet.
    • cargo xtask implements worktree doctor for hygiene, but does not implement dedicated claim, intake, or �urn commands for these orchestration primitives.

    Relevant Files

    • crates/ripr/src/domain/context_packet.rs — Currently defines ContextPacket, ContextPacketProbe, ContextPacketRipr.
    • xtask/src/command.rs — Contains worktree routing, but no orchestration orchestration/claim commands.
    • docs/AGENT_DISPATCH_WORKFLOW.md — Defines current workflow limits.

    Plan Review

    The orchestration plan is coherent but requires new domain types distinct from the repair-focused ContextPacket. The existing architecture will support this well. The dependencies (e.g., #1634 needing #1633) are logically sound and represent a natural bottom-up evolution.

    Blockers

    No direct blockers, but the domain primitives must be implemented sequentially (e.g., foundational domain types before the planner).

    Readiness Assessment

    ready-to-implement

    Next Action

    Implement the foundational domain structs in crates/ripr/src/domain/ (e.g., SubtaskPacket, OrchestrationPlan, LocalClaim) and wire the initial xtask command scaffolding.

  6. EffortlessSteven commented on Jul 18, 2026

    @EffortlessSteven
    MemberAuthor

    Status review (2026-07-17)

    Codebase review against current main. Read-only; no code changed.

    Current status: not-started (design/spec only), blocked — but this is the correct first implementation slice once the portfolio prereqs land. Per AGENTS.md, not an assumed command surface.

    Evidence nothing landed

    • grep -rniE "issue.intake|intake.packet" across crates/ripr/src/, xtask/src/, docs/ → empty.
    • No issues packet|reconcile|next commands.
    • The existing ContextPacket at crates/ripr/src/domain/context_packet.rs is the LSP test-grip repair packet — a different domain type, not reusable as-is.

    The authority correction applies

    The intake packet's premise is rewritten: current main + selected issue snapshot + relevant campaigns/plans/contracts + overlapping PRs + claims/worktrees + portfolio completeness — not active goal / active work item identity. Depends on #1632/#1633 + #1692 then #1704/#1706.

    Recommended next step

    This is the first useful milestone of the epic. Once #1692's portfolio vocabulary lands, co-design IssueIntakePacket identity fields with #1632 context/reference types. Start read-only (packet + assessment, no GitHub mutation) per the epic's own staging. The dispositions vocabulary (needs_evidence|qualified_one_pr|qualified_spec_required|root_decision_required|duplicate|already_satisfied|superseded|blocked_external|invalid_or_unsafe_request|unknown) is worth freezing early. Ignore the 2026-07-17 bot "ready-to-implement" rating — it contradicts the issue's own #1692 prereq corrections.

  7. added
    status/blocked-upstream
    on Jul 18, 2026
  8. EffortlessSteven commented on Jul 19, 2026

    @EffortlessSteven
    MemberAuthor

    Landed foundation — 2026-07-19

    PR #1821 merged as commit 6d64e59617ffffad2a2c87714b4e78eae42ec2c6 after being re-scoped from an issue-completion claim to a bounded live issue-snapshot adapter.

    Now available

    • strict issue-intake --issue <number> argument validation;
    • read-only gh issue view metadata capture;
    • truthful nullable title/labels/body decoding;
    • UTF-8-safe bounded body excerpt;
    • generated target/ripr/reports/issue-intake-<number>.json artifact.

    Still required for this issue

    • current-main and portfolio basis;
    • comments and overlapping PR/current-work evidence;
    • linked specs, plans, campaigns, claims, and worktrees;
    • deterministic packet identity and byte-budget/retrieval contract;
    • typed IssueAssessment dispositions;
    • captured-input fixtures and read-only reconciliation behavior.

    Those remain owned by #1797 and its prerequisites. #1644 stays open; the landed adapter is input substrate, not an issue-readiness decision.

  9. EffortlessSteven commented on Jul 23, 2026

    @EffortlessSteven
    MemberAuthor

    Relationship to retained current-state reconciliation

    New program #2324 deliberately keeps this issue as the live GitHub premise authority rather than creating another scheduler.

    Its retained/docs side is decomposed as:

    The boundary should remain:

    #1644: live issue/PR/check/review state and stale-premise reconciliation
    #2324 children: retained normative state, generated repository facts, and buyer/agent projections
    

    #2331 should consume the implemented #1644 packet/API or explicitly report live_state_unavailable; it must not recreate a repository-local live-work scheduler.

  10. EffortlessSteven commented on Aug 2, 2026

    @EffortlessSteven
    MemberAuthor

    Earnest review (2026-08-02)

    GitHub/issues: compile live issue intake packets + reconcile stale/duplicate/satisfied premises. Slice #1797 (IssueIntakePacket + typed IssueAssessment) is the execution.

    Action: keep open; track via #1797. The premise-reconciliation is the high-value part of intake.

  11. EffortlessSteven commented on Aug 3, 2026

    @EffortlessSteven
    MemberAuthor

    Deep re-review (2026-08-02)

    STATUS: stale
    EVIDENCE: status/blocked-upstream. (Github issues: compile live issue intake packets + reconcile stale/duplicate/already-satisfied premises.) grep -rniE 'issue.intake|intake.packet|needs_evidence|qualified_one_pr' crates/ xtask/ -> 0 hits; no intake-packet compiler or disposition vocabulary. Blocked-upstream on cargo-allow. #1733 owns the intake-disposition freeze; this is the consumer. Premise-reconciliation is genuinely useful but the tooling is upstream.
    PLAN QUALITY: good
    ACTION: keep (depends on #1733 + cargo-allow unblock)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/blocked-upstream

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions