Skip to content

Implement operator overlay improvements and refine bus demux skills - #82

Open
div0-space wants to merge 37 commits into
fix/whisper-fp16-runtimefrom
fix/p0-p2-before-release
Open

Implement operator overlay improvements and refine bus demux skills#82
div0-space wants to merge 37 commits into
fix/whisper-fp16-runtimefrom
fix/p0-p2-before-release

Conversation

@div0-space

Copy link
Copy Markdown
Member

This pull request introduces several improvements and clarifications to the handling of overlay pasting, frontmost app detection, and Layer 1 transcription logic, along with documentation and test updates. The most significant changes are grouped below:

Overlay Paste and Frontmost App Handling:

  • Refactored the logic for determining the frontmost application during overlay pasting to use a new capture_frontmost_app_only_with_prior_frontmost function, which better preserves the correct target app and avoids mistakenly selecting Codescribe as the paste target. This includes tracking the last foreign (non-Codescribe) frontmost app and ensuring overlays never latch onto Codescribe itself. (app/controller/mod.rs, app/os/selection.rs) [1] [2] [3] [4]
  • Introduced paste_latch_from_frontmost and related helpers to ensure the paste target is always a valid, non-self application, and added tests to guarantee this behavior. (app/os/selection.rs) [1] [2]

Overlay Activation and Confirmation Logic:

  • Improved overlay activation logic to more accurately confirm when a target app has been activated, including handling cases where the overlay panel's process name may lag behind the actual frontmost app. Added a dedicated function overlay_float_still_confirms_activation and associated unit tests. (app/controller/overlay_paste.rs, app/controller/tests.rs) [1] [2]

Clipboard and Pasting Improvements:

  • Updated all paste operations to use clipboard::paste_and_restore, which better preserves clipboard state during automated pasting. (app/controller/mod.rs, app/controller/quality_delivery.rs) [1] [2]

Layer 1 Transcription and Documentation:

  • Clarified and updated the logic and documentation around Layer 1 transcription, particularly regarding the CODESCRIBE_LAYERED_TRANSCRIPTION setting, its promotion to user settings, and its new default-off behavior. Documentation and comments were updated to reflect these changes and the distinction between Apple-only and Local Power modes. (README.md, Makefile, AGENT_BUS.md, app/controller/final_pass.rs, core/asr_session/bootstrap.rs) [1] [2] [3] [4] [5] [6]

Quality Correction and Lexicon Learning:

  • Clarified the logic and documentation for lexicon learning, making explicit that only explicit Correction-level actions contribute to the lexicon, and that evidence-only corrections are properly tracked. (bridge/src/quality.rs) [1] [2]

Additional minor changes include skill documentation and symlinks for the bus-demux and codescribe skills. [1] [2]## Summary

What changed, and why?

User Impact

What does this improve or prevent for a real codescribe user?

Runtime Impact

  • Recording, hotkeys, overlays, settings, or release packaging changed
  • Public docs, onboarding, install path, or metadata changed
  • No runtime behavior changed

Verification

  • cargo fmt --all
  • cargo clippy -- -D warnings
  • cargo test
  • make semgrep

Add targeted commands, screenshots, recordings, or release-artifact checks here:

Release Notes

Should this appear in CHANGELOG.md?

  • Yes, added
  • No, internal-only

- OverlayContentContainer claims a 12pt edge before SwiftUI steals the hit
- OverlayResizeHit: geometry, macOS 15 frameResize cursors, live drag
- OverlayResizeHitTests lock interior vs band, min-size, opposite-edge pin
- OverlayResizeHitTests: 5/5 in 0.003s

Operator overlay left unstaged during the stack merge; landing it now.

Authored-By: grok <agents@vetcoders.io>
- scripts/bus-demux.py reads codescribe.transcript.v1 and never opens a mic
- unnamed agents do not pass; --become binds on assignment then filters by name
- project skill .grok/skills/bus-demux: this Grok session is James
- hermetic scripts/tests/bus-demux-test.sh

Authored-By: grok <agents@vetcoders.io>
- .grok/skills/codescribe/SKILL.md is the agent attach ritual
- no worker CLI; hold Fn is the event; hear drafts, act on seal
- bus-demux skill reduced to CLI flags; one home for naming law

Authored-By: grok <agents@vetcoders.io>
- canonical tree: SKILL.md FLOW.md README.md examples/ references/
- Grok loader .grok/skills/codescribe -> ../../skills/codescribe
- no vibecrafted codescribe worker

Authored-By: grok <agents@vetcoders.io>
…ions

- gate overlay span, per-utterance dictionary teach, and Voice Lab saves on three identical persisted human corrections
- add a hot CODESCRIBE_LEXICON_MIN_CORRECTIONS=3 contract and honest pending acknowledgement
- preserve bulk/replay/Qube and direct writer behavior; cover evidence, exclusions, refresh, and downstream rewrite

Authored-By: codex <agents@vetcoders.io>
…rd after Cmd+V

- latch-at-start keeps the prior foreign app when overlay/osascript names us
- overlay float still confirms activate if NSWorkspace has not flipped yet
- automatic overlay paste uses paste_and_restore instead of stealing the pasteboard
- DELIVERY_ROUTE matches: park ⌘⌥V, do not veto a confirmed ambulance

Authored-By: grok <agents@vetcoders.io>
- shouldShowOverlay is trayEnabled only; Lab stays a loopback, not a hide
- Lab toggle copy and tests match: overlay follows the tray, not lab_mode

Authored-By: grok <agents@vetcoders.io>
- evidenceOnly and commit_overlay_quality_record docs match the teach threshold
- checksum for commit_overlay_quality_record follows the bridge

Authored-By: grok <agents@vetcoders.io>
…hunks_exact

- pre-push -D warnings rejects constant chunks_exact on rustc 1.98

Authored-By: grok <agents@vetcoders.io>
- test calls overlay_paste::overlay_float_still_confirms_activation via super

Authored-By: grok <agents@vetcoders.io>
Default layered transcription to off until PCM/span identity, one rewrite fence, and structural idempotence cover every patch. Preserve explicit phase1 for experiments and emit a typed bounded-drain warning before session finality.

Authored-By: codex <agents@vetcoders.io>
Keep the existing encrypted-or-loopback WebSocket policy while satisfying the workspace Clippy gate on the release-fix branch.

Authored-By: codex <agents@vetcoders.io>
Remove the fake independent Layered switch and couple Local Power engine choices to the exact phase1 runtime token with persisted readback. Surface missing or invalid FP16 bundles as an explicit degraded state and keep whole-session final pass copy orthogonal to live repair.
Treat an absent Layered setting as the runtime's armed Local Power default while keeping explicit off and unknown phase tokens visibly degraded.
Local Power now resolves to Apple-first plus the exact-span local Whisper lane independently of final-pass routing. Stop emits reconciled per-job drain evidence before session finality and VAD refuses unbound mutation.
Copilot AI lite review requested due to automatic review settings August 21, 2026 21:38

@claude claude 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.

⚠️ Code review skipped — your organization has reached its monthly code review spending cap.

An organization admin can view or raise the cap at claude.ai/admin-settings/claude-code. The cap resets at the start of the next billing period.

Once the cap resets or is raised, reopen this pull request to trigger a review.

Copilot AI 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.

Pull request overview

This PR tightens “operator intent” routing across overlay paste, clarifies and enforces Layer 1 (live refinement) arming/receipts, and expands the documented/tested contracts around transcript lanes, settings truth, and bus demux tooling.

Changes:

  • Refines overlay paste targeting: latch a non-self frontmost app, improve activation confirmation, and make all paste paths restore the user clipboard.
  • Reframes Layer 1 as a product-mode decision (with typed receipts) and adds contract/acceptance fixtures + parity tests for arming, onset preservation, and repetition identity.
  • Adds/updates operational docs and skills around transcript bus demux and layered transcription semantics; introduces lexicon learning threshold configuration.

