Repository navigation
Interview edges in default schema + tempyr schema upgrade - #56
Merged
Merged
Conversation
Default schema delta (2026-10-interview-edges): epics gain has_risk and has_question, decisions gain has_risk, risks gain risk_for -> epic and risk_for -> decision, and open questions gain question_for -> epic. `tempyr schema upgrade` applies named, versioned deltas to an existing .tempyr/schema.toml via toml_edit so comments and layout are preserved. Additions are keyed on the (node_type, edge_type, target) triple, edges whose node types are missing are reported and skipped, and applied delta names are recorded under [schema] applied_deltas in .tempyr/config.toml so a delta is never re-applied. Dry run is the default; --apply writes. `tempyr init` records every delta as already applied. init, `schema upgrade --apply`, and doctor (as a warning) now keep .tempyr/sessions/ and .tempyr/spar/ covered by the project .gitignore, since interview archives may contain raw user answers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
toml_edit re-renders edited lines with LF, which would mix line endings in CRLF checkouts (core.autocrlf=true, no .gitattributes). Edit on LF-normalized text and restore CRLF afterwards; make the test fixtures line-ending agnostic. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 11 billable files and costs up to $2.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 57 minutes for your next included review. View limit details
Comment |
- `tempyr schema upgrade`: appending to a multi-line `allowed_edges` array without a trailing comma put the comma on its own line after the last element. The last element's suffix now moves to the array's trailing decor (adding a trailing comma for multi-line arrays), a same-line comment stays attached to the element it follows, and comment lines inside an empty array survive. - The "Applied." message lists only the files that actually changed; JSON output gains `files_written`. - `.gitignore` coverage asks `git check-ignore --no-index` inside a work tree, so nested .gitignore files, info/exclude, global excludes, `**` and `!` negations count. The textual check remains the fallback without git, and nothing is appended when git already ignores the path. - `tempyr doctor` skips the archive-ignore warning outside a git repo. Co-Authored-By: Claude Opus 5.5 (1M context) <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.
Part of the interview-challenge overhaul (S1-R: schema delta + schema upgrade + gitignore coverage).
Summary
Default schema delta (
2026-10-interview-edges), additive only, inschema/default-schema.toml:epic:has_risk -> risk,has_question -> open_questiondecision:has_risk -> riskrisk:risk_for -> epic,risk_for -> decisionopen_question:question_for -> epicThe reverse pairs (
has_risk/risk_for,has_question/question_for) already existed in[edge_types].tempyr initstill embeds the file viainclude_str!. On epic roots,MissingRiskandUnresolvedQuestiongaps can now come up through the existingclassify_edge_gap. No tests broke and gap logic is unchanged.tempyr schema upgrade [--dry-run | --apply](newcrates/tempyr-cli/src/commands/schema_cmd.rs):SCHEMA_DELTAS). Each one lists(node_type, edge_type, target)additions and the[edge_types]reverse entries to add if they are missing.toml_edit(now a workspace dep; 0.22 is already in the lockfile throughtoml), so comments and layout are kept. New entries reuse the indentation of the existingallowed_edgesarray: inline single-line arrays, multi-line arrays and[[...allowed_edges]]arrays-of-tables all work. CRLF files stay CRLF..tempyr/config.tomlas[schema] applied_deltas = [...](also throughtoml_edit). A delta that is already recorded is never applied again, so an edge the user removes stays removed. The embedding and journal config loaders only read their own sections, and a test checks that the rewritten config still loads throughJournalConfig.--applythe command is a dry run: it lists the additions and writes nothing.--applywrites the files.--jsonis supported.Schemaand every added edge is checked withvalidate_edge.tempyr initrecords every known delta as applied, because the default schema already contains them..gitignore coverage: interview archives may contain raw user answers.
.tempyr/sessions/and.tempyr/spar/are now added to.gitignorebytempyr initand bytempyr schema upgrade --apply, andtempyr doctorwarns when either is missing. There are no duplicate entries: equivalent patterns and parent patterns such as/.tempyr/sessionsor.tempyr/count as covered. The.env.localhandling in init now uses the same helper (commands/gitignore.rs).Existing projects get the new edges with
tempyr schema upgrade --apply.Test plan
cargo fmt --checkcargo clippy --all-targets(no warnings)cargo test(whole workspace)schema_cmd):gitignore): appends once, adds only uncovered entries, creates the file, recognises equivalent and parent patternsapplied_deltas, andschema upgradethen reports up to date--applywrites and leaves a valid schema,validatepasses, and the doctor warning goes away--apply --dry-runis rejectedschema_cmdand integration test above against a CRLF copy ofdefault-schema.toml🤖 Generated with Claude Code