Skip to content

Add property-level localOnly schema classification; apply to PTY capture; remove capture.sync - #1854

Merged
mstomar125 merged 1 commit into
mainfrom
issue-1741-localonly
Jul 31, 2026
Merged

mstomar125 merged 1 commit into
mainfrom
issue-1741-localonly

Conversation

@mstomar125

@mstomar125 mstomar125 commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Implements the core + daemon + frontend side of #1741 (property-level localOnly). The sync-repo push/pull enforcement follows as a companion PR (nodespace-sync reads this classification via the pinned core — standard pinned-dependency cross-repo order).

What

  • localOnly schema classification — a new property-level flag on SchemaField (Rust + TS). A localOnly property is persisted/read locally like any other but is never pushed and is ignored on pull. First per-property sync classification in the schema (ADR-061 §6/§7).
  • Applied to PTY capture (ai-chat mode 2d): capture:session_id + capture:transcript → localOnly (machine-bound resume handle / content-risk raw scrollback); capture:summary → syncs (the cross-device artifact). Formalized as schema fields on the ai-chat schema (test_ai_chat_schema_has_fields 7→10 + classification asserts).
  • Removed capture.sync — an inert setting that promised local-only behavior the write path never enforced; a toggle that could push unscrubbed terminal scrollback into a shared tenant is not a checkbox decision. Removed from the proto (both messages), the daemon (CaptureConfig + RPC + toml), the Tauri command layer, and the frontend capture UI + tests. The guarantee is now structural via the classification.

Verified (full pre-push gate green on the rebased branch)

  • bun run test:all: frontend 4113 + scripts 74 + skill 20 + full Rust workspace — pass
  • cargo test -p nodespace-app (ADR-048 Tauri-seam) — pass
  • e2e suite — pass
  • Rebased onto current main; no conflicts.

Note for review

The local_only flag has no reader in this PR — the push/pull filter lands in nodespace-sync next (it can only compile against this once the core pin bumps). This is the required core-merges-first order for the pinned dependency; the two PRs are a coordinated pair.

Advances #1741 — the nodespace-sync push/pull enforcement PR closes it.

…ure; remove capture.sync

Introduces a general property-level `localOnly` classification in the schema
system (ADR-061 §6/§7). A localOnly property is persisted and read locally like
any other but is never included in a sync push and is ignored if it arrives in a
pull — for values that denote state on a particular machine, or content not safe
to transport as-is.

Applied to PTY capture (ai-chat mode 2d): the agent session id and the raw
transcript are localOnly (machine-bound resume handle / content-risk raw
scrollback); the derived summary syncs as the cross-device artifact.

Removes `capture.sync` — an inert setting that promised local-only behavior the
write path never enforced. What it appeared to offer is now structural via the
classification, and a toggle that could push unscrubbed terminal scrollback into
a shared tenant is not a decision a checkbox should carry. Removed from the proto,
the daemon (CaptureConfig + RPC + toml), and the frontend capture UI.

The push/pull enforcement lands in nodespace-sync (which reads this classification
via the pinned core), as a follow-up PR per the pinned-dependency cross-repo flow.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@mstomar125

Copy link
Copy Markdown
Contributor Author

APPROVE — adversarial review CONFIRMED SOUND. Critical check passed: the new ai-chat schema field names (capture:session_id / capture:transcript / capture:summary) match build_capture_properties character-for-character, so the follow-up sync key→classification filter will match them (the subtle failure mode that would've made the feature silently ineffective). capture.sync removal complete across proto/daemon/Tauri/frontend+tests; serde + deny_unknown_fields correct; test non-vacuous; all 61 SchemaField sites covered; no config-migration gap. Full pre-push gate green on the rebased branch (4113 FE + full Rust workspace + nodespace-app + e2e). Self-approved (author=reviewer=mstomar125) per core merge policy. Non-blocking nit noted: proto could use reserved 2; (harmless in greenfield).

@mstomar125
mstomar125 merged commit 77265a5 into main Jul 31, 2026
2 checks passed
@mstomar125
mstomar125 deleted the issue-1741-localonly branch July 31, 2026 14:02
malibio added a commit that referenced this pull request Jul 31, 2026
SchemaField gained local_only, unique, and unique_case_insensitive while
PR #1847 was in review. That branch never saw them, so it merged green and
broke main on contact — the two test constructors added there no longer
compile.

Adds the three fields with their defaults. Renderer behavior is unchanged.

Note for later: local_only marks a field machine-bound for sync purposes, not
model-invisible, so the entity block advertising one would not be a leak. The
two fields that set it today are on the core ai-chat schema, which neither
renderer can reach (skill_ops filters to !is_core; context_ops renders only
semantically-retrieved user schemas).

Co-Authored-By: Claude <[email protected]>
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