Skip to content

Session handoff links pin the brief revision and commit - #1445

Merged
zlareb1 merged 13 commits into
mainfrom
feat/session-handoff-links
Nov 25, 2026
Merged

zlareb1 merged 13 commits into
mainfrom
feat/session-handoff-links

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • New Feature

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

Share a session brief from Conversations through a link pinned to its saved snapshot and Git commit. Restoring a link in a coding plugin needs the next server release.

Why

A teammate needs the decisions, failed approaches and remaining checks that explain a change. A link to a moving brief can give the recipient a different state of the work from the one the sender chose.

Scope and risk

A handoff reads one saved snapshot under the recipient's existing namespace permissions. The snapshot ID binds the stored version to the brief content and commit. The dashboard and plugins check the returned revision, snapshot and commit before displaying the brief. Writes advance past the version they read so a slower clock cannot leave a deleted snapshot visible. Recognized shell check summaries are carried into the brief as bounded evidence. The authoring plugin records local checkout state and uses cached remote refs to flag commits the recipient might need to fetch.

The branch also fixes CI failures from the source-read lessons change on the base branch. The scope census records the authorization check already used by code.read, and the SQL snapshot reflects the new memory metadata projection. LOOM_CODE_RESULT_PATH_HINT_ROWS keeps the existing default of 512 metadata rows for source ranking.

Compatibility, rollout and rollback

  • Wire. session.brief_save accepts optional checkout observations and sections.verification. session.brief_get accepts an optional snapshot_id, returns snapshot_id and the stable snapshot_key, and includes verification when sections are requested.
  • Operator steps. Use the updated server and plugins for handoff links. Existing session briefs retain their usual read path.
  • Rollback. Existing tables and revision history remain readable. A build without snapshot support cannot restore handoff links.

Tests

  • The sender provenance census, namespace scope census, configurable bounds, and SQL shape tests pass. The parser cost test passes in Linux with its existing thresholds.
  • ClickHouse 26.11 defaults to persistent local storage. The SQL test helpers use a separate temporary path per ephemeral call. All 94 tests that failed in unit shard 6 pass with the same ClickHouse release after isolation. The opt-in codec tests and all 12 SQL analyzer tests pass on 26.11.
  • Seven live integration cases pass on ClickHouse 26.10 and 26.11. They check restricted view metadata, refusal of execution limits below the allowed floor, and cleanup after the schema barrier has observed the old query finish.
  • A lesson-enrichment unit test hit its deadline on the first run. The shard passed when GitHub reran the same commit.
  • make format-check, make lint, and make typecheck.
  • pytest -q tests/unit/test_session_brief.py tests/unit/test_agent_instructions.py, the ClickHouse statement analyzer, and the live tests/integration/test_session_briefs.py test.
  • The focused dashboard tests, the production build and bundle budget, and the browser namespace-link tests.
  • Plugin tests and CLI smoke tests for both coding plugins. A live handoff restored the first revision after a later save, and the namespace gate refused a caller without access.
  • make test-mixed-version REQUIRE=1. CI covers the full Linux unit run.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated with Codex. The tests above cover the implementation and its access checks.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Local format, lint, type checks and focused tests pass. The full make test-unit and applicable integration results are reported by CI.
  • Generated SDK, operation reference and plugin files were regenerated.
  • Both plugin manifests carry a matching version bump.
  • The frontend builds and focused tests pass.
  • The docs cover the handoff workflow and the description names the wire changes.
  • The commit is signed off.

A teammate can resume from the same context the sender chose after later saves. Existing namespace access controls each restore.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 25, 2026 11:53am UTC
loom-telemetry Ready Ready Preview Nov 25, 2026 11:53am UTC

Request Review

Use the deletion revision as the history boundary. Preserve short check summaries from shell results and report untracked files regardless of status preferences.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Resolve a pinned snapshot by its stored key. Use write order across deletes and preserve the check result when a command exceeds the brief budget.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Two saves can receive the same timestamp on different workers. Bind the stored version to the commit and brief content so each link still restores the chosen save.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
A replica with a slower clock can acknowledge a tombstone that loses to the original row. Use the shared version floor for deletes and saves to keep pinned snapshots retired.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Regenerate the Rust SDK from both the code-read and session-brief wire contracts.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Checkout metadata and check summaries use the session brief admission path. Refresh the source fingerprints after checking the automatic senders.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Expose the metadata read bound with its existing default. Record the existing namespace authorization and regenerate the SQL shape for the source metadata projection.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Check that a full page can reorder paths and an overflow leaves the original order in place.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
ClickHouse local keeps default storage between runs. Give ephemeral calls their own directory and keep caller-supplied paths for tests that share state intentionally.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
The opt-in test reads the settings catalog before creating its coded tables. That keeps the fixture usable across the ClickHouse releases the provider rebuild supports.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Use a private configuration and decode the capability check as JSON. Keep the same SQL input format and result assertions on both codec settings.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
Verify that restricted view definitions are fully masked or suppressed, and keep the key check unconditional. Check the refusal for negative time limits and tolerate an already-finished query during cleanup.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 merged commit 7c7d8ce into main Nov 25, 2026
135 of 136 checks passed
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