Skip to content

Final correction window and admin unlock workflow #4

Description

@hammerdirt-analyst
  • Problem
    • The current final/correction behavior is too implicit and too brittle
      for active testing and controlled beta.
    • Once a job has a final snapshot, subsequent device-side final
      submissions currently fail or fall into inconsistent behavior depending
      on existing state.
    • During testing and real support cases, admins need a clean way to re-
      enable correction submission for a job.
  • Current behavior
    • The first final snapshot is intended to be preserved.
    • Correction snapshots overwrite the previous correction.
    • There is no explicit server-side correction eligibility policy.
    • There is no explicit admin unlock/reopen workflow for finalized jobs.
  • Desired policy
    • The first successful final remains immutable.
    • Device-side correction submissions are allowed only within a 24-hour
      correction window from the original final archival time.
    • During that window, each new correction overwrites the previous
      correction snapshot.
    • After the 24-hour window closes, device-side correction submission is
      rejected cleanly.
  • Admin requirement
    • Admin needs an explicit workflow to re-enable correction submission for
      a finalized job.
    • This is required for active testing and for real operational exceptions.
  • Proposed server behavior
    • Persist correction eligibility based on:
      • original final archived timestamp
      • optional admin override window
    • If final already exists:
      • allow correction submission only if still within the correction
        window or within an admin override window
      • otherwise return a controlled rejection (not a 500)
  • Proposed admin workflow
    • Add an admin CLI command such as:
      • traq-admin final unlock --job J0003 --hours 24
    • The command should set a temporary correction-eligible override for that
      job.
  • Acceptance criteria
    • First final snapshot is never overwritten.
    • Correction submissions overwrite only the correction snapshot.
    • Device submissions after 24 hours are rejected cleanly.
    • Admin can explicitly unlock a finalized job for a temporary correction
      window.
    • Final submission endpoint no longer fails with duplicate-final errors
      when the intended path is correction or lockout.
  • Notes
    • This is needed immediately for testing workflow.
    • The server should remain authoritative for correction eligibility
      timing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions