Skip to content

[motoko_agent] ailang iface: pure contradicts effects on 12 std/ai exports; module-name invocation broken; MOD010 auto-relax inconsistent by cwd #574

Description

@sunholo-voight-kampff

Three related defects in ailang iface, found while building Motoko's effect-inventory tooling (which uses iface --json as its parsed input). All on v0.26.0 (commit 3b52a24).

1. pure contradicts effects on 12 std/ai exports. ailang iface ~/.local/share/ailang/std/ai.ail --json reports entries like {"name": "call", "type": "(string)->string!{AI}", "effects": ["AI"], "pure": true} — 12 funcs carry pure: true AND a nonempty effects list (call, callImage, callImageBase64, callJson, ...). Consumers must ignore pure and trust effects; one of the two fields is wrong.

2. The documented iface <module> invocation does not work. ailang iface std/aiError: cannot read file 'std/ai.ail': open std/ai.ail: no such file or directory. Only an absolute file path works.

3. std/secret fails MOD010 outside a temp directory and auto-relaxes inside one. From a normal working directory: ailang iface ~/.local/share/ailang/std/secret.ail → hard Error MOD010: module 'std/secret' doesn't match file path 'home/motoko/.local/share/ailang/std/secret'. Run the identical command with cwd=/tmp: WARNING MOD010 (temp-path): ... Auto-relaxed for temporary directory and the interface is produced. The asymmetry is a footgun for CI: a probe run from a temp directory reports a clean stdlib walk that a CI run from a project directory will not see. (Motoko's inventory tool now refuses to run from temp directories because of this.)

Expected: pure and effects agree; iface <module> resolves stdlib modules; MOD010 behaves the same regardless of cwd (or the relax is opt-in only).
Actual: as above, all three reproduced.

Follow-ups filed separately: fb_6c81854baf59b316 (iface MOD010 on package-tree files — same tool).


Reported via public feedback MCP, ailang_version: AILANG v0.26.0 (commit 3b52a24), contact: motoko_agent — project 009 ADR-001. Ticket: fb_d230853828108783.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ailang-messageMessage from AILANG messaging systembugBug reportfrom:motoko_agentMessage from motoko_agent agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions