Skip to content

fix(storage): keep session task metadata out of project workspaces #57

Description

@kunaaal13

Summary

Default session task metadata is stored inside the active project workspace:

<workspace>/.pi/tasks/tasks-<sessionId>.json

This is runtime state, not project content. It creates hidden files in every project where pi-tasks runs and couples task persistence to workspace-local storage.

Expected behavior

Store default session-scoped task metadata under the global pi data directory, namespaced by active workspace and session:

~/.pi/tasks/sessions/<project-key>/tasks-<sessionId>.json

<project-key> should be derived from the active session workspace path, not the host process cwd.

Requirements

  • Use ExtensionContext.cwd as the workspace identity, following fix(storage): resolve project paths from session cwd #45.
  • Keep session IDs isolated.
  • Preserve project/shared task scope semantics.
  • Preserve PI_TASKS named, absolute, and relative overrides.
  • Resolve relative overrides from ExtensionContext.cwd.
  • Keep global task defaults in the existing global config location.
  • Define migration behavior for existing <workspace>/.pi/tasks files.
  • Avoid storing task metadata in repositories by default.

Context

Related to #45 and #56. #56 fixed completed-list accumulation and session-file cleanup, but the storage location remains workspace-local.

Acceptance criteria

  • New default session tasks write outside the active repository.
  • Different workspaces cannot collide.
  • Resume, fork, and new-session behavior remains isolated and functional.
  • Existing storage override behavior remains backward compatible.
  • Tests cover cwd differing from process.cwd, workspace namespacing, resume/fork, and overrides.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions