Skip to content

bug(github): 'expression' intrinsic is registered but never exported from src/index.ts #1069

Closed

Description

@lex00

Found while implementing #1067's intrinsic-foldability validation (auditIntrinsics in packages/core/src/cli/commands/check-lexicon-intrinsics.ts), which checks that every intrinsic a lexicon registers in plugin.ts's intrinsics() actually resolves to a real export of src/index.ts.

The defect

lexicons/github/src/plugin.ts registers:

intrinsics(): IntrinsicDef[] {
  return [
    {
      name: "expression",
      description: "${{ }} expression wrapper for GitHub Actions contexts",
      outputKey: "expression",
      isTag: false,
    },
  ];
},

But src/index.ts exports Expression (capitalized — the class) and a set of helper functions (github, runner, secrets, matrix, steps, needs, inputs, vars, env, always, failure, success, cancelled, contains, startsWith, toJSON, fromJSON, format, branch, tag) — nothing literally named expression. The registration describes the ${{ }} expression system as a whole, not a single callable export.

chant dev check-lexicon lexicons/github now reports:

FAIL  Registered intrinsics are exported by the package — "expression" is registered in plugin.ts intrinsics() but is not exported from src/index.ts
FAIL  Registered intrinsics' isTag matches how they're authored — "expression" is registered in plugin.ts intrinsics() but is not exported from src/index.ts

Options

  • Rename the registration to Expression (the class that actually exists) and adjust the description to match what that specific export does.
  • Or decide the "expression system as a whole" isn't a single intrinsic in the IntrinsicDef sense, and remove the registration (github's expression system doesn't need to appear in the generated intrinsics doc table the way aws's Sub/Ref do).

Either way, the fix should keep the intrinsics doc page (chant dev docs / lexicons/github/docs/...) accurate.

Acceptance

  • chant dev check-lexicon lexicons/github's two intrinsic-audit checks pass.
  • The github entries for these two checks can be removed from KNOWN_FAILURES in scripts/check-lexicons.ts.

Activity

  1. lex00 commented on Jul 28, 2026

    @lex00
    ContributorAuthor

    Fixed in PR #1163. The KNOWN_FAILURES 'unresolvable' note conflated 'the isTag check has no resolved target yet' with 'unverifiable': the registration said name: "expression" while the real export is the capitalized Expression class. Renamed the registration, both tier-1 checks pass, github 17/17, both KNOWN_FAILURES entries removed — the github block is now empty.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions