Skip to content

feat(github): inform sessions of pull request status - #67

Merged
akonwi merged 1 commit into
mainfrom
feat/github-pr-status
Oct 10, 2026
Merged

akonwi merged 1 commit into
mainfrom
feat/github-pr-status

Conversation

@akonwi

@akonwi akonwi commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add a canonical renderer-neutral pull request status model covering checks, required checks, reviews, approvals, and conservative merge readiness
  • extend the daemon GitHub observer with repository-generation fencing and a bounded, consecutively deduplicated rich-status transition stream
  • deliver each meaningful transition to the owning Droid through passive, provenance-labeled Inform boundaries without waking idle sessions or duplicating footer/plugin VCS events
  • document the behavior and complete CORE-GH-002; leave opt-in automatic reactions to CORE-GH-003

How it works

flowchart LR
    GH["GitHub CLI<br/>pr view + required checks"]
    Cache["Daemon cache<br/>20-second refresh"]
    Observer["VCS observer<br/>canonical PR status"]
    Dedupe{"Changed from<br/>previous state?"}
    Footer["Footer stream<br/>PR number + URL"]
    Inform["Droid.Inform<br/>passive boundary"]
    Droid["Droid context<br/>next safe boundary"]

    GH --> Cache --> Observer
    Observer --> Footer
    Observer --> Dedupe
    Dedupe -- No --> Ignore["Ignore duplicate poll"]
    Dedupe -- Yes --> Inform --> Droid
Loading

Distinct transitions are preserved, including a return to an earlier state:

pending ──▶ failed ──▶ pending ──▶ passed
   │           │          │          │
 Inform      Inform     Inform     Inform

pending ──▶ pending
   │           ╰─ unchanged: ignored
 Inform

File ownership:

internal/
├── pullrequest/status.go       canonical renderer-neutral model
├── githubpr/
│   ├── pull_request.go         bounded GitHub queries + normalization
│   └── cache.go                20-second cache, repository generations
├── vcs/
│   ├── status.go               local Git/repository identity
│   └── observer.go             footer + rich transition streams
├── server/vcs_host.go          projects observer into session ports
└── session/
    ├── github_status.go        validates and calls Droid.Inform
    └── manager.go              owns informer lifecycle

Delivery remains passive:

Status changes while idle
  └─ boundary remains pending
     └─ consumed on next user turn

Status changes during active work
  └─ boundary waits for a safe model boundary
     └─ Droid can incorporate it into the current turn

No automatic turn is started
  └─ CORE-GH-003 will own ask/auto-react policy

Validation

  • gofmt -l .
  • git diff --check
  • go build ./...
  • go vet ./...
  • go test ./...
  • go test -race ./...
  • go test -race ./internal/githubpr ./internal/vcs ./internal/session ./internal/server

All validation used isolated temporary KIT_HOME directories. No development daemon or production Kit state was used.

@akonwi
akonwi merged commit f4a7e51 into main Oct 10, 2026
3 checks passed
@akonwi
akonwi deleted the feat/github-pr-status branch October 10, 2026 17:43
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