-
Notifications
You must be signed in to change notification settings - Fork 3
0.6.10 - deterministic waiting, safe self-healing, token controls, domain understanding #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
3aad6d7
feat(init): one-command setup + zero-config Vite plugin
divshekhar 1e71782
fix(vite-plugin): serve connect() as a virtual module, not an inline …
divshekhar 3420a9d
fix(init): survive jsonc .mcp.json, honor --port everywhere, fix bin …
divshekhar 8984036
feat(init): register the MCP server globally (user scope), not per pr…
divshekhar 1f85bce
feat(init): also register the MCP server in Cursor's global config
divshekhar a538846
feat(flows): grade flow assertions — flag assertion-free / presence-o…
divshekhar 840c65a
feat(flows): evaluate flow.success in the live iris_flow_replay (shar…
divshekhar 00dcbfe
feat(tools): cost preview on iris_snapshot/iris_query so agents bail …
divshekhar 2db5eb9
feat(tools): diffed snapshots — iris_snapshot diff:true returns only …
divshekhar 346f5c2
test(bench): M0 — measure the M2 token wins on real functions
divshekhar 414ca24
feat(domain): iris_domain — learn the app's flows + untested intent b…
divshekhar 1d91fea
feat(heal): never auto-heal an ambiguous drift (heals the locator, ne…
divshekhar 3c30edb
docs: surface the new capabilities (iris_domain, snapshot diff/cost, …
divshekhar eeb8ead
feat(domain): risk-rank flows in iris_domain (run history × assertion…
divshekhar 70b9979
feat(domain): headline the riskiest flow in the iris_domain summary
divshekhar 25ed01f
fix(flows): iris_flow_list returns {name,path} objects to match its o…
divshekhar 52cf56f
feat(observe): nudge the agent to scope a large timeline (cost.recomm…
divshekhar 814bbf0
fix(browser): restore original fetch identity on network observer tea…
divshekhar e9a6670
fix(browser): restore original identity on route + console observer t…
divshekhar a7775a6
feat(server): add deterministic 'settled' predicate (M3 — kills sleep…
divshekhar 20b4007
feat(server): act_and_wait defaults to settle when `until` is omitted…
divshekhar f86c676
feat(server): flow_heal verifies the consequence before persisting (M…
divshekhar 112c366
feat(server): iris_query limit + count_only for token efficiency (M2)
divshekhar c8278db
feat(server): limit + cost hint on iris_network and iris_console (M2)
divshekhar 63e6ede
feat(server): domain model surfaces mustHold — what must hold per flo…
divshekhar c2bd0c8
docs(changelog): capture the Unreleased deterministic-waiting, token-…
divshekhar 131ddeb
feat(server): iris_assert nudges presence-only assertions toward a co…
divshekhar 3284f0a
docs(cheatsheet): teach deterministic waiting, consequence-first asse…
divshekhar 80f2d80
fix(server): settled predicate ignores ambient dom.text/animation churn
divshekhar 0b43710
fix(server): floor the flow success oracle at each replay (no stale-s…
divshekhar 84c296c
test(e2e): live verification of the new features against the real demo
divshekhar 3b0e8e0
chore(release): 0.6.10 — deterministic waiting, safe healing, token c…
divshekhar 777a60b
fix(security): bump vite-plugin's dev vite to ^7 (clears GHSA-fx2h-pf…
divshekhar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| // Live verification of the features added in the [Unreleased] CHANGELOG section, against the real | ||
| // showcase dashboard (apps/demo :4310 + apps/api :8787). The existing battery proves no regression; | ||
| // this spec positively exercises the NEW surfaces end-to-end in a real browser: | ||
| // - settled predicate + iris_act_and_wait auto-settle (incl. the ambient-animation fix: the demo's | ||
| // count-up counters emit dom.text every frame, which must NOT prevent settling) | ||
| // - iris_query limit / count_only token controls | ||
| // - iris_assert presence-only `advice` nudge | ||
| import { chromium } from 'playwright'; | ||
| import { | ||
| start, | ||
| TOOLS, | ||
| BaselineStore, | ||
| RecordingStore, | ||
| FlowStore, | ||
| ProjectStore, | ||
| AnnotationStore, | ||
| createNodeFileSystem, | ||
| } from '@syrin/iris-server'; | ||
| import os from 'node:os'; | ||
| import path from 'node:path'; | ||
| const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); | ||
| let pass = 0, | ||
| fail = 0; | ||
| const chk = (l, o, d = '') => { | ||
| console.log(` ${o ? '✅' : '❌'} ${l}${d ? ' — ' + d : ''}`); | ||
| o ? pass++ : fail++; | ||
| }; | ||
|
|
||
| const irisRoot = path.join(os.tmpdir(), `iris-nf-${process.pid}`, '.iris'); | ||
| const fsp = createNodeFileSystem(); | ||
| const now = () => Date.now(); | ||
| const server = await start({ port: 4400, mcp: false }); | ||
| const deps = { | ||
| sessions: server.bridge.sessions, | ||
| baselines: new BaselineStore(), | ||
| recordings: new RecordingStore(), | ||
| flows: new FlowStore(fsp, irisRoot, { now }), | ||
| project: new ProjectStore(fsp, irisRoot, { now }), | ||
| annotations: new AnnotationStore(), | ||
| fs: fsp, | ||
| irisRoot, | ||
| now, | ||
| }; | ||
| const T = (n, a = {}) => TOOLS.find((t) => t.name === n).handler(deps, { sessionId: 'demo', ...a }); | ||
| const refOf = async (by, value) => { | ||
| for (let i = 0; i < 40; i++) { | ||
| const r = (await T('iris_query', { by, value })).elements?.[0]?.ref; | ||
| if (r) return r; | ||
| await sleep(100); | ||
| } | ||
| return null; | ||
| }; | ||
|
|
||
| const b = await chromium.launch({ headless: true }); | ||
| const p = await b.newPage(); | ||
| await p.goto('http://localhost:4310/?session=demo', { waitUntil: 'networkidle' }); | ||
| for (let i = 0; i < 200 && server.bridge.sessions.count() === 0; i++) await sleep(50); | ||
|
|
||
| console.log('\n=== Iris × new features (:4310) ==='); | ||
| chk('dashboard SDK connected', server.bridge.sessions.count() > 0); | ||
|
|
||
| // count_only — just the match count, no descriptors. | ||
| const co = await T('iris_query', { by: 'role', value: 'button', count_only: true }); | ||
| chk('iris_query count_only returns a count, drops elements', typeof co.count === 'number' && co.count >= 1 && co.elements === undefined, `count=${co.count}`); | ||
|
|
||
| // limit — cap descriptors; when more matched, total + truncated flag it. | ||
| const lim = await T('iris_query', { by: 'role', value: 'button', limit: 1 }); | ||
| const moreThanOne = (co.count ?? 0) > 1; | ||
| chk('iris_query limit caps descriptors (truncated when more)', (lim.elements?.length ?? 0) <= 1 && (!moreThanOne || (lim.truncated === true && lim.total === co.count)), `returned=${lim.elements?.length}, total=${lim.total ?? 'n/a'}`); | ||
|
|
||
| // Auth (pre-filled) → dashboard with its count-up animations. | ||
| await T('iris_act_and_wait', { ref: await refOf('testid', 'login-submit'), action: 'click', until: { kind: 'signal', name: 'auth:granted' }, timeout_ms: 5000 }); | ||
| chk('login → dashboard', (await refOf('testid', 'nav-deployments')) !== null); | ||
|
|
||
| // settled wait — the dashboard's count-up counters emit dom.text every frame; settle must STILL | ||
| // resolve (the ambient-animation fix). Pre-fix this would time out at 4s with pass:false. | ||
| const settled = await T('iris_wait_for', { predicate: { kind: 'settled', quietMs: 300 }, timeout_ms: 4000 }); | ||
| chk('settled resolves despite count-up animation churn', settled.pass === true, JSON.stringify(settled.evidence ?? {})); | ||
|
|
||
| // act_and_wait with NO `until` → auto-settle after a nav click; verdict carries settled evidence. | ||
| const aw = await T('iris_act_and_wait', { ref: await refOf('testid', 'nav-deployments'), action: 'click' }); | ||
| chk('act_and_wait (no until) auto-settles', aw.verdict?.pass === true && aw.verdict?.evidence?.settled === true, JSON.stringify(aw.verdict?.evidence ?? {})); | ||
|
|
||
| // presence-only advice — a PASSING element assertion is nudged toward a consequence. | ||
| const adv = await T('iris_assert', { predicate: { kind: 'element', query: { testid: 'deploy-list' } } }); | ||
| chk('iris_assert presence-only attaches advice', adv.pass === true && typeof adv.advice === 'string' && adv.advice.includes('consequence'), adv.advice ? 'advice present' : 'no advice'); | ||
|
|
||
| console.log(`\n${fail === 0 ? '✅ NEW FEATURES VERIFIED' : '❌ FAILED'} (${pass} passed, ${fail} failed)`); | ||
| await b.close(); | ||
| await server.close(); | ||
| process.exit(fail === 0 ? 0 : 1); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guarantee teardown with
try/finallyaround the e2e run.Any thrown await in the flow skips
b.close()/server.close(), which can leak resources and hang CI jobs.🛠️ Suggested hardening
🤖 Prompt for AI Agents