Skip to content

triage(#135): dashboard tooltip → /bicameral-sync (scope-cut from auto-resolve)#138

Merged
jinhongkuan merged 2 commits into
devfrom
triage/135-dashboard-tooltip-scope-cut
Apr 30, 2026
Merged

triage(#135): dashboard tooltip → /bicameral-sync (scope-cut from auto-resolve)#138
jinhongkuan merged 2 commits into
devfrom
triage/135-dashboard-tooltip-scope-cut

Conversation

@jinhongkuan

Copy link
Copy Markdown
Contributor

Summary

Triage scope-cut for #135 (post-commit hook auto-resolve loop, P0). After
design enumeration of 7 options, every path to auto-resolution either (a)
requires an LLM in the deterministic core — violating the selection over
generation
guardrail — or (b) requires a trivial-cases enumeration with
non-zero false-positive risk against the integrity contract.

Cut: accept the architectural limit. Post-commit hook stays sync-only.
Resolution path = dashboard tooltip on status === 'pending' rows → user
runs /bicameral-sync in their Claude Code session. The qualified judge of
any pending compliance check is the human-in-session, not a hook-side
automaton.

Changes

File Δ Notes
pilot/mcp/assets/dashboard.html +5/-1 renderStateCell() ternary → if/else if; new pending branch with tooltip
pilot/mcp/skills/bicameral-dashboard/SKILL.md +1/-0 One bullet under Notes documenting tooltip nudge contract
pilot/mcp/docs/META_LEDGER.md +252/-3 Entries #24 (Audit PASS) + #25 (IMPL) + #26 (SEAL)
pilot/mcp/docs/SYSTEM_STATE.md +72/-0 #135 triage substantiation addendum

Tooltip text: "Pending compliance — run /bicameral-sync in your Claude Code session to resolve."

Section 4 razor: renderStateCell 19 LOC (cap 40), nesting 1 (cap 3),
nested ternaries 0 (replaced ternary with if/else if — improves razor score).

Test plan

Mandatory manual verification — no automated UI test exists for
pilot/mcp/assets/dashboard.html; this is the agreed mitigation per Entry
#24 audit advisory:

  • cd pilot/mcp && python -m server (or equivalent dev-server invocation); open dashboard URL.
  • Ingest a decision, bind it to a code region (/bicameral-ingest + bicameral.bind), modify the bound file, git commit.
  • In the dashboard, observe the row for that decision: status badge shows … pending; on hover, a tooltip appears with the text above.
  • Run /bicameral-sync in a Claude Code session — tooltip's call-to-action resolves the pending state to reflected (or drifted).
  • If hover yields no tooltip, change did not land — block merge.

Existing test suite: unaffected (no Python/server code touched).

Chain integrity

Post-merge external gh actions (queued)

Will fire after merge: gh issue close BicameralAI/bicameral-mcp#135 --comment ...

Closing as scope-cut. Auto-resolve direction abandoned after design
enumeration: no caller-LLM is reliably available in the post-commit hook
context, and MCP sampling is not surfaced in Claude Code's main chat
session.

Resolution path adopted: dashboard surfaces a tooltip on
`status === 'pending'` rows nudging the user to run `/bicameral-sync` in
their Claude Code session. The tooltip ships in this PR (#XXX). The
qualified judge of any pending compliance check is the
human-in-session, not a hook-side automaton.

README/docs deferral status: **N/A** — the original direction
(`--auto-resolve-trivial` flag, two-phase sync→resolve README section,
`docs/architecture/drift-resolution-loop.md`, CHANGELOG migration note)
never landed, so there are no docs to update or remove. Future state is
already accurate.

If the architectural premise changes (Claude Code exposes MCP sampling
reliably in the main chat, or a Hosted Repo / GitHub App tier ships), a
new issue should track that direction — not this one.

Will fire after merge: gh issue edit BicameralAI/bicameral#108 --body-file -

Two sentence-level spec corrections:

Flow 3 — append at end:

If a commit happens outside an active Claude Code session,
pending-compliance accumulates silently. The dashboard surfaces a
tooltip on status === 'pending' rows nudging the user to run
/bicameral-sync in a fresh session to walk the queue.

Flow 1 step 2 — replace:

bicameral.ingest → normalize payload, write ledger; returns
supersession_candidates and context_for_candidates

with:

bicameral.ingest → normalize payload, write ledger; returns
context_for_candidates. Supersession detection is performed
caller-side by bicameral-context-sentry (Probe B), which writes
signoff.state='collision_pending' for newly-ingested decisions that
overlap existing ones; subsequent bicameral.preflight calls surface
these via unresolved_collisions.

Out of scope (deferred to separate PRs)

Risk

L1 — UI-only behavior change to existing infrastructure, plus issue/spec doc edits. No new code paths, no schema changes, no contract changes. Three audit preconditions (manual verification step, SKILL.md note, deferral-status close comment) all satisfied or composed.

Closes #135 (post-merge via queued gh issue close above).

🤖 Generated with Claude Code

jinhongkuan and others added 2 commits April 30, 2026 15:30
…cameral-sync

Scope-cut from #135's original L2 proposal (--auto-resolve-trivial flag on
link_commit). Design enumeration produced 7 options; all required either an
LLM in the deterministic core (violating the "selection over generation"
guardrail) or trivial-cases enumeration with non-zero false-positive risk.

Cut: accept the architectural limit. Post-commit hook stays sync-only.
Resolution path = dashboard tooltip on status === 'pending' rows → user
runs /bicameral-sync in their Claude Code session. No code is auto-resolved.

assets/dashboard.html:
  renderStateCell() ternary at line 455 → if/else if. New 'pending' branch
  attaches tooltip text "Pending compliance — run /bicameral-sync in your
  Claude Code session to resolve." Reuses existing data-tip CSS pattern
  (lines 187–198, hover transitions). Static string literal — no esc()
  needed (no HTML special chars).

skills/bicameral-dashboard/SKILL.md:
  One bullet under Notes documenting the tooltip nudge contract. Per
  pilot/mcp/CLAUDE.md "tool changes ship with skill updates" rule
  (UI behavior changed; tool response shape unchanged).

Section 4 razor: renderStateCell 19 LOC (cap 40), nesting 1 (cap 3),
nested ternaries 0. Replaced ternary with if/else if — improves razor
score, doesn't degrade it.

Verification: manual (no automated test added — dashboard.html has
zero existing test infrastructure; UI test harness absent; PR description
includes manual verification step). Acknowledged advisory in Entry #24
audit.

Refs #135 (close post-merge with scope-cut comment).
Refs BicameralAI/bicameral#108 (Flow 3 spec edit, post-merge gh action).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…iation seal

Reality matches Promise. Three changes (2 repo files + 2 deferred external
gh actions) land per Entry #24 audit blueprint 1:1; 0 new tests (acknowledged
advisory — manual verification mitigates); Section 4 razor clean.

Audit verdict: PASS, L1 (Entry #24 chain hash 1de1fac7).
Implementation: Entry #25 chain hash 51c8a45c.
Merkle seal: efd0304b2f0e0b3ca28aa4620c2b8ea2eda5ab9e2828ca852ab9f3c5adda6eb5

Architectural decision recorded: bicameral-mcp#135's auto-resolve direction
abandoned (no caller LLM in hook context, MCP sampling not viable in Claude
Code's main chat). Resolution path = dashboard tooltip → /bicameral-sync.
The tooltip surfaces the pending state; the human in their session is the
qualified judge.

Plan addition tracking (Entry #24 preconditions, final state):
  ✅ #2 — SKILL.md tooltip note (delivered in IMPL, sealed here)
  🟡 #1 — PR description manual verification step (composed in /qor-document)
  🟡 #3#135 close comment README/docs deferral (composed in /qor-document)

Surfaced for follow-up (not blocking):
  bicameral-mcp#125 scope should be widened — 7 skills under
  pilot/mcp/.claude/skills/ are absent from the canonical pilot/mcp/skills/
  location claimed by pilot/mcp/CLAUDE.md.

Spec correction queued (post-merge gh action):
  bicameral#108 Flow 1 step 3 claims IngestResponse.supersession_candidates
  exists when it does not; collision detection lives caller-side via
  bicameral-context-sentry skill, surfaces via
  bicameral.preflight.unresolved_collisions.

Capability shortfalls (carried, no regression vs Entry #23): qor/scripts/
runtime helpers absent (gate artifacts not written), tools/reliability/
validators absent (Steps 4.6–4.8 skipped), agent-teams not declared,
codex-plugin not declared (solo audit/seal), intent_lock capture skipped.

Refs #135.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5304a41f-dfdc-40e2-b890-82dcf7c49772

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch triage/135-dashboard-tooltip-scope-cut

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jinhongkuan jinhongkuan merged commit eaf97e2 into dev Apr 30, 2026
10 checks passed
jinhongkuan added a commit that referenced this pull request Apr 30, 2026
The simulation (scripts/sim_issue_108_flows.py) walks all six canonical
flows from BicameralAI/bicameral#108 against the live bicameral-mcp
implementation on dev. All 6 PASS post-#135-triage merge:

  Flow 1  PASS  ingest → ratify; supersession_candidates absent (corrected)
  Flow 2  PASS  region-anchored preflight (current contract; topic-BM25 removed)
  Flow 3  PASS  full V1 path: ingest→ratify→bind→commit→link_commit→reflect
  Flow 3a PASS  branch ephemeral; switch-to-main → drifted (no phantom reflect)
  Flow 4  PASS  capture-corrections; agent_session source round-trips
  Flow 5  PASS  history exposes both axes (status × signoff_state)

Two spec drifts surfaced and fixed forward:

1. Flow 2 step 1 — spec said "BM25 search on the topic". Reality: v0.10.0
   removed topic-BM25 from handle_preflight (see
   docs/preflight-failure-scenarios.md §intro). Current behaviour is
   region-anchored lookup via file_paths + HITL surfacing
   (unresolved_collisions, context_pending_ready). The caller LLM reads
   bicameral.history() and reasons over it for topic-relevance. Spec text
   correction queued as post-merge gh issue edit on #108.

2. Flow 4 step 3 — spec said source="conversation". Implementation's
   _SOURCE_TYPE_MAP (handlers/history.py) does NOT include "conversation"
   — it falls through to "manual". Canonical value for AI-surfaced
   session decisions is "agent_session". This commit corrects the
   capture-corrections skill (which was instructing callers to use the
   silently-broken "conversation" value) to use "agent_session". Spec
   text correction queued as post-merge gh issue edit on #108.

Both spec corrections are external gh actions (gh issue edit) that fire
post-merge once this PR lands on dev — same pattern as #135 triage.

Closes the original ask in this session: validate #108 flows
end-to-end on dev. Triage #135 (PR #138, merged eaf97e2) corrected
the supersession_candidates wording and added the out-of-session
committer paragraph to Flow 3; this PR closes the remaining gaps.

Refs #108.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jinhongkuan added a commit that referenced this pull request Apr 30, 2026
The simulation (scripts/sim_issue_108_flows.py) walks all six canonical
flows from BicameralAI/bicameral#108 against the live bicameral-mcp
implementation on dev. All 6 PASS post-#135-triage merge:

  Flow 1  PASS  ingest → ratify; supersession_candidates absent (corrected)
  Flow 2  PASS  region-anchored preflight (current contract; topic-BM25 removed)
  Flow 3  PASS  full V1 path: ingest→ratify→bind→commit→link_commit→reflect
  Flow 3a PASS  branch ephemeral; switch-to-main → drifted (no phantom reflect)
  Flow 4  PASS  capture-corrections; agent_session source round-trips
  Flow 5  PASS  history exposes both axes (status × signoff_state)

Two spec drifts surfaced and fixed forward:

1. Flow 2 step 1 — spec said "BM25 search on the topic". Reality: v0.10.0
   removed topic-BM25 from handle_preflight (see
   docs/preflight-failure-scenarios.md §intro). Current behaviour is
   region-anchored lookup via file_paths + HITL surfacing
   (unresolved_collisions, context_pending_ready). The caller LLM reads
   bicameral.history() and reasons over it for topic-relevance. Spec text
   correction queued as post-merge gh issue edit on #108.

2. Flow 4 step 3 — spec said source="conversation". Implementation's
   _SOURCE_TYPE_MAP (handlers/history.py) does NOT include "conversation"
   — it falls through to "manual". Canonical value for AI-surfaced
   session decisions is "agent_session". This commit corrects the
   capture-corrections skill (which was instructing callers to use the
   silently-broken "conversation" value) to use "agent_session". Spec
   text correction queued as post-merge gh issue edit on #108.

Both spec corrections are external gh actions (gh issue edit) that fire
post-merge once this PR lands on dev — same pattern as #135 triage.

Closes the original ask in this session: validate #108 flows
end-to-end on dev. Triage #135 (PR #138, merged eaf97e2) corrected
the supersession_candidates wording and added the out-of-session
committer paragraph to Flow 3; this PR closes the remaining gaps.

Refs #108.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(cherry picked from commit 2503fe6)
jinhongkuan added a commit that referenced this pull request May 1, 2026
The simulation (scripts/sim_issue_108_flows.py) walks all six canonical
flows from BicameralAI/bicameral#108 against the live bicameral-mcp
implementation on dev. All 6 PASS post-#135-triage merge:

  Flow 1  PASS  ingest → ratify; supersession_candidates absent (corrected)
  Flow 2  PASS  region-anchored preflight (current contract; topic-BM25 removed)
  Flow 3  PASS  full V1 path: ingest→ratify→bind→commit→link_commit→reflect
  Flow 3a PASS  branch ephemeral; switch-to-main → drifted (no phantom reflect)
  Flow 4  PASS  capture-corrections; agent_session source round-trips
  Flow 5  PASS  history exposes both axes (status × signoff_state)

Two spec drifts surfaced and fixed forward:

1. Flow 2 step 1 — spec said "BM25 search on the topic". Reality: v0.10.0
   removed topic-BM25 from handle_preflight (see
   docs/preflight-failure-scenarios.md §intro). Current behaviour is
   region-anchored lookup via file_paths + HITL surfacing
   (unresolved_collisions, context_pending_ready). The caller LLM reads
   bicameral.history() and reasons over it for topic-relevance. Spec text
   correction queued as post-merge gh issue edit on #108.

2. Flow 4 step 3 — spec said source="conversation". Implementation's
   _SOURCE_TYPE_MAP (handlers/history.py) does NOT include "conversation"
   — it falls through to "manual". Canonical value for AI-surfaced
   session decisions is "agent_session". This commit corrects the
   capture-corrections skill (which was instructing callers to use the
   silently-broken "conversation" value) to use "agent_session". Spec
   text correction queued as post-merge gh issue edit on #108.

Both spec corrections are external gh actions (gh issue edit) that fire
post-merge once this PR lands on dev — same pattern as #135 triage.

Closes the original ask in this session: validate #108 flows
end-to-end on dev. Triage #135 (PR #138, merged eaf97e2) corrected
the supersession_candidates wording and added the out-of-session
committer paragraph to Flow 3; this PR closes the remaining gaps.

Refs #108.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(cherry picked from commit 2503fe6)
jinhongkuan added a commit that referenced this pull request May 1, 2026
The simulation (scripts/sim_issue_108_flows.py) walks all six canonical
flows from BicameralAI/bicameral#108 against the live bicameral-mcp
implementation on dev. All 6 PASS post-#135-triage merge:

  Flow 1  PASS  ingest → ratify; supersession_candidates absent (corrected)
  Flow 2  PASS  region-anchored preflight (current contract; topic-BM25 removed)
  Flow 3  PASS  full V1 path: ingest→ratify→bind→commit→link_commit→reflect
  Flow 3a PASS  branch ephemeral; switch-to-main → drifted (no phantom reflect)
  Flow 4  PASS  capture-corrections; agent_session source round-trips
  Flow 5  PASS  history exposes both axes (status × signoff_state)

Two spec drifts surfaced and fixed forward:

1. Flow 2 step 1 — spec said "BM25 search on the topic". Reality: v0.10.0
   removed topic-BM25 from handle_preflight (see
   docs/preflight-failure-scenarios.md §intro). Current behaviour is
   region-anchored lookup via file_paths + HITL surfacing
   (unresolved_collisions, context_pending_ready). The caller LLM reads
   bicameral.history() and reasons over it for topic-relevance. Spec text
   correction queued as post-merge gh issue edit on #108.

2. Flow 4 step 3 — spec said source="conversation". Implementation's
   _SOURCE_TYPE_MAP (handlers/history.py) does NOT include "conversation"
   — it falls through to "manual". Canonical value for AI-surfaced
   session decisions is "agent_session". This commit corrects the
   capture-corrections skill (which was instructing callers to use the
   silently-broken "conversation" value) to use "agent_session". Spec
   text correction queued as post-merge gh issue edit on #108.

Both spec corrections are external gh actions (gh issue edit) that fire
post-merge once this PR lands on dev — same pattern as #135 triage.

Closes the original ask in this session: validate #108 flows
end-to-end on dev. Triage #135 (PR #138, merged eaf97e2) corrected
the supersession_candidates wording and added the out-of-session
committer paragraph to Flow 3; this PR closes the remaining gaps.

Refs #108.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(cherry picked from commit 2503fe6)
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