Skip to content

test(roadmap): a synthesized chain edge is authored and must gate #235

Closed

Description

@Kuldeep2822k

Problem

PAL-205 makes inferred position advisory — enumeration order (toc, #223) and filename collation between equal ranks (tie, #234). palee roadmap --auto-chain also derives depends_on from position: it chains topics by their order field, appending unordered ones after ordered ones (INV-47).

That similarity is misleading, and nothing in the suite said so. A roadmap is a file the learner typed whose only purpose is to declare a prerequisite plan, and INV-47 already lets an explicit depends_on override the synthesis. So the ruling recorded here: a synthesized roadmap chain edge is an authored edge and it gates. It carries no depends_on_source label, and an absent label is the fail-closed authored case.

The risk is the opposite direction: a future refactor that routes synthesized edges through the advisory labels "for consistency with the chain tiers" would pass the entire suite while turning every roadmap into a suggestion.

Fix

A test that asserts the consequence, not the intent — test/cli-roadmap-wikilink.test.ts, "a roadmap-synthesized chain edge gates, because the learner wrote the list":

  • the imported note's frontmatter has depends_on: [T-g-one] and no depends_on_source;
  • palee plan --json offers only T-g-one while mastery is 0.

Proven load-bearing by making doImport label synthesized edges toc: the test fails on the missing label, and restoring the file byte-identical returns it to green.

Acceptance criteria

  • Synthesized roadmap edges are written unlabeled.
  • The dependent topic stays off the ready list until its predecessor is mastered.
  • The test fails if the synthesis is ever demoted to an advisory source.
  • INV-47's wording records the ruling, so the goal sentence ("nothing derived from list position gates") does not read as a bug report against roadmap --auto-chain.

Environment

Repo Kuldeep2822k/cli, branch test/roadmap-order-gates stacked on test/pal205-gate-hygiene (#226). Node 24, @kuldeep2822k/palee 0.5.2. Test-only: no source file changes.

Activity

  1. added
    coreCore source code changes
    testsTest suite changes
    P2Medium-High Priority (Scheduled for release)
    on Sep 29, 2026
  2. Kuldeep2822k commented on Sep 30, 2026

    @Kuldeep2822k
    OwnerAuthor

    Verification round - criteria 1-3 hold at feat/73-tier0-hygiene @ 0d222bf

    src/cli/roadmap.ts:466-475 writes a synthesized edge without a label, and :487-489 removes a stale one first (deletes precede sets - src/storage/frontmatter.ts:125-130), so the dependent gates as authored: test/cli-roadmap-wikilink.test.ts:461 asserts the label is absent (:495) and the dependent is withheld (:498-505, exactly ['T-g-one']). Two independent routes make that test fail if the synthesis is ever demoted: adding a depends_on_source survives the removal, and turning undefined into an advisory default falls through src/types.ts:514.

    I have left criterion 4's tick alone rather than change it, but flagging that the tree does not support it. planning/invariants.md:75 (INV-47) says nothing about labels or gating, and :73 states affirmatively that depends_on_source "never affects gating" over a two-value domain - both now false against src/types.ts:500 and src/engine/dependency.ts:771. Nothing in the repo yet states that a synthesized roadmap edge gates because it is unlabeled, so a reader of INV-46's goal sentence ("nothing derived from list position gates") can still read roadmap --auto-chain as a bug. #238 owns the invariant rewrite; the question for you is whether #216's INV-47 restatement plus this issue's code comments count as recording the ruling, or the invariant text itself has to change.

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

    P2Medium-High Priority (Scheduled for release)coreCore source code changespriority: mediumMedium priorityrelease: minorMinor releasetestsTest suite changes

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions