Skip to content

Check rules

atlas check loads the capabilities folder and reports diagnostics. Each one has a code, a severity, the capability and file, a message, a why and a fix line to apply literally. It exits 1 when any diagnostic is an error; --json prints them as data.

Code Severity Meaning
ATLAS000 error A file in the capabilities folder failed to load, or has no default export created with capability({...}).
ATLAS001 error Two capabilities handle the same command: a command must have exactly one owner.
ATLAS002 error A reaction to a fact no capability emits.
ATLAS003 error Shape compatibility: a consumer (needs, a foreign read shape) requires a field, case, pattern or bound its producer does not guarantee.
ATLAS004 error A capability sends a command no capability handles.
ATLAS005 error A read of a collection no capability owns.
ATLAS006 error A capability imports anything other than the runtime and ../shapes/*.ts.
ATLAS007 error An impure API (Date, Math.random, fetch, process, node imports) in a decision or an upcaster, shapes modules included.
ATLAS008 error A handler or query has no examples.
ATLAS009 error / warning No accepting example (error); a command with no rejecting example (warning).
ATLAS010 warning A capability emits a fact nothing consumes.
ATLAS011 warning A flow cycle of facts and commands that can loop forever (a paged fan-out’s self-send is not reported).
ATLAS012 warning A capability over 250 lines, not counting the lines inside examples.
ATLAS013 error Two capabilities own the same collection.
ATLAS014 error A command declares no access, or an invalid one.
ATLAS015 error A rejection code that is computed or not kebab-case; a declared rejects code that is not kebab-case or that the file never rejects with.
ATLAS016 error A fact or sent command carries a t.sensitive field.
ATLAS017 error A capability writes or removes a collection it does not own, or changes a view it does not declare.
ATLAS018 error A shapes module imports something other than the runtime and shapes modules, or exports something other than shapes.
ATLAS019 error A view holds a sensitive field.
ATLAS020 error A malformed view: a name or field that is not a bounded identifier (view at most 40 chars, field at most 63), a name declared twice, a row that is not an object, a key that is not a required string field, an index on a missing field.
ATLAS021 error A query declares no access, an invalid one or 'internal'; or a query name declared twice.
ATLAS022 error A public query returns a sensitive field.
ATLAS023 error A query or page read of an unknown view; a filter or order on a missing field; a filter operator that does not apply to the field’s type; an order on a field that is not a required scalar; a page read inside a record query; a page limit outside 1..1000; a page of a foreign view without a shape.
ATLAS024 error / warning An order no index serves after the eq filters (error); a filter no index covers (warning).
ATLAS025 error A versioned fact (t.fact) or record (t.versioned) whose chain has a gap, a missing step, or an upcaster that does not return a valid next version on its examples and on generated values.
ATLAS026 error Two capabilities share a consumer, or a consumer is not kebab-case.
ATLAS027 error A scheduled command not declared in sends, or whose owner does not give it access: 'internal'.
ATLAS028 warning A command or query input validated by t.pattern over a string without a max (ReDoS surface). Fix: t.pattern(re, message, t.text(n)).

Some rules are also enforced by the runtime: a fact or sent command with a sensitive field and a write to a collection not owned are refused as effects-invalid, and two capabilities on one consumer refuse to start. The consumer-starts-at-zero warning needs the database, so it is a boot-time trace event, not a check rule.