Reviewed changes

Copilot reviewed 61 out of 61 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/fixtures/layered_engine_acceptance.json Adds canonical Layer 1 acceptance vectors
tests/e2e_streaming_chunks.rs Adds onset-token regression test
tests/e2e_overlay_delivery_parity.rs Adds Layer 1 receipt/arming assertions + acceptance tests
skills/codescribe/SKILL.md New skill doc for bus attach workflow
skills/codescribe/references/live-vs-seal.md Documents “act on seal” rule
skills/codescribe/references/attach.md Documents bus path + naming
skills/codescribe/README.md Adds skill quick reference
skills/codescribe/FLOW.md Mermaid flow for attach behavior
skills/codescribe/examples/example-prompt.md Adds example trigger + expected behavior
scripts/tests/bus-demux-test.sh Adds hermetic demux CLI checks
scripts/e2e-blackhole-dictation.sh Updates layered override logging semantics
scripts/bus-demux.py Introduces transcript bus demux CLI
README.md Updates product description + engine framing
Makefile Updates parity lane pin commentary/guard
macos/CodescribeTests/SettingsTruthTests.swift Updates settings truth + adds runtime-state tests
macos/CodescribeTests/OverlayResizeHitTests.swift Adds tests for overlay resize geometry
macos/CodescribeTests/DeveloperSurfaceTests.swift Updates Lab/overlay gating expectation
macos/Codescribe/Screens/Settings/SettingsViewModel.swift Adds LocalWhisperRuntimeState + atomic persistence rules
macos/Codescribe/Screens/Settings/LabPanel.swift Updates Lab UI copy + behavior
macos/Codescribe/Screens/Settings/EnginePanel.swift Reworks engine controls + live refinement status UI
macos/Codescribe/Screens/Overlay/DictationOverlayWindow.swift Adds fat-band resize hit testing + cursors
macos/Codescribe/Core/DeveloperSurface.swift Changes overlay gating logic
macos/Codescribe/Core/AppModel.swift Adjusts overlay suppression logging
macos/Codescribe/Bridge/codescribe_ffi.swift Updates FFI docs/checksum for quality changes
docs/WHISPER_LIVE.md Updates Layer 1 status/default narrative
docs/TRANSCRIPT_LANES.md Updates lane map + adds superseding laws
docs/TRANSCRIPT_BUS.md Adds named-agent demux usage snippet
docs/THE_ENGINE_ROADMAP.md Updates current truth around Layer 1 defaults
docs/THE_ENGINE_CONTRACT.md Major contract update: span authority, receipts, settings
docs/STT_CONTRACT.md Updates STT status + layered promotion semantics
docs/OVERLAY_STREAMING.md Updates layer inventory/status table
docs/KORA_CODESCRIBE_JOURNAL.md Adds extracted evidence journal
docs/env.md Updates env docs for layered + final pass
docs/ENV_REGISTRY.toml Updates layered default + adds lexicon min corrections var
docs/DELIVERY_ROUTE.md Clarifies clipboard borrow/restore + activation notes
docs/ARCHITECTURE.md Updates layer status + wiring claims
docs/ADR/2026-05-26-LAYERED_INCREMENTAL_TRANSCRIPTION.md Revises ADR invariants + default status
core/stt/tail_provider.rs Exposes TailSampleRange::contains for crate use
core/stt/tail_patcher/mod.rs Reframes layered phase parsing/default behavior
core/quality/overlay_quality.rs Adds N-correction lexicon learning gate + receipts
core/pipeline/tests/regressions.rs Adds regressions for Layer 1 receipt ordering
core/pipeline/streaming/session.rs Adds typed TailPatchSessionReceipt + VAD-route refusal evidence
core/pipeline/streaming/mod.rs Re-exports receipt symbols
core/pipeline/stream_postprocess.rs Adjusts tests for lexicon threshold override
core/config/settings.rs Updates layered settings semantics/comments
core/audio/streaming_recorder.rs Threads tail-patch receipt through production replay
core/asr_session/recorder.rs Adds LocalTailPatchDisposition + Layer1Decision variant
core/asr_session/mod.rs Re-exports new layer1 symbols
core/asr_session/cloud.rs Tightens ws/wss endpoint guard condition
core/asr_session/bootstrap.rs Resolves Layer 1 decision by product mode + override
bridge/src/quality.rs Updates evidence-only semantics docs
app/os/selection.rs Adds paste latch helpers + foreign frontmost memory
app/controller/tests.rs Adds activation-confirmation unit test
app/controller/quality_delivery.rs Uses paste_and_restore for delivery paste
app/controller/overlay_paste.rs Adds overlay_float_still_confirms_activation helper
app/controller/mod.rs Uses prior-frontmost capture for overlay paste context
app/controller/final_pass.rs Updates final-pass vs layered doc comments
AGENT_BUS.md Adds signal about Layer 1 default OFF
.grok/skills/bus-demux/SKILL.md Adds minimal bus-demux skill doc

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +139 to +151
/// Whether a successful `activate` still counts when `NSWorkspace` has not
/// flipped yet. The overlay panel can keep the process named Codescribe after
/// Alacritty/Chrome actually took the key window — requiring a name match here
/// parks every auto-paste as ⌘⌥V.
pub(super) fn overlay_float_still_confirms_activation(
wait_confirmed: bool,
frontmost_after_activate: Option<&str>,
) -> bool {
wait_confirmed
|| frontmost_after_activate
.map(str::trim)
.is_some_and(|name| !name.is_empty() && target_is_self_app(name))
}
Comment thread scripts/bus-demux.py
Comment on lines +31 to +39
def bus_path() -> Path:
for key in ("CODESCRIBE_TRANSCRIPT_BUS_PATH", "CODESCRIBE_TRANSCRIPT_BUS"):
raw = os.environ.get(key, "").strip()
if raw:
return Path(os.path.expanduser(raw))
xdg = os.environ.get("XDG_STATE_HOME", "").strip()
if xdg:
return Path(os.path.expanduser(xdg)) / "codescribe" / BUS_FILENAME
return Path.home() / ".codescribe" / BUS_FILENAME
Comment thread scripts/bus-demux.py
Comment on lines +72 to +84
def parse_line(raw: str) -> dict[str, Any] | None:
raw = raw.strip()
if not raw:
return None
try:
event = json.loads(raw)
except json.JSONDecodeError:
return None
if not isinstance(event, dict):
return None
if event.get("schema") not in (None, "codescribe.transcript.v1"):
return None
return event
Comment thread scripts/bus-demux.py Outdated
Comment on lines +122 to +141
def iter_new_lines(path: Path, offset: int) -> tuple[list[str], int]:
try:
size = path.stat().st_size
except FileNotFoundError:
return [], offset
if size < offset:
offset = 0
with path.open("rb") as handle:
handle.seek(offset)
chunk = handle.read()
offset += len(chunk)
text = chunk.decode("utf-8", errors="replace")
if not text:
return [], offset
lines = text.splitlines()
if not text.endswith("\n"):
# incomplete last line: rewind to its start
incomplete = lines.pop().encode("utf-8")
offset -= len(incomplete)
return lines, offset
Comment thread docs/TRANSCRIPT_LANES.md
Comment on lines +358 to +360
_Provenance: distilled from `docs/THE_ENGINE_ROADMAP.md`, the W13 settlement
ledger, `/Users/maciejgad/Downloads/Kora_codescribe.md`, and structural/runtime
verification on `fix/p0-p2-before-release@361ece40`, 2026-08-21._
Comment on lines +5 to +7
Primary source: `/Users/maciejgad/Downloads/Kora_codescribe.md` (2,789 lines, read sequentially in 400-line blocks on 2026-08-21).

Purpose: preserve decisions, corrections, runtime evidence, superseded claims, and open risks before distilling them into `KORA_CODESCRIBE_CONTRACT.md`. This journal is evidence, not executable product authority. Later statements and explicit operator corrections supersede earlier interpretations.
Preserve the operator-authored repository contract correction before the local Living Tree dispatch begins.

Authored-By: codex <agents@vetcoders.io>
Session-ID: 01a01fbf-0d22-7f22-96b3-dbc359eb3595
Make the process-global lexicon rebind when CODESCRIBE_DATA_DIR changes so parallel tests and explicit runtime reconfiguration cannot read stale custom rules.

Authored-By: codex <agents@vetcoders.io>

Session-ID: 01a01fbf-0d22-7f22-96b3-dbc359eb3595
Apply the repository Prettier baseline to the exact Markdown, HTML, and CSS files that blocked the mandatory check.

Authored-By: codex <agents@vetcoders.io>

Session-ID: 01a01fbf-0d22-7f22-96b3-dbc359eb3595
…nline formatting

Authored-By: codex <agents@vetcoders.io>

Session-ID: 01a01fbf-0d22-7f22-96b3-dbc359eb3595
…cutor

Authored-By: codex <agents@vetcoders.io>

Session-ID: 01a01fbf-0d22-7f22-96b3-dbc359eb3595
…yer engine contract

