fix(engine): stop telling a bare-getter store that no store is registered - #1170
Conversation
…ered
registerStore('app', () => state) registers a store reticle_state can
read, so a state assertion passes off it, but with no subscribe the
state channel stays unwatched. The no-store-registered gap read that as
"no store is registered", said the assertion fell back to the DOM, and
told the reader to call registerStore(name, getState), the call they had
already made (reticlehq#1146).
stateUnwatched means no subscribable store, and the gap cannot tell an
app with a bare getter from one with nothing registered, or from a React
app whose only store is the render meter Reticle registers itself. So
the sentence now says no subscribable store is registered, which is true
in all three cases, and the cost no longer claims a DOM fallback. The
remedy asks for registerStore(name, store) or registerStore(name,
getState, subscribe), and the self-instrument proposal for the same gap
passes the store itself instead of a getter.
Closes reticlehq#1146
Signed-off-by: drakeo338 <paranoyouz@gmail.com>
|
Thanks for your first pull request to Reticle! A maintainer aims to review within two days. Before then, |
|
| declaredNothing | ||
| ? 'every verdict here rests on what the DOM happens to show, and reticle_state will stay empty however many flows are driven' | ||
| : 'the assertion could not be answered from the deterministic channel and had to fall back to what the DOM happens to show', | ||
| : 'no state change is observed, so state can at best be read as it stands and never seen changing', |
There was a problem hiding this comment.
No-store message implies readability When an app has test IDs or declared signals but no registered store, a state assertion still reaches this gap. The state read returns no stores and the assertion is inconclusive. Saying state “can at best be read as it stands” suggests the agent can read it on demand, which is not true in this case and may send them looking for state that is unavailable.
The no-subscribable-store gap's cost text said state "can at best be read as it stands", which is only true of a bare-getter store. The same facts also describe an app that registered no store at all, or a React app whose only store is the render meter Reticle registers itself, and in both of those nothing can be read, not even a one-off snapshot (greptile review on PR reticlehq#1170). The sentence now hedges on whether a read is possible at all, which holds for all three cases the facts cannot tell apart. Signed-off-by: drakeo338 <paranoyouz@gmail.com>
|
All three places the contradiction lived are fixed (the engine sentence, the core fix text, the server proposal), and |
The greptile PR-number pointer does not belong in shipped test prose. Signed-off-by: drakeo338 <paranoyouz@gmail.com>
|
Dropped the greptile reference from the test comment; the |
divshekhar
left a comment
There was a problem hiding this comment.
Both nits addressed. Good to go once CI is green.
What & why
Closes #1146
registerStore('app', () => state)registers a readable store with nosubscribe, so astateassertion passes off it while the same response says "no store is registered" and tells the reader to callregisterStore(name, getState), already done.stateUnwatchedmeans no subscribable store, and the gap can't tell that app from one with nothing registered, or from a React app whose only store is Reticle's own render-meter getter. The sentence now says no subscribable store is registered, true in all three cases, drops the false DOM-fallback claim, and asks forregisterStore(name, store)orregisterStore(name, getState, subscribe). This is the minimum the issue names; a dedicated gap kind is a follow-up.How it was verified
Added a unit test per layer, plus an end-to-end one through
reticle_assert. Reverted the fix: four of five fail without it. The fifth, the React-only case, already passes onmain— a regression guard, not a failing-first test.Gates run
pnpm lint && pnpm typecheck && pnpm test:unit(~2 min — always)pnpm test:e2e(~8 min) — touched the tool surface,core, an observer, or telemetrypnpm gate:install(~15 min) — touchedreticle init,vite-plugin,next, orbabel-pluginpnpm test:e2e:desktop(~3 min) — touchedadapters/realm/electron,adapters/realm/tauri, or desktop captureChecklist
git commit -s) — CI's DCO check fails the PR without it. Already pushed?git rebase --signoff origin/main && git push --force-with-leaseany, no free strings (wire strings live in@reticlehq/core), no non-null!console.logor internal tracking codes left in the diff.changes/(never editCHANGELOG.md— that file is assembled at release time, and editing it is what makes PRs conflict; format in.changes/README.md)docs/telemetry.md) and are covered by a test