theam / theam/facility

init advertises --canary-bot but the flag validator rejects it, so the canary can never be enabled

Open Beginner friendly
#229 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
71
Forks
64
Avg merge
15h 38m
Merged PRs (30d)
66

Description

Summary

init reads --canary-bot (src/init.mjs:333) and its closing checklist tells the user to "re-run init with --canary-bot=<your-app>[bot]" (src/init.mjs:563), but validateLocalFlags in src/cli.mjs does not allowlist the flag, so the CLI exits before init() runs:

$ node bin/facility.mjs init --yes --canary-bot='my-app[bot]'
Unknown option: --canary-bot
exit=0

The flag is also missing from help(), and no test exercises it (the tests go through runCli, so they would have hit the validator).

Consequence

The documented way to enable the weekly canary is unreachable. {{CANARY_BOT}} stays facility-canary[bot] in facility-crew.yml, and the canary "skips politely" forever, which the watchtower then reports as a healthy skip rather than a misconfiguration.

Fix

Add canary-bot to the allowed set and the value-taking list for init in src/cli.mjs, mention it in help, and add a test that renders with the flag and asserts on {{CANARY_BOT}}. Happy to open that PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/cli.mjs, where validateLocalFlags, the init value-taking options, and help() need to be checked; compare these with the --canary-bot usage in src/init.mjs:333 and :563. Add coverage through runCli that renders init with the flag and verifies {{CANARY_BOT}} receives the supplied value.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.