Authored-By: codex <agents@vetcoders.io>

Session-ID: 01a02794-19df-7580-9871-7c285015ff08
…ndation

Authored-By: codex <agents@vetcoders.io>

Session-ID: 01a027a7-9483-79a3-a5f5-6c4e58c146c6
Copilot AI review requested due to automatic review settings August 22, 2026 04:26

Copilot AI 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.

Pull request overview

Copilot reviewed 82 out of 83 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

scripts/bus-demux.py:140

  • iter_new_lines rewinds offset for an incomplete last line by re-encoding the decoded string (lines.pop().encode('utf-8')). With errors='replace' this can change the byte length (e.g., when a multi-byte UTF-8 sequence is split across reads), causing the follower to skip or duplicate bytes. Rewind should be computed on the raw chunk bytes (e.g., using the last b'\n' index) rather than re-encoding text.

Comment on lines +135 to +140
if !requested {
if receipt.is_some_and(|receipt| receipt.submitted > 0) {
return Err("Layered OFF submitted Layer 1 windows".to_string());
}
return Ok(());
}
…sideband evidence

Authored-By: codex <agents@vetcoders.io>
Session-ID: 01a027b5-9fcb-7242-8d85-53c346911527
Copilot AI review requested due to automatic review settings August 22, 2026 06:21

Copilot AI 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.

Pull request overview

Copilot reviewed 96 out of 97 changed files in this pull request and generated 3 comments.

Suppressed comments (1)

core/pipeline/streaming/silero_fusion.rs:327

  • pause_evidence_for_range linearly scans and clones from self.sideband each time it’s called. If this is invoked once per sealed span, the total work can become O(n²) over a session as self.sideband grows.

Consider indexing by sample range (monotonic cursor) or pruning the underlying storage so this remains bounded per call.

Comment thread scripts/build-app.sh
Comment on lines +59 to +68
stage.mkdir(parents=True, mode=0o755)
shutil.copytree(skill_source, stage / "skills" / "codescribe")
(stage / "bin").mkdir(mode=0o755)
shutil.copy2(helper_source, stage / "bin" / "bus-demux.py")
(stage / "bin" / "bus-demux.py").chmod(0o755)

