Skip to content

Workspace rules state is not carried over from the 0.12.9 in-project rules.json, and nothing tells the user #1691

Open

Description

@sahrizvi

Found during the v0.12.10 release review of #1669 "fix: workspace rules state lives outside the project". Deferred because carrying anything over from the old in-project file contradicts the fix's reason (nothing in the working tree is trusted), so the decision needs the author.

What happens on upgrade from 0.12.9

The workspace rules state is now read only from $XDG_STATE_HOME/altimate-code/workspace-rules/<sha256 of the project's real path>.json. Nothing reads, imports or removes the old <project>/.altimate-code/learn/workspace-rules/rules.json, so after upgrading:

  • proposals queued but never sent, review notices, dismissed topics and the personal learning on/off choice from /rules are gone; someone who turned learning off is back on the workspace setting without being told;
  • the usage-report cursor resets, so the first report can count the last 30 days again;
  • team rules are absent from sessions until the first sync stamps pulled_with, and nothing says so in the TUI or in learn status;
  • the old file stays in the working tree with proposal text in it.

The release notes for v0.12.10 state all of this.

Decide and do

  1. A one-time notice when the old rules.json exists and the new state file does not: a learn status line and one log.info, saying the state moved, what was not carried over, and to run altimate-code learn sync. Low risk; it reads nothing from the old file but its existence.
  2. Whether to carry over the person's own choices (dismissed topics and the learning choice) from the old file. They are not credentialed actions, so trusting them is a smaller step than trusting the outbox, but the author's call.
  3. State files are keyed by real path and never garbage-collected: a moved or renamed project folder orphans its state file silently, and .unreadable-<timestamp> copies accumulate. Consider a learn subcommand or a startup sweep that lists or removes state for folders that no longer exist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions