rossoctl / rossoctl/context-service

Make local harness capture reference-based and materialize on checkpoints

Open
#34 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
0
Forks
1
Avg merge
7h 14m
Merged PRs (30d)
26

Description

Problem

Attached harnesses already own their live state under locations such as ~/.claude/projects/.... Context Service currently copies that state into ~/.contexts/<name>/... after harness lifecycle events. This provides a stable, portable checkpoint, but continuously maintaining a full mirror duplicates storage and I/O—especially when the user has not requested a backup, sync, snapshot, or export.

The current behavior is acceptable for the POC, so this issue does not require an immediate change.

Direction

Treat ~/.contexts as a managed context catalog and checkpoint store rather than an always-current byte-for-byte mirror:

  • Record the harness, native source location, attachment, revision metadata, and freshness/dirty state.
  • Let lifecycle hooks record checkpoint boundaries and mark changed context without necessarily copying the complete source tree.
  • Materialize a consistent point-in-time capture when required by manual capture, export, sync, continuous backup, snapshot, clone, or restore.
  • Offer an explicit continuous-protection policy for users who want durable capture after every turn.
  • Investigate incremental file copying or content-addressed storage so later checkpoints and remote sync transfer only changed content.

Constraints

  • Never make portable bundles or remote revisions depend on mutable harness-owned paths.
  • Preserve atomic capture and checksum verification while the harness may still be writing.
  • Handle missing, moved, or cleaned-up native harness state clearly.
  • Keep adapters for Claude, Codex, OpenCode, and Pi behind a common capture contract.
  • Preserve the current reliable mirror behavior until the replacement is proven.

Possible acceptance criteria

  • An attached context can report its native source and whether its latest materialized checkpoint is current or stale.
  • Hooks can mark context changes without performing a full-tree copy in reference mode.
  • Sync, backup, export, and snapshot materialize and verify a stable revision before transfer.
  • Continuous-protection mode can still checkpoint automatically after harness events.
  • Tests demonstrate reduced copying for unchanged and incrementally changed harness state.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by tracing the existing lifecycle hooks, capture contract, and Claude, Codex, OpenCode, and Pi adapters to understand the current mirror behavior. Done means reference mode records source and freshness state, while capture, export, sync, backup, snapshot, and continuous protection produce verified stable revisions without regressing the current mirror.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.