files = []
for path in sorted(candidate for candidate in stage.rglob("*") if candidate.is_file()):
if path.is_symlink():
raise SystemExit(f"agent bridge payload may not contain symlinks: {path}")
Comment on lines +155 to +170
fn local_tail_patch_disposition(raw: Option<&str>) -> LocalTailPatchDisposition {
match raw {
None => LocalTailPatchDisposition::ArmedDefault,
Some(value) => match layered_phase_from_raw(Some(value)) {
Some(phase) => LocalTailPatchDisposition::ArmedPhase(phase),
None if matches!(
value.trim().to_ascii_lowercase().as_str(),
"" | "off" | "0" | "false" | "no"
) =>
{
LocalTailPatchDisposition::DegradedExplicitOff
}
None => LocalTailPatchDisposition::DegradedInvalidOverride,
},
}
}
Comment on lines 185 to 189
ledger: UtteranceLedger,
next_sideband_sequence: u64,
last_speech_end: Option<u64>,
sideband: Vec<SidebandEvidence>,
}
Copilot AI review requested due to automatic review settings August 22, 2026 07:21

Copilot AI 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.

Pull request overview

Copilot reviewed 112 out of 113 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

scripts/build-app.sh:68

  • shutil.copytree(skill_source, …) uses the default symlinks=False, which dereferences any symlinks in skills/codescribe and copies their target bytes into the staged payload. That defeats the later path.is_symlink() guard (the staged file is no longer a symlink) and can accidentally bundle out-of-tree content. Consider either (a) scanning skill_source.rglob('*') and failing on any is_symlink() before copying, or (b) calling shutil.copytree(..., symlinks=True) so symlinks are preserved and then rejected by the existing check.

