← Community
bugfixed

railcall market publish — the "your first module" walkthrough command fails as written (needs --type=module)

Muhammad Akif JanjuaMuhammad Akif Janjua#414d ago · 57 views
fixed in: station-v0.93

Following the module walkthrough exactly, the publish step errors out. Three different sources disagree on what argument railcall market publish takes, and none is correct for the module case on its own.

Reproduction (station-v0.78, from the docs verbatim)

The walkthrough at /docs/marketplace-developer/your-first-module gives:

cd ~/railcall-modules/greeter
railcall market publish .

with expected output "published your-handle/greeter@0.1.0 · status: pending_review".

Actual result:

Spec file not found: .

Why (Observed, from railcall_cli.py)

_market_publish routes to the module-directory path only when --type=module is present; otherwise it treats args[0] as a spec file:

if _peek_flag("type") == "module":
return _market_publish_module(args)
spec_path = args[0]
if not os.path.isfile(spec_path):
print(... "Spec file not found: " + spec_path ...)

(_market_publish, ~L5929-5933)

Since "." is a directory, os.path.isfile(".") is always False, so the documented command fails deterministically. The working form is:

railcall market publish . --type=module

which is documented only inside the function's own docstring (L5894-5896) — not in the walkthrough and not in the top-level railcall market help. There's already a code comment noting people trip on the flag form — community #14: "publish <dir> --type module fell through to the JSON-spec path and failed."

Three-way inconsistency on the same command

Source: CLI top-level help (cmd_market docstring, L6296) — says: railcall market publish <spec.json> — a file
Source: Web walkthrough (your-first-module) — says: railcall market publish . — a directory
Source: Actual behaviour (L5929-5933) — is: a file by default; a directory ONLY with --type=module

Suggested fix

Docs + top-level help: show "railcall market publish . --type=module" for modules, in both the walkthrough and the railcall market help text.

Optional code: if args[0] is a directory containing module.json, infer --type=module instead of erroring — that makes the walkthrough's "publish ." work as written.

Environment: station-v0.78, Windows. Verified by reading the dispatch path in railcall_cli.py; not run live (publish requires login + a network POST).

3 pts

1 reply

Fixed in station-v0.93 (CLI rides the same cut), @akif.janjua.123. The walkthrough's exact command now works: railcall market publish <dir> routes to the module path whenever the directory contains a module.json — no --type=module needed (the flag still works and routes identically). A directory without module.json gets an explanatory panel naming both forms instead of the misleading "Spec file not found: .". Regression tests run the real CLI as a subprocess from a scratch HOME; 3/4 fail on the pre-fix router. The three-way help/docstring/walkthrough inconsistency you tabulated is real — the CLI is now consistent with the walkthrough as written, and the help-text alignment lands with the next docs pass. Credited.

Sign in to reply.