Repository navigation
CI gate, mock-proxy fixture registry and lane topology fixes (#43) - #48
Merged
Merged
Conversation
dorny/paths-filter has no pull_request context on a manual dispatch, so if it came back empty every job skipped and `CI` reported success on a run that tested nothing. Treat every non-pull_request event like merge_group: skip the filter and force the full matrix. Applies to ci.yml, devonian-ci.yml, syncables-ci.yml and reflector-ci.yml. Refs #43 (section 2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mock dispatched on `platform` through an `if` chain with pets inline, and ignored the MOCK_PROXY_PLATFORMS run-lane.mjs already passes, so every lane's proxy served the full built-in set. Each platform is now one integrations/localthought/fixtures/<id>/ scenario.mjs (the old mock-github/-calendar/-clockify modules, moved; pets extracted), registered in fixtures/index.mjs. mock-proxy.mjs keeps only the protocol: PKCE, /connect, redemption, code rotation. MOCK_PROXY_PLATFORMS now restricts /catalog, /catalog/<id>.*, /connect and /proxy to the listed platforms. Unset or empty still serves every fixture, so atomic-server's e2e-server.sh and dagger (which never set it) are unchanged. Platforms with no fixture yet (todoist, moneybird, notion) are logged and skipped. server.github/.calendar/.clockify stay as aliases. Fixtures live under localthought/, not tooling/ as PARALLEL_LANES §4 proposed, because upstream dagger copies only that directory. Old and new proxies give identical responses to a 32-request script exercising all four platforms. Refs #43 (section 3a). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since #38 the SPA loads from atomic-server directly (FRONTEND_URL in run-lane.mjs and ci.yml's plugin-system job), but serve.mjs still told the mock proxy the frontend was the dev-server. The mock rejects any /connect whose redirect_uri has another origin, so pets.spec.ts's consent step would 400 once the Integrations-card click (#43 section 1a) stops failing first. Also drops the dev-server's DEV_SERVER_UPSTREAM, which nothing reads since the proxy was deleted, and corrects ci.yml comments that still described the dev-server as a proxy. Not verified end to end: the e2e tier needs a full atomic-server checkout and binary. Refs #43. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the fixture registry, an empty MOCK_PROXY_PLATFORMS means "every fixture" (so atomic-server's scripts, which never set it, keep working). That made a lane declaring `platforms: []` get a mock serving everything. bringUp now distinguishes the two: `platforms` omitted (the shared, non-lane stack) starts the mock with every fixture; an empty list starts no mock at all. Refs #43, #47. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Everything specific to one plugin lives in integrations/<plugin>/, so plugins can be developed in parallel and a fixture change triggers only its own lane: pets/fixtures/pets/ (scenario.mjs, document.json) timesheets/fixtures/clockify/ issue-tracker/fixtures/github-issues/ calendar/fixtures/google-calendar/ Only the registry, localthought/fixtures/index.mjs, stays shared; it imports each fixture by relative path. No plugin's tsconfig or vitest include picks up fixtures/. The 32-request parity script still gives responses identical to the original mock. Caveat, recorded in PARALLEL_LANES.md: atomic-server's dagger e2e copies only integrations/localthought/ into its container, so it must copy all of integrations/ once it takes this layout. Refs #43. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every e2e job (pets, notion, generic plugin system; timesheets locally) hung on "Setting up dev drive…" and timed out in `waitForURL`. The page's ClientDb loads /wasm/atomic_wasm.js at startup; CI run 35742352282 logs `Failed to fetch dynamically imported module: .../wasm/atomic_wasm.js?v=dev` (`?v=dev` is vite's "no bundle built" marker), and atomic-server answers that path with its HTML fallback. SKIP_WASM_BUILD=1 was copied from atomic-server's downstream-saas job, which never runs the dist in a browser. Its dagger e2e pipeline sets the same variable but only after building the bundle separately into public/wasm/ (wasmBuild() + jsBuild()). Do the same here: install wasm-pack with atomic-server's pinned, checksum-verified installer, add wasm32-unknown-unknown to the pinned toolchain, and build with --no-opt so no binaryen download is needed (the flakiness the skip originally avoided). Not yet verified: the first CI run with this change is the test. Refs #43, #44. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It imported describeIntegration/fetchIntegration from wasm/pkg, which atomic-server #1618 removed (and which 3640748 already dropped from browser.ts here), so it could only fail at import. Nothing ran it; the README and a ci.yml comment still mentioned it. Refs #43. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 23, 2026
…ep Playwright traces Two CI health fixes from PR #48's first run: - notion's e2e tier failed with "Failed to create redb …: Database already open. Cannot acquire lock": stop() only sent signals, so the e2e tier's atomic-server started on the same .lane-store/notion before the live tier's had exited. stop() now resolves once every child has exited (SIGKILL after 10s). Between tiers run-lane.mjs awaits it via stopStack(), which also stops releasing the lane lock mid-run; only process exit calls cleanup() now. - The lane jobs uploaded atomic-plugins/browser/e2e/playwright-report, but integrations/tooling/playwright.config.ts writes its report and test-results/ next to itself, so failing runs uploaded nothing (if-no-files-found: ignore). Set outputDir explicitly, upload both directories from integrations/tooling/ (and test-results/ for the plugin-system job too), and warn instead of ignoring a miss. Refs #43. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 23, 2026
Contributor
Author
|
merging this because other processes are waiting for it |
michielbdejong
enabled auto-merge
September 23, 2026 08:44
michielbdejong
disabled auto-merge
September 23, 2026 09:15
michielbdejong
pushed a commit
that referenced
this pull request
Sep 23, 2026
Issue #45. No behaviour change; lanes.json note and PARALLEL_LANES.md "Still open" only. - Tiers stay []: shared-checks runs certify.mjs --layer js on every integrations/** change, and that already runs exactly the tsc and vitest a typecheck/unit tier would, plus bundle reproducibility. A tier waits for a server-dependent money test, as the issue says. - moneybird is named by the lane but consumed by nothing in this repo: integrations/money/ is an MT940/camt.053 uploader, and the moneybird catalog entry is package-less (read by atomic-server's generic API-plugin path). A recorded fixture would have no in-repo adapter to validate it against and no tier that starts a mock proxy to serve it; recording also needs a Moneybird account. Not hand-written, per §4. - A future Moneybird fixture and recorder go in integrations/money/fixtures/moneybird/, not integrations/localthought/fixtures/: plugin-specific files stay in the plugin's folder; the shared registry (PR #48) imports it as ../../money/fixtures/moneybird/scenario.mjs. The PARALLEL_LANES.md hunk keeps the bullet's last line unchanged so it merges cleanly with PR #48, which rewrites the next bullet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michielbdejong
pushed a commit
that referenced
this pull request
Sep 23, 2026
…check Everything for the todoist mock-proxy fixture up to the part that needs a live Todoist account. It builds on PR #48's fixture registry and lives in the issue-tracker plugin folder, whose lane names todoist (strict plugin folder containment). - issue-tracker/fixtures/todoist/record.mjs fetches the catalog document from the real proxy (public, no token needed). With TODOIST_TOKEN set, it also records /api/v1/projects and /api/v1/tasks as paged, redacted api/GET__api__v1__<collection>__page-<n>.json files. The redaction list is exported as REDACTIONS and documented in the file header. It fails closed: any string field it does not know is replaced and listed in api/meta.json. Output is formatted with the repo's oxfmt. - document.yaml was recorded here from https://localthought.io/catalog/todoist.yaml on 2026-09-23 (oxfmt only re-indented YAML lists). - scenario.mjs implements the fixtures/index.mjs interface. It replays api/ by cursor, reads by id from the recorded rows, and returns 403 on writes, like the real data:read catalog. - issue-tracker/todoist-fixture.test.ts runs in the issue-tracker unit tier. It checks the recorder's redaction on every run. Once api/ exists, it also checks that every field localthought/todoist.ts reads is present and typed, runs the rows through todoistProjection, replays pagination, and asserts the fixture is registered. Not done: api/ is not recorded, because there were no Todoist credentials. todoist is also not registered in localthought/fixtures/index.mjs (PR #48's file), since an unrecorded fixture must not be served. The command and the follow-up edits (index.mjs import from ../../issue-tracker/..., and mock-proxy.test.mjs) are in record.mjs's header. Refs #46. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michielbdejong
pushed a commit
that referenced
this pull request
Sep 23, 2026
…ion (#48) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Addresses the repo-setup parts of #43. Reflector (§4a) and connection-code rotation (§4c) are deliberately out of scope; §4c's points went onto #40.
Changes
§2:
workflow_dispatchcould report a false green (edf9ef5)ci.yml,devonian-ci.yml,syncables-ci.ymlandreflector-ci.ymlnow rundorny/paths-filteronly onpull_request. Every other event forces the full matrix, asmerge_groupalready did, so a manual dispatch can no longer skip every job and passCI. Thereflector-ci.ymlchange is only this gate fix; no reflector code is touched.§3a: per-platform mock fixtures (
1785847,0185511,ea16056)mock-proxy.mjsis now a generic host. It keeps the protocol (PKCE,/connect, redemption, code rotation).integrations/<plugin>/fixtures/<platform>/scenario.mjs:pets/fixtures/pets/,timesheets/fixtures/clockify/,issue-tracker/fixtures/github-issues/,calendar/fixtures/google-calendar/. Only the registry,integrations/localthought/fixtures/index.mjs, is shared.MOCK_PROXY_PLATFORMSis now honoured: it restricts/catalog,/catalog/<id>.*,/connectand/proxy.e2e-server.shis unaffected. Platforms without a fixture are logged and skipped.serve.mjsstarts no mock for a lane whoseplatformsis[]. The shared stack, which passes no list, gets every fixture.server.github,server.calendarandserver.clockifyremain as aliases for upstream specs.integrations/localthought/, so it has to mount all ofintegrations/once it takes this layout. That's dagger e2e: mount all of integrations/ for the mock proxy atomic-server#1639.PARALLEL_LANES.md§4 records this and what's still not started: recordings,record.mjs,fixture.test.mjs, and the drift guard.Lane topology bug (
1e3bd13)Since #38 the SPA loads from atomic-server directly (
FRONTEND_URL), butserve.mjsstill setMOCK_FRONTEND_ORIGINto the dev-server. The mock rejects/connectcallbacks from any other origin, sopets.spec.ts's consent step would 400 once the §1a click failure stops masking it. This commit fixes that, drops the unusedDEV_SERVER_UPSTREAM, and correctsci.ymlcomments that still called the dev-server a proxy.CI health, found on this PR's first run (
1cd87c9,3cc511e,c45f894)SKIP_WASM_BUILD=1skipped the browser bundle thatClientDbloads from/wasm/atomic_wasm.js. The build job now builds it separately, as atomic-server's dagger pipeline does, with the pinnedwasm-packinstaller and--no-opt. Verified on run 35836765219: the step succeeds and pets gets past sign-in.Database already open. Cannot acquire lock.stop()now waits for every process to exit, and the lane lock is no longer released between tiers.integrations/tooling/{playwright-report,test-results}.localthought/wasm-smoke.mjs, which imported WASM exports that atomic-server #1618 removed.Verification
node --test integrations/tooling/*.test.mjs integrations/localthought/mock-proxy.test.mjs: 32 pass, 1 fail. The failure iscertify.test.mjs"bundles are reproducible…", which needsbrowser/node_modules/.bin/esbuildfrom a full atomic-server checkout and can't run standalone.mainhas never run green, so read red here as "not yet verified" first.Known red after this PR
Lane: pets (e2e)now gets past sign-in, and on its first attempt past the §1a click, then fails waiting for "Install and connect". At the pinned atomic-server, the setup dialog needsBrowserIntegrations.describe(), which no longer exists on either side. Decision: move to reflector, tracked in Move LocalThought setup/sync onto reflector (pets e2e is blocked until then) #52. This lane stays red until then.Elsewhere
feat/plugin-debugis a mitigation, not a confirmed fix. The refetch loop didn't reproduce locally.🤖 Generated with Claude Code