echo "▶ agent bridge resource proof"
AGENT_BRIDGE_DIR="$APP_PATH/Contents/Resources/agent-bridge"
AGENT_BRIDGE_VERIFY=""
if AGENT_BRIDGE_VERIFY=$(python3 - "$AGENT_BRIDGE_DIR" <<'PY'
- Acoustic admit path keeps five disjoint Iwo observations and refuses range replay
- Mean energy_db is evidence only; overlap clips to exclusive tail
- Engine contract forbids text-similarity identity and content-only repetition collapse

Authored-By: grok <agents@vetcoders.io>
Copilot AI review requested due to automatic review settings August 22, 2026 07:46

Copilot AI 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.

Pull request overview

Copilot reviewed 114 out of 115 changed files in this pull request and generated no new comments.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

macos/Codescribe/Screens/Overlay/DictationOverlayWindow.swift:451

  • For macOS < 15, corner resize hits currently show a crosshair cursor (default: return .crosshair). This looks like a selection/crosshair cursor rather than a resize affordance and may confuse users. Consider using diagonal resize cursors for corner cases (e.g. .resizeDiagonalUpLeftDownRight / .resizeDiagonalUpRightDownLeft) to match platform conventions.

@div0-space
div0-space requested review from m-szymanska and a balanced review from Copilot August 22, 2026 08:02

Copilot AI 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.

Pull request overview

Copilot reviewed 114 out of 115 changed files in this pull request and generated 7 comments.

Suppressed comments (1)

core/asr_session/bootstrap.rs:160

  • Reserved phase2phase4 values are treated as armed here, while Settings classifies every value except phase1 as a configuration mismatch and ENV_REGISTRY.toml:569 says phases 2–4 are reserved. This makes the UI report “Degraded” even though the next recording runs Layer 1. Only phase1 should arm the current lane; reserved phases should use the invalid/degraded disposition until implemented.
        Some(value) => match layered_phase_from_raw(Some(value)) {
            Some(phase) => LocalTailPatchDisposition::ArmedPhase(phase),
            None if matches!(

Comment thread scripts/bus-demux.py
Comment on lines +486 to +491
if lease and next_cursor is not None:
lease.persist(
active=True,
cursor=next_cursor,
sequence=event.get("sequence") if event else None,
)
Comment on lines +107 to +110
```bash
python3 ~/.codescribe/agent-bridge/runtime/bin/bus-demux.py \
--provider codex --session <provider-session-id> --name <stem> --drafts --follow
```
Comment on lines +155 to +157
fn local_tail_patch_disposition(raw: Option<&str>) -> LocalTailPatchDisposition {
match raw {
None => LocalTailPatchDisposition::ArmedDefault,
Comment thread core/pipeline/acoustic_identity.rs Outdated
Comment on lines +117 to +123
let mut clipped = incoming.clone();
clipped.range.sample_start = clip_start;
Ok((
clipped,
AcousticAdmitReceipt::Correct {
clipped_start: clip_start,
},
Comment on lines +581 to +586
let (draft_words, draft_coverage) = word_spans_from_draft(draft, energy_lookup);
words.extend(draft_words);
if !draft_coverage.passed && coverage.passed {
coverage = draft_coverage;
}
}
Comment thread scripts/build-app.sh
Comment on lines +51 to +52
if destination == destination.parent or destination == Path.home():
raise SystemExit(f"refusing unsafe agent bridge destination: {destination}")
Comment on lines +1141 to +1143
func replaceFormattedTranscriptProgrammatically(_ text: String) {
manualHumanEditPending = false
formattedText = text
…and the bus

- Replace the dead admit helper with OccurrenceIdentity, ObservationIdentity, and MutationReceipt. Replay is the same observation, not the same PCM range; Apple then Whisper on one range is a correction; disjoint Iwo stays five occurrences.
- Admit Apple word pins and Whisper segments into a session/epoch ledger. Overlap without pins stays visible without mutation; overlap with pins clips range and text together.
- Stop revision_tolerant_known_prefix from absorbing an extra identical token, refuse exact embedded canvas matches as identity, and keep ASR revisions (ala/ela, insertions) working.
- Pad Layer 1 coalesced PCM so the declared range is the audio the provider actually receives. Skip Light+ collapse when a span carries two or more word pins. Process multi-segment Apple finals per segment so repetition cleanup cannot eat acoustic copies.
- Un-ignore Claude's three conservation falsifiers (they are green). Add capture-shaped Apple finals and a reducer → Transcript Bus test: five acoustic Iwo become five Iwo on delivery.

Authored-By: grok <agents@vetcoders.io>
Copilot AI review requested due to automatic review settings August 22, 2026 09:04

Copilot AI 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.

Pull request overview

Copilot reviewed 116 out of 117 changed files in this pull request and generated 1 comment.

Suppressed comments (3)

skills/codescribe/SKILL.md:110

  • The documented attach sequence cannot complete: the first --become --follow process keeps the provider/session lease lock, so launching this second command with the same provider/session is rejected as a duplicate (SessionLease._acquire_lock). Either bind the running follower through its supported protocol or explicitly stop it before reattaching; otherwise users never reach the named mailbox.
    app/controller/overlay_paste.rs:150
  • This treats “Codescribe is still frontmost” as proof that an arbitrary foreign target activated. activateWithOptions only confirms the request was accepted, and the wait has already timed out, so a failed activation while the overlay remains key now passes the disposition check and sends Cmd+V into Codescribe. A positive signal from the target application is required; self still being frontmost cannot safely confirm activation.
    wait_confirmed
        || frontmost_after_activate
            .map(str::trim)
            .is_some_and(|name| !name.is_empty() && target_is_self_app(name))

core/asr_session/bootstrap.rs:157

  • The PR description says the layered-transcription default is now off, but an absent override is resolved to ArmedDefault, and Settings/tests also present Local Power as armed by default. This materially changes recording behavior and contradicts both the stated change and the new default-off notes in AGENT_BUS.md/THE_ENGINE_ROADMAP.md; choose one default and align runtime, tests, and contracts.
fn local_tail_patch_disposition(raw: Option<&str>) -> LocalTailPatchDisposition {
    match raw {
        None => LocalTailPatchDisposition::ArmedDefault,

Comment thread bridge/src/quality.rs
Comment on lines 194 to +197
None,
Some(&action),
Some(&formatting_level),
edit_provenance.as_deref(),
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.

2 participants