Skip to content

README front-door example fails hyb check, its build commands can't run, and the quoted corpus counts are stale (make census passes anyway) #4473

Description

@stmr

Tooling/docs defect (Low tier), not a soundness finding. Reproduced on main b1627e8 (cargo +1.99.0 build --bin hyb).

1. The README hero example is rejected by the checker

The first hy block in README.md (checkout.hy):

$ hyb check checkout.hy
error[HYB-E1001]: `regex.must_compile` is not a resolved member of curated package `regex` (HYB-E1001)
  --> checkout.hy:5:11

regex.must_compile / re.is_match do not exist. The real surface is regex.is_match(pattern, text)? (runtime/go/regexbinding, examples/09-go-imports-hybrid/program.hy). The function is also not pub, but the README's Go snippet calls hybrid.ValidateEmail.

2. The README build commands can't run

  • hyb build checkout.hy -o myapp — even with a valid file (a library function, no main):

    go build failed: runtime.main_main·f: function main is undeclared in the main package
    

    The Go snippet next to it imports hybrid.ValidateEmail, i.e. package mode.

  • Quick start: hyb build --package mypkg --out-dir out --binding-prefix example.com/mypkg has no input file:

    usage: hyb build <file.hy> -o <bin-path> ... | --package <name> --out-dir <dir> [--binding-prefix <path>]
    (exit 2)
    

3. Stale counts that make census certifies

README.md:128 says checker corpus (109/109) + differential (36/36 + 73/73); README.md:112 says differential loop 40/40 + 80/80. Actual: the corpus holds 139 programs, and python3 tools/differential_loop.py --bin ... prints accept-side 47/47, reject-side 92/92. Yet:

$ python3 tools/check_corpus_census.py
OK: all 7 corpus census surfaces agree with the corpus (139 programs: ...)

The README pattern checker corpus (\d+)/(\d+) cannot match the parenthesised checker corpus (109/109) form, and the differential ratios are not checked at all (they are exactly ACCEPT+ACCEPT-MANAGED and REJECT).

4. SPEC-LANGUAGE.md examples contradict its own rule

SPEC-LANGUAGE.md:363 says a bare managed { … } is rejected (HYB-E0003), but the example at :1618 (a // reject: HYB-E3002 block, which §13.1 makes a compile-fail claim) and the fragment at :1779 use bare managed {. Checking the :1618 example reports E3002 plus a spurious E0003.

Duplicate search

Searched open+closed issues and PRs (title+body): "must_compile", "regex.must", "validate_email", "checkout.hy", "109/109", "36/36", "73/73", "build --package", "make test-quick", "bare managed", "census … README/differential". Nothing matches. Related but different: #21/#26 (README bare managed, closed), #3724 (census breakdown), #4454/#4455 (GUARANTEES breakdown), #1196 (denominators on the three ratio surfaces; its body says README ratios, but not the parenthesised form or the differential claims), #1831/#1846/#1996 (Docker quickstart).

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