Skip to content

fix: restore forge check/build/lint/test on latest March - #1

Merged
Ch4s3 merged 3 commits into
mainfrom
claude/conduit-march-compatibility-d18d18
Jul 29, 2026
Merged

Ch4s3 merged 3 commits into
mainfrom
claude/conduit-march-compatibility-d18d18

Conversation

@Ch4s3

@Ch4s3 Ch4s3 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix FileError-to-String conversion in cmd_conduit.march (3 sites) — needed explicit to_string(e) before concatenation.
  • Qualify an ambiguous Failed(...) constructor in test_conduit.march (Conduit.Failed vs RemoteCall.ReplyResult's own Failed).
  • Rework cron_parser.march's list-field parsing to avoid a March native-compiler codegen bug: a private helper returning Result(Field, String) (where Field's payload constructor wraps a List), destructured via Ok(Values(vs)) inside a self-recursive accumulator loop, reliably segfaulted the compiled binary on any comma-separated cron field (e.g. "1,31 * * * *") while the interpreter evaluated the identical logic correctly. Isolated to a ~40-line standalone repro and confirmed as a compiler bug, not a logic bug. Fixed by keeping the whole pparse_list recursive family on plain Result(List(Int), String).

Two multi-file module-resolution bugs in the March compiler itself (dedup order-dependence in march check, and a missing filename fallback in the import resolver) were also found and fixed separately in the toolchain to unblock this — those aren't part of this diff since they live in the march repo, but are required for forge check/forge test to pass cleanly with this branch.

Test plan

  • forge check — 0 errors
  • forge build — 0 errors
  • forge lint --strict — no issues found
  • forge test (incl. property tests) — 167 tests, 0 failures
  • Cron parser output cross-checked against the interpreter for *, N, N-M, N-M/S, */S, and comma-lists of each

Ch4s3 added 3 commits July 28, 2026 21:56
- cmd_conduit.march: convert FileError to String via to_string() before
  concatenation (3 sites) — was a type error against latest March's stricter
  FileError handling.
- test_conduit.march: qualify Failed(...) as Conduit.Failed to disambiguate
  from RemoteCall.ReplyResult's own Failed constructor.
- cron_parser.march: rework list-field parsing (pparse_list_item and a new
  pparse_range_or_step_values) to return Result(List(Int), String) instead of
  Result(Field, String). The prior shape — a private helper returning a
  Result wrapping a multi-constructor ADT whose payload constructor wraps a
  List, destructured via Ok(Ctor(vs)) inside a self-recursive accumulator
  loop — segfaulted the compiled (march --compile) binary on any
  comma-separated cron field (e.g. "1,31 * * * *") while the interpreter
  evaluated the identical logic correctly. Confirmed via isolated repro to be
  a March native-codegen bug, not a logic bug; keeping pparse_list's whole
  recursive family on plain Result(List(Int), String) avoids the miscompile.

forge check/build/lint --strict/test (167 tests, incl. property tests) all
pass clean. Required a matching update to the March toolchain itself
(module-resolution fixes) installed separately.
…ted)

forge.toml declared depot via { registry = "forge", version = "0.1.0" },
switched from a path dep in bcead90 ("prepare conduit 0.1.0 for forge
registry publish"). forge's RegistryDep resolution is an unbuilt
placeholder (forge/lib/cmd_deps.ml: "RegistryDep: placeholder (registry
not yet built)"), so that dependency silently resolved to nothing —
depot was completely absent from MARCH_LIB_PATH, and every depot-backed
module (Db, Pool, Connection, ParamText, ...) in postgres.march showed as
unknown. This has been the actual cause of CI failing since that commit;
none of it was related to the March version bump in this branch.

CI's workflow already clones depot to ../depot specifically for this,
so switching back to a path dep re-enables what CI was built for.

Verified against a from-scratch sandbox: fresh depot clone, march built
from upstream main (after merging march-language/march#106 and
march-language/depot#1, both required for this to typecheck) — forge
build and forge test --release both pass clean (167 tests, 0 failures).
march's resolver fix (march-language/march#106, merged) makes forge test
actually typecheck every auto-discovered test file instead of silently
dropping siblings the entry doesn't reference by name. That surfaced a
real, previously-invisible gap here: the module imports Connection
(needs IO.NetConnect) and calls random_bytes transitively via the
Postgres storage backend (needs IO.Random) but declared neither.
@Ch4s3
Ch4s3 merged commit 574b8d2 into main Jul 29, 2026
2 checks passed
@Ch4s3
Ch4s3 deleted the claude/conduit-march-compatibility-d18d18 branch July 29, 2026 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant