Proof Portal
Omarchy
ProbeLabsviewing a historical runA proof layer — requirements, tests and verified fixes — for two of Omarchy's subsystems: the application menu (launcher scripts, QML model, JSONC config, search and selection) and the lock screen (lock scripts, QML, PAM authentication). Scope is deliberately limited to those components of omacom/omarchy; the rest of the distribution is not covered.
A top-level JSON array is not an object map of menu entries.
Specification
The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.
A top-level JSON array is not an object map of menu entries. The parser returns an empty item set for it, as it does for every other non-object root. No phantom rows with numeric ids appear.
when array_root_present the menu_model shall always satisfy array_root_rejected
Rationale & tags
Why this requirement exists, and how it is categorised.
Rationale & tags
Why this requirement exists, and how it is categorised.
Upstream parseMenuJsonc rejects a root when typeof parsed is not object or parsed is null, but typeof [] is object. The for..in loop then walks the array indices and emits phantom rows with ids 0, 1 and so on, parented to root (#13492). PR omacom/omarchy#13968 adds Array.isArray(parsed) to the same guard.
Verification & provenance
How this requirement was checked: the review trail, edit history, and the machine-analysis status terms (each ⓘ explains what it means).
Review
- Status
- in_review
- Reviewer
- Claude Pr 13968 · AI agent
- Reviewed
- Oct 1, 2026, 17:45 UTC
History
- Created
- Sep 27, 2026, 23:20 UTC · Kimi Zero Warnings · AI agent
- Modified
- Oct 1, 2026, 17:44 UTC · Claude Pr 13968 · AI agent
Hazard review
- scenarioreviewedmalformed_inputboundaryedge_caseinput_domain
malformed_input: a top-level JSON array is legal JSON but not a menu entry map; the parser must reject it like every scalar root instead of iterating indices. Both FMEA modes (phantom rows id 0,1,...; an unintended user-privilege action on a phantom row) lived here pre-fix and the guarded rows now forbid them. boundary: empty array [] and empty object {} both yield zero rows (witnessed). edge_case: an array nested under "items" is rejected by the same pre-existing items-shape check, witnessed as a negative row. Catalog 1.11.0 re-review: input_domain applied, input_domain is on its obligation checklist: an array root yields no rows whatever whitespace, byte-order mark or line endings surround it (read as spaces by SW-REQ-261001-BNZG), and an array root that still fails JSON.parse after stripping (a block comment, a NUL) is rejected by the parse step with no rows and no exception (witnesses in test/node/menumodel-replay.test.mjs). concurrency_scale not applicable, a pure function of its arguments, recomputed on each load or keystroke: no state across calls, no process, timer or lock.
- propertyrevieweddeterminism
The guard is a pure type check on the parsed root with no environment, order or time inputs, so the same text always gives the same item set. The seeded differential test in test/node/menumodel-replay.test.mjs includes array roots.
- domainnot applicable
No domain workload tags (HTTP/crypto/IPC frameworks); the component parses a local user-authored config file into a menu model.
- structuralnot applicable
Implementation is GC'd JavaScript (QML JS engine). No manual memory, pointer arithmetic, binary framing, or format strings exist here. The structural catalog targets C-family hazards that cannot exist here.
Change history
Every recorded revision of this requirement's source file — newest first, each with its commit message and the diff for that change.
Review history
Human and AI-agent approvals of this requirement — the 'why was this approved' lineage, each with the reviewer's justification and the code it cites.
- Claude Pr 13968 · AI agentApprovedSpec conformanceOct 1, 2026 · 2 days agoREVIEW-72
Re-reviewed on the PR #13968 guard (pr/13968 mirror). FRETish guard (array_root_present -> array_root_rejected) matches parseMenuJsonc: the root check now returns [] when typeof parsed is not object, parsed is null, or Array.isArray(parsed), so an array root yields an empty item set before for..in can walk its indices. Witness rows cover an array root with a leading comment and a trailing comma, an empty array, and an object root that still parses; the negative row covers an array of scalars, a string root and a null root. The violation rows need the Array.isArray test removed or a broken condition, so they are dispositioned defensive. Report #13492 now exits 0 on this tree.
Cited code (2)
Obligations
What this requirement must witness to be considered satisfied — the required evidence, and the tests that discharge each one.
2 obligations · 2 discharged
Browse the catalogueBehavior when inputs are syntactically or structurally invalid.
FMEA mode (a): a menu file whose root is a JSON array parses cleanly. for..in then walks the array indices and renders phantom rows id "0","1",... parented to root. Rows the config never defined appear in the menu. FMEA mode (b), the realistic payload: a phantom row carries a label and an action out of the array element. Activating it runs a command the user never placed in the menu, with the user's full privileges. No error surfaces in either mode because JSON.parse accepts the array. The corruption is visible only as extra rows. PR #13968 adds Array.isArray to the root-type guard. The grade records the upstream worst case that this requirement forbids.
- negativerequiredpresentCovered by 2 tests
- nominalrequiredpresentCovered by 2 tests
A parser, reader, or configuration loader states its accepted input domain at the byte level and what happens for each partition of it.
- nominalrequiredpresentCovered by 1 test
- negativerecommendedpresentCovered by 1 test
Formula evidence
The formal formula behind this requirement, the variables it is written over, and the tests that exercise it (each term is explained inline).
Formula evidence
The formal formula behind this requirement, the variables it is written over, and the tests that exercise it (each term is explained inline).
FRETish formula
when array_root_present the menu_model shall always satisfy array_root_rejected
Variables
| Name | Type | Direction | Description |
|---|---|---|---|
| array_root_present | — | The parsed JSONC root is a JSON array rather than an object map. | |
| array_root_rejected | — | The parser returned an empty item set for a top-level array root. |
Witnesses· 2 scenarios total
- menu-test.sh:1exercises 2 condition scenarios
MC/DC truth table· 3 rows
Each row assigns the formula's conditions (T/F) and shows the Result— the formula's value for that input row, not a test pass/fail. A row proves a condition when flipping only that condition flips the outcome. The test that covers each row is linked.
mcdc:ignoreNo-actionfalse-result row satisfied by designUncoveredneeds a covering test| # | array_root_present | array_root_rejected | Result | Proves | Covering test |
|---|---|---|---|---|---|
| 1 | F | F | T | array_root_present | |
| 2 | T | F | F | array_root_present | — |
| 3 | T | T | T | array_root_rejected |
Its place
How this requirement connects — what proves it, what it affects, and what it rests on. Authored links only here; automatically derived links come from the audit index.
Loading graph…
Trace evidence
The concrete artifacts linked to this requirement — implementing code, verifying tests, documents, and the findings raised against it.
No findings affect this requirement
Nothing was flagged against this requirement in the pinned run.
Impact
Blast radius — authored trace links only (automatically derived links come from the audit index and aren't shown here).
Impact
Blast radius — authored trace links only (automatically derived links come from the audit index and aren't shown here).
If you change this
Files to re-check (1)
- MenuModel.jsshell/plugins/menu/MenuModel.js
Tests to re-run (2)
- menumodel-replay.test.mjstest/node/menumodel-replay.test.mjs
- menu-test.shtest/shell.d/menu-test.sh
What this rests on
Discussions
Discuss this with the proof team. Nothing changes in your audit automatically — you open a request and a staff member records any outcome inside the thread.