Skip to content

Shorten run artifact paths for Windows reviewer workspaces #575

Description

@rianjs

Symptom

Windows reviewer workspaces can exceed MAX_PATH because runartifact.ForRun includes the full head SHA, full base SHA, and readable profile__postingIdentity in the artifact directory path.

Agreed layout

Use five path components below runs:

runs/<existing readable PR key>/<12-char head>/<12-char base>/<12-char scope hash>/run-<full UUID>

The PR key remains readable, SHA components use prref.ShortSHA, the scope component is statepaths.KeyHash(prKey, full head SHA, full base SHA, profile, postingIdentity), the full run UUID is retained, and agent IDs remain unchanged.

Acceptance

  • Preserve existing ResumeScope validation, with directory scope represented by the 12-character tuple hash.
  • Preserve five levels below runs so data-lifecycle pruning remains compatible.
  • Existing runs remain resumable because resume uses the stored ledger artifact_path and runartifact.FromDir.
  • A realistic SignalFT signal-adminapp-frontend reviewer repository path is below Windows MAX_PATH with the new layout.
  • Blank profile or posting identity validation remains intact.

Compatibility

Do not migrate existing directories. Existing ledger artifact paths continue to resolve through runartifact.FromDir.

Non-goals

  • Do not hash the PR key or agent ID.
  • Do not shorten the UUID.
  • Do not migrate existing directories.
  • Do not alter Git configuration.
  • Do not change statepaths.Layout.Run.
  • Do not add speculative documentation or CI machinery.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions