Skip to content

Distill falls back to GitHub when .nexus/tmp is gone #174

Description

@sameera

As a lead draining the queue on a different machine, or days after a close whose local tmp was
cleaned, I want /nxs.distill to recover the analyze verdict and the close record's rationale from
GitHub instead of failing outright, so that a wiped local tmp doesn't strand an otherwise-closed
epic.

Acceptance Criteria

  • Given a --pr-closed epic whose .nexus/tmp copy is gone and no committed close-record.md
    exists, when /nxs.distill resolves that entry's why source, then it falls back to
    the epic issue's close comment (posted by /nxs.close Phase 8.2, carrying Key Decisions +
    Deviation Rationale verbatim) with no loss of content versus draining it fresh off the worktree.
  • Given the same missing-tmp condition for an epic with a linked PR, when /nxs.distill
    wants the analyze verdict for its own report, then it can recover it from the PR's published
    review (the existing --pr machine block) rather than treating conformance as unknown.
  • Given a local (non---pr) close whose .nexus/tmp copy is gone and no PR exists for the
    epic, when /nxs.distill --recover <epic-issue> looks for that entry's rationale, then
    it recovers it from the epic issue's close comment exactly as in --pr mode — that comment is
    the durable close record in every mode — rather than treating a local close as unrecoverable.
    (Amended at implementation per record Decision Record: Tmp-First Analyze & Close Artifacts, with GitHub Fallback for Distill #176: this criterion's original premise — that a local
    close leaves no GitHub surface to recover from — is false.)
  • Given an epic issue carrying no trusted close comment (or none carrying the machine
    block), or a recovered range: head that cannot be resolved locally and that no PR resolves,
    when recovery runs, then each is a named per-entry hard block
    (no-close-comment / range-unresolvable) reported precisely — naming the entry and why it
    cannot be drained — never silently treated as "not yet closed", never drained with fabricated
    or empty rationale, and never a silent empty or partial diff.
  • Given the two cases above, when the recovery behavior is implemented, then it traces
    to explicit invariants recorded by /nxs.decision-record for this epic (record Decision Record: Tmp-First Analyze & Close Artifacts, with GitHub Fallback for Distill #176,
    invariants 14 and 15) — this story does not itself mandate the resolution.

Notes

Part of epic #170. Builds on STORY-170.03's tmp-first discovery mechanism in /nxs.distill.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pipelineOrchestration of the Nexus stages and human-decision gatesstoryUser story (created by nxs-gh-create-story)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions