feat(framework): retention, version control status and schema versioning for the journal

Open
#657 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
cli, tooling

Research direction

Start by tracing .aidd/, aidd_docs/runs/, runs/*.json, metadata.json, and the aidd telemetry disable command; review the related constraints in #620, #646, and #647. Define the version-control policy, retention path, schema compatibility behavior, and disable semantics. Done means rotation and pruning are tested, schema v2 and additive-key fixtures remain readable, and existing telemetry behavior is stated and matches the command.

Written by the indexing model from the issue text.

Description

Outcome

The run journal has a bounded size, a stated place in version control, and a reader that survives a schema change.

Scope

Three policies that must exist before data accumulates, because each is far more expensive to introduce afterwards.

  • Version control status. .aidd/ is currently neither tracked nor gitignored in this repository, and aidd_docs/runs/ inherits that ambiguity. Decide, and state the consequence: a tracked journal puts who-worked-on-what-and-for-how-long into permanent history, which is the very thing #652 says cannot ship without an organisational decision.

  • Retention and rotation. One file per session, forever, with no deletion path. A team of ten at twenty sessions a day reaches tens of thousands of files inside a year, in git, with no way to prune them that does not rewrite history.

  • Schema versioning. Both runs/*.json and metadata.json carry schema_version: 1 and nothing says what a reader does with 2. #620's strict nine-key whitelist makes every additive change a breaking one, which is the opposite of what a version field is for.

  • Excludes: deletion of telemetry held in the sink, which belongs to the sink's own retention.

  • Excludes: any hosted retention.

Done When

  • aidd_docs/runs/ is either tracked or ignored by an explicit rule, never by omission.
  • A rotation path exists that does not require rewriting history, and it is exercised in a test.
  • A reader given schema_version: 2 behaves predictably and says so, rather than failing or silently misreading.
  • An additive key does not break a reader written against the previous version, asserted with a fixture.
  • aidd telemetry disable states what happens to data already written, and does what it states.

Completion Evidence

A journal grown past its retention bound, pruned, and still readable — plus a reader running against a fixture of the previous schema version.

Relations

Field Value
parent #631
related #620, #646, #647
Dominant language
TypeScript
Stars
481
Forks
45
Avg merge
14h 36m
Merged PRs (30d)
110

Contributor guide

Open the contributing guide

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.

More from ai-driven-dev/framework

All issues in ai-driven-dev/framework

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.