Skip to content

6 contractiles fail nickel typecheck: import path points one level off an existing file #934

Description

@hyperpolymath

Summary

All 6 contractile definitions fail nickel typecheck on an unresolvable relative import. The imported file exists — it is simply at a different path than the import states, so this is a stale path to repair, not missing work.

Measured evidence

nickel-lang-cli nickel 1.17.0 (rev db7978e):

$ nickel typecheck .machine_readable/contractiles/must/must.k9.ncl
error: import of ../k9/template-hunt.k9.ncl failed: could not find import
       (looked in [<repo>/.machine_readable/contractiles/must])
   ┌─ <repo>/.machine_readable/contractiles/must/must.k9.ncl:30:15
   │
30 │ let base_k9 = import "../k9/template-hunt.k9.ncl" in
   │               ----------------------------------- imported here

Six for six:

.machine_readable/contractiles/adjust/adjust.k9.ncl    FAIL
.machine_readable/contractiles/bust/bust.k9.ncl        FAIL
.machine_readable/contractiles/dust/dust.k9.ncl        FAIL
.machine_readable/contractiles/intend/intend.k9.ncl    FAIL
.machine_readable/contractiles/must/must.k9.ncl        FAIL
.machine_readable/contractiles/trust/trust.k9.ncl      FAIL

The target is present, one directory level off:

$ find . -name 'template-hunt.k9.ncl'
./.machine_readable/svc/k9/template-hunt.k9.ncl

From .machine_readable/contractiles/must/, the written ../k9/... resolves to .machine_readable/contractiles/k9/, which does not exist. The path that reaches the real file is ../../svc/k9/template-hunt.k9.ncl.

Acceptance criteria

  • All 6 contractiles resolve their imports and nickel typecheck exits 0 for each.
  • The correction is verified by running typecheck, not by reading the path — confirm ../_base.ncl resolves too, since it sits on the same stale assumption.
  • If svc/ was a deliberate move, every other importer of k9/ is checked for the same breakage; state the count.
  • A typecheck of the contractiles runs in CI, so this cannot rot silently again. Note that .githooks/validate-lint-format.sh cannot currently observe it — see validate-lint-format.sh: Rust and Nickel arms ask a different question than their tool #932, where the Nickel arm chokes on the 8 K9! files before reaching these.

Found while measuring #931.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions