Skip to content

Introduce a versioned compact-placement lifecycle with v1 resume compatibility #68

Description

@rosshd

Parent: #58
Related: #56, #59, #61.

Problem

The current placement lifecycle is hard-coded to seven required stages in PLACEMENT_STAGES.
Persisted profiles store the current stage and evidence references against rubric coding-placement-v1.

The redesigned experience needs fewer, adaptive interactions, but changing the stage list in place would invalidate or misroute existing in-progress and provisional placements.

Goal

Introduce a versioned placement lifecycle contract that supports a compact interview sample while preserving exact recovery and interpretation of all v1 attempts.

This issue owns the state and compatibility foundation only.
The learner-facing compact conversation, editor restrictions, debrief, and result presentation are separate child issues.

Technical scope

  • Define explicit lifecycle/rubric definitions instead of treating one global stage tuple as timeless.
  • Add a compact v2 lifecycle with durable states for interview conversation, implementation, optional debrief, and completion.
  • Bind each attempt to its lifecycle/rubric version at creation.
  • Route stage progression, skip behavior, evidence bounds, result derivation, stale handling, and resume from the attempt's recorded version.
  • Preserve append-only attempt evidence and immutable terminal attempts.
  • Keep placement results provisional and separate from mastery.
  • Ensure profile edits invalidate recommendations without deleting attempt history.
  • Keep v1 profiles readable and resumable at their exact recorded stage.
  • Reject malformed or unknown lifecycle versions safely.
  • Do not silently reinterpret v1 evidence as v2 evidence.

Likely surfaces:

  • src/openlearn/interview_prep.py
  • src/openlearn/interview_attempts.py
  • src/openlearn/cli.py
  • tests/test_interview_prep.py
  • tests/test_cli.py
  • placement fixtures and schema documentation

Acceptance criteria

  • New placements persist an explicit compact lifecycle and rubric version.
  • A v1 in-progress placement resumes at the exact v1 stage and completes under v1 semantics.
  • A v1 provisional result remains readable and is not recalculated under v2 rules.
  • V2 stage progression supports an optional debrief without requiring placeholder evidence for skipped stages.
  • /stop, /discard, /skip, and reduced-demand baseline behavior remain durable and idempotent.
  • Runner, editor, or process interruption cannot become learner-failure evidence.
  • Evidence references remain bounded by the lifecycle definition and survive restart without duplication.
  • Placement completion grants no mastery and does not mark interview skills ready.
  • Unknown or malformed lifecycle versions fail closed with a recoverable error.
  • Unit tests cover new, v1 resume, v1 terminal, v2 interrupted, skipped, baseline, malformed, and repeated-sync cases.
  • make check passes.

Out of scope

  • User-facing interview dialogue and copy.
  • Disabling editor autocomplete.
  • Selecting the debrief question.
  • Continuous recalibration from later practice.
  • Full timed mock interviews.
  • Data migration that rewrites historical attempt records.

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