Repository navigation
Record how an analysis got where it did, and say what no longer holds - #77
Merged
Merged
Conversation
A person or the next agent picking up an analysis had no way to see what a conclusion rested on, or whether that was still so. History records queries, but not sources, versions or completeness, and not which ones a finding used. Set DUCKLOCAL_SESSION=FILE and query, check, propose and open each append what they did to that file: SQL and spec text, each source's size and date, the versions behind it, and each result's shape and completeness. Nothing is recorded without it, and there is no central store. `session note` records a conclusion and the steps it rests on. `session show` works out `doubts` on reading: what failed, was cut off, went unchecked, or whose source or spec has changed since. So a truncated result is never shown as complete, and an old conclusion says what has moved under it. Rows are never kept, and SQL or a spec that may hold credentials is left out whole, hash included. `check --summary` now lists truncated queries too, which the session needs and passing says nothing about. Closes #69. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its cross join built up memory, so on a fast enough machine it reached the 2GB limit inside the 1s timeout and reported resource_limit, failing macOS CI. The limits were right; the query was testing the wrong one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #69. Part of #64.
Why
A person or the next agent picking up an analysis had no way to see what a conclusion rested on, or whether it still held. History records queries, but not sources, versions or completeness, and not which queries a finding used.
What
The main idea is
doubts, worked out when you read the file. Each step and conclusion lists what failed, was cut off or went unchecked, or whose source, database or spec has changed since:{"text": "EU leads", "latest": false, "steps_since": 3, "doubts": ["#1: orders.csv has changed since"]}So a truncated result is never shown as complete, and an old conclusion says what has moved under it. An empty list means nothing is known against it, not that it's right, and the docs say so.
It's recorded per file, and only when asked. One JSON Lines file, named by whoever wants it, so there's no central store and no retention policy to invent: it stays until you clear it.
What's kept out
snapshotstrips previews.Limits to review
secretortokencosts you that query's text. It can also miss a credential in an unusual form, such as a key pasted as a plain string. I'd treat a session file as sensitive either way, and the skill says to keep it out of shared folders unless the person agrees.read_csv(['a.csv', 'b.csv'])or aCOPYreports "its sources could not be read from the SQL" rather than a partial list.originis just what the environment says, and nothing checks it. The docs say so.snapshotand how a proposal ended. There's no timeline in the GUI yet;--format mdis the readable view. The issue allowed a summary, but a GUI view would be a natural next step.Other changes
check --summarynow also liststruncatedqueries, an addition. Passing says nothing about them, and the session needs to know.Testing
tests/cli.rsruns the real commands end to end: no recording without the variable, no rows or credentials in the file, failed and refused queries, truncation, a source changing and then disappearing, spec revisions, proposals, manual clearing, and refusing to overwrite or delete a file that isn't a session.session::testscover credentials, parser references, source and glob fingerprints, and a cut-off line. The parser test also pins the JSON shape of DuckDB 2.0'sjson_serialize_sql, which I got wrong at first; a DuckDB upgrade that changes it fails there.cargo test --locked: 466 unit, 32 CLI and 8 LSP tests pass. Clippy and fmt are clean.Not tested against a real window:
record_openandsession snapshot. On Windows that would write to my local history and saved tabs. Stripping rows from a state is unit-tested, andsession snapshotwith no window running should exit 1 with kindnot_running.Docs are in
session --help, the skill and the CLI reference. If #76 merges first, the README line may need a small merge.🤖 Generated with Claude Code