Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
fix(view): a failed catch-up keeps the board it shows [N26,A2]
Corey Olsonad6ae1563d33
diff --git a/src/cockpit.js b/src/cockpit.jsindex c4c6aed6..8c9c42bf 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -1033,6 +1033,9 @@ async function refresh(fresh = null) {if (!fresh && !refreshDrawn.full) { catchEvery = true; catchUp(); }return;}+ // Only a read of every board can say the shown project is gone and choose another. A catch-up that could not read+ // the shown board, as while the view restarts, failed; it keeps the board and the page says it is offline.+ if (fresh && !next.project && !next.group) throw new Error('the board did not answer; is pullboard view still running?');refreshDrawn = { generation, full: !fresh };if (!next.project && !next.group && next.projects.some((p) => p.ok)) {view.root = next.projects.find((p) => p.ok).root;diff --git a/test/cockpit/live.test.js b/test/cockpit/live.test.jsindex 6e7a9e99..0d529e9a 100644--- a/test/cockpit/live.test.js+++ b/test/cockpit/live.test.js@@ -246,6 +246,29 @@ test('an older answer for a board opened again is not drawn over a newer one [N2}});+// The #545 landing failure: a catch-up that read only the shown board, while the view restarted, found it unreadable+// and the other boards kept, and so moved the page to another board as if the shown one were gone.+test('a catch-up that cannot read the shown board keeps it shown [N26]', async () => {+ const box = machine();+ const alpha = project(box, 'kept-alpha');+ project(box, 'kept-beta');+ const view = await startView(box);+ try {+ const page = await openPage(view);+ assert.equal(page.run('view.root'), alpha.repo, 'the page opens on the first board');+ page.run(`(() => {+ const real = fetch, id = data.projects.find((row) => row.root === ${JSON.stringify(alpha.repo)}).id;+ fetch = (path, init) => path.includes('/boards/' + id + '/state')+ ? Promise.resolve({ ok: false, status: 503, json: async () => ({ version: 1, error: { code: 'SERVICE_ERROR', message: 'the view is restarting' } }) })+ : real(path, init);+ })()`);+ await assert.rejects(page.run(`refresh(new Set([${JSON.stringify(alpha.repo)}]))`), /did not answer/, 'the catch-up fails as a read');+ assert.equal(page.run('view.root'), alpha.repo, 'the page stays on the board it shows');+ } finally {+ await view.stop();+ }+});+/*** A project group of `count` real repos, opened in real Chrome as the group, where a claim on `mover`'s item must* show within two seconds while the page follows every repo on one stream.