Skip to content

Commit promptPath in ModuleState for snapshot-resolved refs #47

Description

@omridevk

Problem

The deterministic compiler ModuleState does not store the authored prompt path. napl q currently fills promptPath from working-tree discovery, and napl prompt falls back to the working tree when a prompt ref carries no module.

This violates the canonical-document guarantee that refs and prompt materialization resolve from committed snapshot state only.

Decision

Add promptPath to deterministic ModuleState, not to Receipt. The path is committed module metadata, not producer evidence or candidate-output identity.

The migration must preserve location-free generation identity: moving a prompt updates committed metadata without pretending generated semantics changed.

Acceptance criteria

  • Every newly committed ModuleState records a canonical workspace-relative promptPath.
  • napl q obtains committed modules and prompt paths from the selected snapshot, not working-tree discovery.
  • A hand-built prompt ref carrying head and promptPath resolves without consulting the working tree.
  • Prompt moves have an explicit metadata transition and do not require fabricated generated changes.
  • Historical states are migrated or return a pinned path-unavailable diagnostic.
  • The schema and contract versions change explicitly, with conformance coverage.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:p1High priority correctness or security worktoolchain

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions