Skip to content

feat(session): opt-in GitHub PR awareness + explicit attach - #1163

Open
heavygee wants to merge 114 commits into
tiann:mainfrom
heavygee:feat/github-pr-awareness
Open

heavygee wants to merge 114 commits into
tiann:mainfrom
heavygee:feat/github-pr-awareness

Conversation

@heavygee

@heavygee heavygee commented Jul 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Structured metadata.externalRefs (GitHub PR identity) + GET external-refs + list PR chip (supersedes feat(session): add structured external refs and PR chip #1161).
  • Opt-in hub setting githubPrAwareness (default off), with GET/PATCH /api/features and a Settings → General switch (HAPI_GITHUB_PR_AWARENESS env pin supported).
  • Explicit session↔PR attachment: PUT /api/sessions/:id/external-refs and PUT /cli/sessions/:id/external-refs (403 when disabled), plus user dialog, hapi link-pr, and MCP link_pr (self-session only).
  • Chip / menu / tools stay dark until the toggle is on. Socket update-metadata cannot sneak externalRefs in while awareness is off.
  • PR health on the chip (ADR D8): optional status / statusCheckedAt / statusAction on GithubPrExternalRef. Meta (or any classifier) caches health on the ref; SessionPrChip renders emoji + #N with status tone (muted when cache older than 2h). Title emoji remains a transitional mirror only.

This is intentionally independent of SystemEvent / inbox / Overseer - upstream gets PR awareness + chip state; event projection stays fork-local for later.

Single tip vs main: collapses former stacked #1161 foundation into this PR (operator: no stacked upstream merges).

Note: unrelated passkey CI unblock (happy to split)

Two files from upstream's new Shared Web/App Passkey browser regression (hub/scripts/test-passkey-browser.ts, hub/src/web/routes/passkey.ts) are carried here only so this PR stays green against current main. Playwright route.fulfill on a 3xx applies Location without the #fragment, so the callback page loads with an empty hash, completePasskeyCallback never postMessages the opener, and #result never populates (15s timeout). Unit tests still pass because they parse Location with Node's URL (fragment survives) and never navigate. The route change is defensive body-parse reuse (Hono caches c.req.text(); not a production auth defect). Standalone branch prepared at heavygee/hapi:fix/passkey-browser-complete-body (6244bfbe3, off upstream/main) — not opened; happy to drop these from #1163 or open that PR if the maintainer prefers.

Test plan

  • bun typecheck
  • Hub: features routes + external-refs PUT (enabled/disabled/unlink) + serverSettings defaults/env
  • Shared: parseGithubPrInput / schema provenance + status fields
  • CLI: MCP bridge / HappyServer tool lists include link_pr (+ ping_peer)
  • Web: SessionPrChip formats #N and status tones; settings language test with AppContext mock
  • Dogfood: enable toggle → link via UI and hapi link-pr → chip appears with status after Meta classify; disable → chip/menu gone, PUT 403
  • Confirm HAPI_GITHUB_PR_AWARENESS=1 pins Settings switch

Issues

Fixes #1162
Ref #1160
Supersedes #1161

heavygee added a commit to heavygee/hapi that referenced this pull request Jul 25, 2026
Extend GithubPrExternalRef with optional status/statusCheckedAt/statusAction
so Meta can write classifier health onto the attachment. Chip renders emoji
+ #N with status tone. Fixes link_pr tool-list expectations in MCP tests.

Part of tiann#1162 / tiann#1163 (awareness + state in one PR).

Co-authored-by: Cursor <cursoragent@cursor.com>
heavygee added a commit to heavygee/hapi that referenced this pull request Jul 25, 2026
Extend GithubPrExternalRef with optional status/statusCheckedAt/statusAction
so Meta can write classifier health onto the attachment. Chip renders emoji
+ #N with status tone. Fixes link_pr tool-list expectations in MCP tests.

Part of tiann#1162 / tiann#1163 (awareness + state in one PR).

Co-authored-by: Cursor <cursoragent@cursor.com>
heavygee added a commit to heavygee/hapi that referenced this pull request Jul 25, 2026
…floor

hapi-meta-daily.sh replaces the hand-rebuilt morning dance: discover,
classify once, retitle, state-gated ping, action queue, and (opt-in)
contribution-state channel events. --backfill-refs writes session<->PR
externalRefs from title scrape, and the classify pass now caches PR
status onto those refs so the web chip can show health instead of the
title (tiann#1163, ADR D8).

hapi-pr-emoji-batch / hapi-pr-session-emoji now share lib/pr-emoji-core.sh
so classification, title building, and ping policy are unit-testable.

hapi-pr-status stops printing PASS when it cannot read check data:
Debian's gh 2.23 rejects `gh pr checks --json`, and the old swallow made
every red PR look green. All PR tooling now requires gh >= 2.80 via
lib/require-gh-version.sh, installable with install-gh-official.sh.

Co-authored-by: Cursor <cursoragent@cursor.com>
heavygee added a commit to heavygee/hapi that referenced this pull request Jul 25, 2026
…otes

ADR for tiann#1163 records the decisions behind opt-in awareness,
externalRefs as sole attach authority, and D8: PR health lives on the
chip via cached status on the ref, with the title emoji kept only as a
transitional mirror. Awareness, attach, and chip status ship as one
upstream PR.

Also lands the contribution-state framing/ingest notes and the peer
briefs that the operator guide's Meta PR watcher section links to, so
those references resolve in-tree.

Co-authored-by: Cursor <cursoragent@cursor.com>
heavygee added a commit to heavygee/hapi that referenced this pull request Jul 27, 2026
Extend GithubPrExternalRef with optional status/statusCheckedAt/statusAction
so Meta can write classifier health onto the attachment. Chip renders emoji
+ #N with status tone. Fixes link_pr tool-list expectations in MCP tests.

Part of tiann#1162 / tiann#1163 (awareness + state in one PR).

Co-authored-by: Cursor <cursoragent@cursor.com>
heavygee added a commit to heavygee/hapi that referenced this pull request Jul 27, 2026
Extend GithubPrExternalRef with optional status/statusCheckedAt/statusAction
so Meta can write classifier health onto the attachment. Chip renders emoji
+ #N with status tone. Fixes link_pr tool-list expectations in MCP tests.

Part of tiann#1162 / tiann#1163 (awareness + state in one PR).

Co-authored-by: Cursor <cursoragent@cursor.com>
heavygee added a commit to heavygee/hapi that referenced this pull request Jul 28, 2026
Extend GithubPrExternalRef with optional status/statusCheckedAt/statusAction
so Meta can write classifier health onto the attachment. Chip renders emoji
+ #N with status tone. Fixes link_pr tool-list expectations in MCP tests.

Part of tiann#1162 / tiann#1163 (awareness + state in one PR).

Co-authored-by: Cursor <cursoragent@cursor.com>
heavygee added a commit to heavygee/hapi that referenced this pull request Jul 28, 2026
Extend GithubPrExternalRef with optional status/statusCheckedAt/statusAction
so Meta can write classifier health onto the attachment. Chip renders emoji
+ #N with status tone. Fixes link_pr tool-list expectations in MCP tests.

Part of tiann#1162 / tiann#1163 (awareness + state in one PR).

Co-authored-by: Cursor <cursoragent@cursor.com>
@heavygee
heavygee force-pushed the feat/github-pr-awareness branch from 6ab1f2f to 1e62cb7 Compare July 30, 2026 10:29
heavygee added a commit to heavygee/hapi that referenced this pull request Jul 30, 2026
Extend GithubPrExternalRef with optional status/statusCheckedAt/statusAction
so Meta can write classifier health onto the attachment. Chip renders emoji
+ #N with status tone. Fixes link_pr tool-list expectations in MCP tests.

Part of tiann#1162 / tiann#1163 (awareness + state in one PR).

Co-authored-by: Cursor <cursoragent@cursor.com>
@heavygee

Copy link
Copy Markdown
Collaborator Author

Collapsed stack: #1161 closed as superseded. This PR is now a single tip vs main with the full product delta (foundation externalRefs/chip + awareness/attach/status). Local merge into upstream/main is clean; GitHub mergeable may take a moment to recompute after force-push.

@heavygee

Copy link
Copy Markdown
Collaborator Author

Reshaped chip status model for upstream honesty:

  • Protocol now stores forge facts only (openState / checks / merge / statusCheckedAt) plus opaque estateCode.
  • Removed Meta vocabulary from protocol (clean/needs_work/pre_pr, statusAction, emoji helpers).
  • Presentation comes from $HAPI_HOME/pr-chip-display.json (defaults are generic; estate file overrides terms). Served as prChipDisplay on GET /api/features.

Estate sample + Meta writer updates live on the fork tooling tree (not in this PR).

heavygee and others added 12 commits July 30, 2026 16:54
Add optional metadata.externalRefs for durable session↔GitHub PR
identity and a clickable primary-PR chip on session list rows, plus
GET /api/sessions/:id/external-refs. Fixes titles-as-identity hacks
without title parsing (tiann#1160).

Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent structured PR chips from linking outside the declared GitHub repository and pull request.

Co-authored-by: Cursor <cursoragent@cursor.com>
Carry forward metadata.externalRefs when consolidating into a replacement
session row that omitted them (explicit new values still win). Move
group/session-row back onto the focusable list button so keyboard tooltips
reveal correctly (PR tiann#1161 review).

Co-authored-by: Cursor <cursoragent@cursor.com>
Preserve metadata.externalRefs when CLI pickExistingSessionMetadata and
hub updateSessionMetadata receive sparse replacements that omit the
field; explicit incoming refs (including []) still win. Closes the
resume/bootstrap data-loss path left after mergeSessions (PR tiann#1161).

Co-authored-by: Cursor <cursoragent@cursor.com>
Add hub githubPrAwareness (default off), features API, PUT/CLI external-refs
write path, Settings toggle, link dialog, hapi link-pr, and MCP link_pr so
sessions can attach to PRs without title scraping. Depends on tiann#1161 schema.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extend GithubPrExternalRef with optional status/statusCheckedAt/statusAction
so Meta can write classifier health onto the attachment. Chip renders emoji
+ #N with status tone. Fixes link_pr tool-list expectations in MCP tests.

Part of tiann#1162 / tiann#1163 (awareness + state in one PR).

Co-authored-by: Cursor <cursoragent@cursor.com>
SettingsGeneralPage now reads githubPrAwareness via useAppContext /
useFeatures; wrap the settings page suite with mocks so the language
inline test stops throwing AppContext is not available.

Co-authored-by: Cursor <cursoragent@cursor.com>
Chip was a trailing sibling outside the row button, so rows with chips
shoved the relative-time column left. Keep time as the stable trailing
meta; optional chip sits immediately before it.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cache honesty for Meta-filled externalRefs — never live-query GitHub from
the browser; stale chips show ? and a muted tone.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace Meta babysit status enums with GitHub-shaped openState/checks/merge
plus opaque estateCode. Chip terms (emoji, action prose) come from
$HAPI_HOME/pr-chip-display.json served on GET /api/features.

Co-authored-by: Cursor <cursoragent@cursor.com>
@heavygee

Copy link
Copy Markdown
Collaborator Author

Rebased onto upstream/main (conflict was SessionHeader vs #1244 machine/last-active meta — kept both Link PR + header meta). Local merge into main is clean; waiting on GitHub mergeable recompute + CI.

@heavygee
heavygee force-pushed the feat/github-pr-awareness branch from 82f41c3 to b8ba128 Compare July 30, 2026 16:55
Resolve conflicts with rich-composer SessionRowSummary refactor: PR chip
renders via SessionRowSummary trailing column. MCP bridge keeps link_pr
alongside upstream inspect_peer.

Co-authored-by: Cursor <cursoragent@cursor.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links and explicit attachment address fragile title-based identification. Default-off controls accommodate installations without GitHub workflows.

Evidence

  • Issue #1160 requests structured PR identity and clickable session-list links; the base repository has no externalRefs capability.
  • Issue #1162 specifies explicit attachment, opt-in controls, and retention of stored links when disabled.

Approach — Pass

Validated metadata, namespace-scoped APIs, versioned mutations, and gated UI/MCP surfaces provide a viable solution. Cached health avoids GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and optional cached forge facts.
  • hub/src/sync/sessionCache.ts:1350 applies attachment mutations against stored metadata within version retries.
  • hub/src/web/routes/features.ts:51 restricts setting changes to the owner namespace and respects environment pins.

Suggestions

  • Update the PR description to describe openState, checks, merge, and estateCode; it still references removed status/statusAction fields.

Code — Reviewed

Reviewed the entire merge-base diff at 8405d21 and relevant surrounding code. No actionable defects were identified. Runtime behavior was assessed statically.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • Fixed-head integration, windows-codex-mcp, and fixture drift checks passed. The main test check remained in progress at the last observation.
  • No PR code, tests, builds, or scripts were executed locally. Git diff whitespace validation passed.
  • The snapshot leaves manual linking/toggle and environment-pin checks unchecked. Disabled-awareness row memoization and stdio bridge toggle propagation lack focused regression coverage.

HAPI Bot

Rematch tiann#1163 after CONFLICTING (3 commits behind: 0.35.1, chunked
uploads, steer permission deny).

Co-authored-by: Cursor <cursoragent@cursor.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Needs changes (1 Major)

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links and explicit attachment address fragile title-based identification. Default-off controls accommodate installations without GitHub workflows.

Evidence

  • Issue #1160 requests structured PR identity and clickable session-list links; the base implementation lacks this capability.
  • Issue #1162 specifies explicit attachment, opt-in controls, and retention of stored links when disabled.

Approach — Pass

Validated metadata, namespace-scoped APIs, versioned mutations, and gated UI/MCP surfaces provide a viable solution. Optional cached health avoids GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and optional cached forge facts.
  • hub/src/sync/sessionCache.ts:1350 applies attachment mutations within metadata-version retries.
  • hub/src/web/routes/features.ts:51 restricts setting changes to the owner namespace and respects environment pins.

Suggestions

  • Update the PR description to describe openState, checks, merge, and estateCode; it still references removed status/statusAction fields.

Code — Reviewed

Reviewed the entire fixed-head merge-base diff and relevant surrounding code. Found one startup regression involving preallocated sessions. Assessment was static.

  • [Major] Preserve the preallocated session tag when attaching a PR — hub/src/sync/sessionCache.ts:1391

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed.
  • For fixed HEAD 46c059f, GitHub reported only the advisory pr-review check in progress; no test/build results were available.
  • Git diff whitespace validation passed.
  • Added tests do not cover external-ref writes before preallocated-session adoption. The snapshot also leaves manual linking/toggle and environment-pin checks unchecked.

HAPI Bot

Comment thread hub/src/sync/sessionCache.ts Resolved
External-ref metadata writes used to clear the preallocation tag, so
adoptPreallocatedSession failed after an early link. Pass
preservePreallocation and cover stub → link → adopt.

Co-authored-by: Cursor <cursoragent@cursor.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links and explicit attachment address fragile title-based identification. Default-off controls support installations without GitHub workflows.

Evidence

  • Issue #1160 requests structured PR identity and clickable session-list links, which the base implementation lacks.
  • Issue #1162 specifies explicit attachment, opt-in controls, and retention of stored links when disabled.

Approach — Pass

Validated metadata, namespace-scoped APIs, versioned mutations, and gated UI/MCP surfaces provide a viable solution. Cached health avoids GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and optional cached forge facts.
  • hub/src/sync/sessionCache.ts:1350 applies external-ref mutations against stored metadata with version retries.
  • hub/src/web/routes/features.ts:51 restricts setting changes to the owner namespace and respects environment pins.

Suggestions

  • Update the PR description to describe openState, checks, merge, and estateCode; it still references removed status/statusAction fields.

Code — Reviewed

Reviewed the entire fixed-head merge-base diff and relevant surrounding code. The previous preallocated-session startup defect is fixed with preservePreallocation and regression coverage. No remaining actionable defects were identified through static analysis.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed locally. Git diff whitespace validation passed.
  • For HEAD 199bc6d, GitHub reported successful typecheck and selected end-to-end steps, plus successful integration, windows-codex-mcp, and fixture drift-gate checks. The main test job remained in progress when inspected.
  • Added tests cover attaching a PR before preallocated-session adoption. The snapshot still leaves manual linking/toggle and environment-pin checks unchecked.

HAPI Bot

Rematch tiann#1163 after CONFLICTING (5 commits behind). Keep sibling PR
chip beside upstream hover unpin/archive quick actions.

Co-authored-by: Cursor <cursoragent@cursor.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed (1 Minor)

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links and explicit attachment address fragile title-based identification. Default-off controls support installations without GitHub workflows.

Evidence

  • Issue #1160 requests structured PR identity and clickable session-list links, which the base implementation lacks.
  • Issue #1162 specifies explicit attachment, opt-in controls, and retention of stored links when disabled.

Approach — Pass

Validated metadata, namespace-scoped APIs, versioned mutations, and gated UI/MCP surfaces provide a viable solution. Cached forge facts avoid GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and optional cached forge facts.
  • hub/src/sync/sessionCache.ts:1350 applies external-ref mutations against stored metadata with version retries.
  • hub/src/web/routes/features.ts:51 restricts setting changes to the owner namespace and respects environment pins.

Suggestions

  • Update the PR description to describe openState, checks, merge, and estateCode; it still references removed status/statusAction fields.

Code — Reviewed

Reviewed the entire fixed-head merge-base diff and relevant surrounding code. One session-row layout regression needs correction.

  • [Minor] Reserve space for both quick actions beside the PR chip — web/src/components/SessionList.tsx:1488

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed. Git diff whitespace validation passed.
  • For HEAD 8bbfd3d, integration, windows-codex-mcp, and fixture drift-gate checks passed; the main test check remained in progress.
  • The added session-list chip test covers an inactive, unpinned session and does not exercise overlap with two quick actions.

HAPI Bot

Comment thread web/src/components/SessionList.tsx Resolved
Pinned active rows show Unpin + Archive; reserve the CSS action span
so the chip no longer overlaps Unpin and steals clicks.

Co-authored-by: Cursor <cursoragent@cursor.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links and explicit attachment address fragile title-based identification. Default-off controls accommodate installations without GitHub workflows.

Evidence

  • Issue #1160 establishes the need for structured PR identity and clickable links, which the base implementation lacks.
  • Issue #1162 specifies explicit attachment, opt-in controls, and retention of stored links when disabled.

Approach — Pass

Validated metadata, namespace-scoped APIs, versioned mutations, and gated client surfaces provide a viable solution. Cached status avoids GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and optional cached forge facts.
  • hub/src/sync/sessionCache.ts:1349 applies external-ref mutations against stored metadata with version retries.
  • hub/src/web/routes/features.ts:51 restricts setting changes to the owner namespace and respects environment pins.

Suggestions

  • Update the PR description to describe openState, checks, merge, estateCode, and display profiles; it still references removed status/statusAction fields.

Code — Reviewed

Reviewed the entire fixed-head merge-base diff and relevant surrounding code. No actionable defects found. The previous chip-overlap finding is addressed by action-span-based padding and added regression coverage.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed. Git diff whitespace validation passed.
  • For HEAD 167d779, integration, windows-codex-mcp, and fixture drift-gate checks passed; the main test check remained in progress.
  • The added row-layout regression test checks DOM/style wiring; browser layout and the manual enable/link/disable flow remain unverified.

HAPI Bot

Rematch tiann#1163 after merge state DIRTY/CONFLICTING.

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	hub/src/sync/sessionCache.ts

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links address fragile title-based identification. Explicit attachment and default-off controls support this workflow without imposing it on other installations.

Evidence

  • Issue #1160 requests structured PR identity and clickable session-list links, which the base implementation lacks.
  • Issue #1162 specifies opt-in controls, explicit attachment, and retention of stored links when disabled.

Approach — Pass

Validated metadata, namespace-scoped APIs, versioned mutations, and gated UI/MCP surfaces provide a viable solution. Cached health avoids live GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and optional cached forge facts.
  • hub/src/sync/sessionCache.ts:1370 applies external-ref mutations against stored metadata using version retries.
  • hub/src/web/routes/features.ts:51 restricts setting changes to the owner namespace and respects environment pins.

Suggestions

  • Update the PR description to describe openState, checks, merge, estateCode, and display profiles; it still references removed status/statusAction fields.

Code — Reviewed

Reviewed the entire fixed-head merge-base diff and relevant surrounding code. No actionable defects identified through static analysis. Runtime behavior remains unverified locally.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed. Git diff whitespace validation passed.
  • For HEAD 56eda44, integration, windows-codex-mcp, and fixture drift-gate checks passed; the main test check remained in progress when inspected.
  • Added coverage includes metadata preservation, preallocated-session adoption, feature gates, and chip rendering. Browser layout and the manual enable/link/disable flow remain unverified.

HAPI Bot

…panels

session-group-unread-peek was removed when collapsed groups kept unread
rows in per-row CollapsiblePanels; update the tiann#2443 focus assertion.

Co-authored-by: Cursor <cursoragent@cursor.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links address fragile title-based identification. Explicit attachment and default-off controls fit HAPI without imposing GitHub UI on every installation.

Evidence

  • Issue #1160 establishes the need for structured PR identity and clickable session-list links, absent from the base implementation.
  • Issue #1162 specifies opt-in controls, explicit attachment, and retention of stored links when disabled.

Approach — Pass

Validated metadata, namespace-scoped APIs, versioned mutations, and gated UI/MCP surfaces provide a viable solution. Cached health avoids live GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and optional cached forge facts.
  • hub/src/sync/sessionCache.ts:1370 mutates external refs against stored metadata with version retries.
  • hub/src/web/routes/features.ts:51 restricts setting changes to the owner namespace and respects environment pins.

Suggestions

  • Update the PR description to describe openState, checks, merge, estateCode, and display profiles; it still references removed status/statusAction fields.

Code — Reviewed

Reviewed the entire fixed-head merge-base diff and relevant surrounding code. No actionable defects identified through static analysis; runtime behavior remains unverified locally.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed. Git diff whitespace validation passed.
  • For HEAD 8fd6d9f, integration, windows-codex-mcp, and fixture drift-gate checks passed; the main test check remained in progress.
  • Added coverage includes schema validation, feature gates, metadata preservation, preallocated-session adoption, MCP visibility, and chip rendering. Browser layout and the manual enable/link/disable flow remain unverified.

HAPI Bot

Rematch tiann#1163 after merge state DIRTY/CONFLICTING (tiann#2445 landed).

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	web/src/components/SessionList.quick-unpin.test.tsx

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links, explicit attachment, and default-off controls address the documented use case without requiring a GitHub workflow for every installation.

Evidence

  • Issues #1160 and #1162 specify structured PR identity, clickable chips, explicit attachment, and retention when disabled.
  • The fixed base contains no externalRefs or githubPrAwareness implementation.

Approach — Pass

Validated metadata, namespace-scoped APIs, versioned mutations, and gated UI/MCP surfaces provide a viable solution. Cached status avoids GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and optional cached status.
  • hub/src/sync/sessionCache.ts:1370 updates refs against stored metadata with version retries and preserves preallocated-session adoption.
  • hub/src/web/routes/features.ts:51 restricts feature changes to the owner namespace and respects environment pins.

Suggestions

  • Update the PR description to reflect openState, checks, merge, estateCode, and display profiles; it still describes removed status/statusAction fields.

Code — Reviewed

Reviewed the entire fixed-head merge-base diff and relevant surrounding code. No actionable defects identified through static analysis.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed. Git diff whitespace validation passed.
  • For HEAD cab4517, integration, windows-codex-mcp, and fixture drift-gate checks passed; the main test check remained in progress.
  • Added coverage addresses schema validation, feature controls, metadata preservation, preallocated-session adoption, MCP visibility, and chip rendering. Browser layout and manual enable/link/disable behavior remain unverified.

HAPI Bot

Rematch tiann#1163 after merge state DIRTY/CONFLICTING.

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	hub/src/web/server.ts

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links and explicit attachment address the documented workflow. Default-off controls keep PR surfaces optional.

Evidence

  • Issues #1160 and #1162 specify structured PR identity, clickable chips, explicit attachment, and retention when disabled.
  • The fixed base has no externalRefs or githubPrAwareness implementation.

Approach — Pass

Validated metadata, namespace-scoped APIs, versioned writes, and gated UI/MCP surfaces provide a viable solution. Cached status avoids GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and optional cached forge facts.
  • hub/src/sync/sessionCache.ts:1372 mutates refs against stored metadata with version retries.
  • hub/src/web/routes/features.ts:51 restricts feature changes to the owner namespace and respects environment pins.

Suggestions

  • Update the PR description to describe openState, checks, merge, estateCode, and display profiles; it still names removed status/statusAction fields.

Code — Reviewed

Reviewed the entire fixed-head merge-base diff and relevant surrounding code. No actionable defects identified through static analysis.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed. Git diff whitespace validation passed.
  • For HEAD e7064c4, integration, windows-codex-mcp, and fixture drift-gate checks passed; the main test check remained in progress.
  • Added tests cover schemas, feature controls, metadata preservation, attachment APIs, MCP visibility, and chip rendering. Manual enable/link/disable behavior and browser layout remain unverified.

HAPI Bot

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links and explicit attachment address the documented workflow. Default-off controls make the feature optional and retain existing links when disabled.

Evidence

  • Issues #1160 and #1162 specify structured PR identity, clickable chips, explicit attachment, and opt-in controls.
  • The fixed base has no externalRefs or githubPrAwareness implementation.

Approach — Pass

Validated metadata, namespace-scoped APIs, atomic versioned mutations, and gated UI/MCP surfaces provide a viable solution. Cached forge facts avoid GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR references and optional cached forge facts.
  • hub/src/sync/sessionCache.ts:1372 applies ref mutations against stored metadata with version retries.
  • hub/src/web/routes/features.ts:51 restricts feature changes to the owner namespace and respects environment pins.
  • cli/src/claude/utils/startHappyServer.ts:862 synchronizes MCP tool visibility with hub awareness.

Suggestions

  • Update the PR description to describe openState, checks, merge, estateCode, and display profiles; it still names removed status/statusAction fields.

Code — Reviewed

Reviewed the entire merge-base diff at 09bee21 and relevant surrounding code. No actionable defects identified through static analysis.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed. Git diff whitespace validation passed.
  • For the fixed HEAD, integration, windows-codex-mcp, and fixture drift-gate checks passed; the main test check remained in progress.
  • Added tests cover validation, settings, attachment APIs, metadata preservation, HTTP MCP visibility, and chip rendering. End-to-end enable/link/disable behavior and browser layout remain unverified.

HAPI Bot

Rematch tiann#1163 after Meta dirty ping (false dirty vs CLEAN; 3 commits behind).

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links and explicit attachment address the documented workflow. Default-off controls keep GitHub surfaces optional and retain links when disabled.

Evidence

  • Issues #1160 and #1162 specify structured PR identity, clickable chips, explicit attachment, and opt-in controls.
  • The fixed base contains no externalRefs or githubPrAwareness implementation.

Approach — Pass

Validated metadata, namespace-scoped APIs, versioned mutations, and gated UI/MCP surfaces provide a viable solution. Cached forge facts support status display without GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and optional cached forge facts.
  • hub/src/sync/sessionCache.ts:1372 applies ref mutations against stored metadata with version retries.
  • hub/src/web/routes/features.ts:51 restricts feature changes to the owner namespace and respects environment pins.
  • cli/src/claude/utils/startHappyServer.ts:864 synchronizes MCP tool visibility with hub awareness.

Suggestions

  • Update the PR description to describe openState, checks, merge, estateCode, and display profiles; it still names removed status/statusAction fields.

Code — Reviewed

Reviewed the entire merge-base diff at 725a52e and relevant surrounding code. No actionable defects identified through static analysis; runtime behavior remains unverified.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed. Git diff whitespace validation passed.
  • For the fixed HEAD, GitHub reported only pr-review in progress; no successful test/build checks were available.
  • Added tests cover schemas, settings, attachment routes, metadata preservation, HTTP MCP visibility, permission handling, and chip rendering.
  • End-to-end enable/link/disable behavior, browser layout, and fixture regeneration remain unverified.

HAPI Bot

Rematch tiann#1163 after tiann#2247 landed during prior tip CI settle.

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	hub/src/store/sessions.test.ts

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR identity and explicit attachment address a clear workflow. Default-off controls keep GitHub features optional and preserve existing links when disabled.

Evidence

  • Issues #1160 and #1162 define structured PR identity, clickable chips, explicit attachment, and opt-in controls.
  • The fixed base has no externalRefs or githubPrAwareness implementation.

Approach — Pass

Validated shared metadata, namespace-scoped APIs, versioned mutations, and gated UI/MCP tools provide a viable solution. Cached forge facts support status display without GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and cached forge facts.
  • hub/src/sync/sessionCache.ts:1372 applies external-ref mutations using stored metadata and version retries.
  • hub/src/web/routes/features.ts:51 restricts feature changes to the owner namespace and respects environment pins.
  • cli/src/claude/utils/startHappyServer.ts:864 synchronizes MCP tool visibility with hub awareness.

Suggestions

  • Update the PR description to describe openState, checks, merge, estateCode, and display profiles; it still names removed status/statusAction fields.

Code — Reviewed

Reviewed the entire merge-base diff at b15a911 and relevant surrounding code. No actionable defects identified through static analysis. Runtime behavior remains unverified by this reviewer.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed. Git diff whitespace validation passed.
  • For the fixed HEAD, CI passed typechecking, integration, Windows Codex MCP, and fixture drift checks.
  • The test job failed on a 15-second passkey browser waitForFunction timeout; the general test suite and subsequent browser checks were skipped. No causal connection to this PR was established.
  • Added coverage addresses schemas, settings, attachment routes, metadata preservation, MCP visibility, permission handling, and chip rendering. End-to-end enable/link/disable behavior and env-pinned UI behavior remain unverified.

HAPI Bot

Playwright route.fulfill drops Location fragments on 3xx, so the
callback never received #state/#code and the opener hung. Apply the
fragment via a document navigation in the harness. Also reuse the
parsed complete form body instead of reading the request twice.

Co-authored-by: Cursor <cursoragent@cursor.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links and explicit attachment address a clear workflow. Default-off controls keep GitHub features optional while retaining existing links.

Evidence

  • Issues #1160 and #1162 specify structured PR identity, clickable chips, explicit attachment, and opt-in controls.
  • The fixed base lacks externalRefs and githubPrAwareness support.

Approach — Pass

Shared validation, namespace-scoped APIs, versioned metadata mutations, and gated UI/MCP surfaces provide a viable solution. Cached forge facts support status display without GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and cached forge facts.
  • hub/src/sync/sessionCache.ts:1372 mutates external refs against stored metadata using version retries.
  • hub/src/web/routes/features.ts:51 restricts feature changes to the owner namespace and respects environment pins.
  • cli/src/claude/utils/startHappyServer.ts:864 synchronizes MCP tool visibility with hub awareness.

Suggestions

  • Update the PR description to describe openState, checks, merge, estateCode, and display profiles; it still names removed status/statusAction fields.

Code — Reviewed

Reviewed the entire merge-base diff at 0092ea4 and relevant surrounding code, including the passkey follow-up changes. No actionable defects identified through static analysis. Runtime behavior was not independently verified.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed. Git diff whitespace validation passed.
  • For the fixed HEAD, CI passed typechecking, the passkey browser regression, integration, Windows Codex MCP, and fixture drift checks.
  • At the last observation, the main test job was running browser checks; the general test suite remained pending.
  • Added coverage addresses validation, settings, attachment routes, metadata preservation, MCP visibility, permissions, and chip rendering. End-to-end enable/link/disable behavior and environment-pinned Settings behavior remain unverified.

HAPI Bot

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links and explicit attachment address a clear operator workflow. Default-off controls keep GitHub features optional while retaining stored links.

Evidence

  • Issues #1160 and #1162 specify structured PR identity, clickable chips, explicit attachment, and opt-in controls.
  • The fixed base lacks externalRefs and githubPrAwareness support.

Approach — Pass

Shared validation, namespace-scoped APIs, versioned metadata mutations, and gated UI/MCP surfaces provide a viable solution. Cached status display avoids GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and cached forge facts.
  • hub/src/sync/sessionCache.ts:1372 updates external refs against stored metadata with version retries.
  • hub/src/web/routes/features.ts:51 restricts feature changes to the owner namespace and respects environment pins.
  • cli/src/claude/utils/startHappyServer.ts:864 synchronizes MCP tool visibility with the feature setting.

Suggestions

  • Update the PR description to describe openState, checks, merge, estateCode, and display profiles; it still references removed status/statusAction fields.

Code — Reviewed

Reviewed the entire 79-file merge-base diff at 998985d and relevant surrounding code, including the passkey changes. No actionable defects identified through static analysis. Runtime behavior was not independently verified.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed. Git diff whitespace validation passed.
  • For the fixed HEAD, fixture drift, integration, and Windows Codex MCP checks passed.
  • The main test job remained in progress. Its typecheck, passkey browser regression, and selected browser tests had passed; the general test suite was running.
  • End-to-end feature enable/link/disable behavior and environment-pinned Settings behavior remain unverified.

HAPI Bot

Rematch tiann#1163 after merge state DIRTY (passkey hub discovery + 0.36.4).

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	hub/scripts/test-passkey-browser.ts

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ All stages passed

Review mode: follow-up after new commits

Requirement — Pass

Durable session–PR links and explicit attachment support a clear operator workflow. Default-off controls keep GitHub features optional.

Evidence

  • Issues #1160 and #1162 specify structured PR identity, clickable chips, explicit attachment, and opt-in controls.
  • The fixed base lacks externalRefs and githubPrAwareness support.

Approach — Pass

Shared validation, namespace-scoped APIs, versioned metadata mutations, and gated UI/MCP surfaces provide a viable solution. Cached status avoids GitHub polling.

Evidence

  • shared/src/schemas.ts:110 validates PR identity and cached forge facts.
  • hub/src/sync/sessionCache.ts:1372 mutates refs against stored metadata with version retries.
  • hub/src/web/routes/features.ts:51 restricts feature changes to the owner namespace.
  • cli/src/claude/utils/startHappyServer.ts:864 synchronizes MCP visibility with the feature setting.

Suggestions

  • Update the PR description to describe openState, checks, merge, estateCode, and display profiles; it still references removed status/statusAction fields.

Code — Reviewed

Reviewed the entire 79-file merge-base diff at 7296ca0 and relevant surrounding code, including the passkey changes. No actionable defects identified through static analysis. Runtime behavior was not independently verified.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • No PR code, tests, builds, or scripts were executed. Git diff whitespace validation passed.
  • For the fixed head, fixture drift, integration, and Windows Codex MCP checks passed.
  • The main test job remains in progress. Typecheck, the passkey browser regression, and selected browser tests passed; the general test suite is running.
  • End-to-end enable/link/disable behavior and environment-pinned Settings behavior remain unverified.

HAPI Bot

This branch has not been deployed

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

Labels

area:cli CLI, runner, agent wrappers codex-review:pass HAPI Bot: all review stages passed, no Blocker/Major findings enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: opt-in GitHub PR awareness + explicit session↔PR attach

1 participant