Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
db550ac
docs(model): add AD4M-MODEL-REFACTOR.md refactor plan
jhweir Feb 20, 2026
7eca5ac
Phase 1b: remove dead Prolog paths from Ad4mModel.ts and decorators.ts
jhweir Feb 21, 2026
d2b4c60
Phase 1c: delete Subject.ts, inline into PerspectiveProxy as local class
jhweir Feb 21, 2026
bd3a7b6
Phase 2: @Field, @HasMany, @HasOne, @BelongsToOne/Many, @Model; updat…
jhweir Feb 21, 2026
e820244
fix(model): hydration bug in queryToSurrealQL + phantom $perspective …
jhweir Feb 23, 2026
0330258
docs(refactor): add 6 architectural improvement issues to issue log
jhweir Feb 23, 2026
46e140e
feat(model): rename setCollection* -> set* public API
jhweir Feb 23, 2026
c56f7ba
docs(refactor): mark setCollection* rename as done
jhweir Feb 23, 2026
6bcb03a
refactor(model): Phase 2 complete — registry fns, BelongsToOne/Many/H…
jhweir Feb 23, 2026
8f94234
fix(model): @HasOne forward relation hydrates as scalar string not array
jhweir Feb 23, 2026
2f5eabc
refactor(model): rename collection* → relation* throughout stack
jhweir Feb 23, 2026
564f728
fix(model): unified save() with create/update routing + setProperty l…
jhweir Feb 23, 2026
b0a375d
docs(refactor): reframe test strategy — tests/js primary, we playgrou…
jhweir Feb 23, 2026
9ffd306
fix(model): @Flag SHACL wiring — flags immutable after creation
jhweir Feb 23, 2026
c568a69
refactor(model): Phase 3a — decompose Ad4mModel.ts into focused modules
jhweir Feb 23, 2026
eb2f4b4
refactor(model): Phase 3a cont — extract shared hydration.ts
jhweir Feb 23, 2026
7d44a4e
refactor(model): extract static query operations to query/operations.…
jhweir Feb 23, 2026
61da466
refactor(model): extract metadata helpers to schema/metadata.ts (Phas…
jhweir Feb 23, 2026
3a9f7e9
Prettier formatting
jhweir Feb 23, 2026
5711c26
refactor(model): remove redundant wrappers, rename getModelMetadataFo…
jhweir Feb 23, 2026
08ebb65
refactor(model): extract getData() to query/fetchInstance.ts (Phase 3…
jhweir Feb 23, 2026
a66d833
feat(model): Phase 3b — Transaction API
jhweir Feb 23, 2026
6dcc528
refactor(model): Phase 3c — extract mutation cluster + clean up unuse…
jhweir Feb 23, 2026
5098d03
feat(model): Phase 3f — include API for explicit eager loading
jhweir Feb 23, 2026
6d02ad2
feat(model): replace include array with Prisma-style IncludeMap
jhweir Feb 23, 2026
aee947e
docs(model): update refactor plan through Phase 3c
jhweir Feb 23, 2026
834b615
feat(model): Phase 3d — link-listener subscription API
jhweir Feb 23, 2026
9925e7f
refactor(model): remove has_child and source scoping mechanism
jhweir Feb 23, 2026
e1ff134
refactor(model): remove deprecated Query.relations field and .relatio…
jhweir Feb 23, 2026
ae6d0a9
feat(model): Phase 4b — model inheritance with SHACL sh:node
jhweir Feb 23, 2026
489b6b6
feat(model): implement ad4m-model playground test scenarios 01-10
jhweir Feb 23, 2026
7bdca92
feat(model): add Ad4mModel.register(perspective) static method
jhweir Feb 23, 2026
bc35d6a
feat(model): add Ad4mModel.create() factory; fix subscription Surreal…
jhweir Feb 23, 2026
975b920
fix(executor): write SurrealDB before firing pubsub events in commit_…
jhweir Feb 23, 2026
6d43603
fix(model): silence spurious console noise from innerUpdate and trans…
jhweir Feb 23, 2026
c1a5a43
refactor(model): remove baseExpression, use id throughout Ad4mModel l…
jhweir Feb 23, 2026
5bce1c0
refactor(model): inline getData() private wrapper into get()
jhweir Feb 23, 2026
43edaec
docs(model): trim JSDoc verbosity, add model/README.md
jhweir Feb 23, 2026
9e5e1e5
docs(model): trim redundant JSDoc in transaction.ts and types.ts
jhweir Feb 23, 2026
6dc54b1
refactor(model): logic fixes, dead code removal, shared subscription …
jhweir Feb 24, 2026
1d32094
refactor(model): drop run() alias, fix stableFingerprint to use id
jhweir Feb 24, 2026
9c6c57c
merge: pull in origin/dev (SHACL/Prolog migration PR #654)
jhweir Feb 24, 2026
b21f846
docs(model): update refactor plan to current state (2026-02-24)
jhweir Feb 24, 2026
644e789
docs: Phase G deprecation plan + SUBSCRIPTION_STRATEGY.md
jhweir Feb 24, 2026
89c3a74
test: rebuild tests/js infrastructure with model/ test suite and fix …
jhweir Feb 24, 2026
c5e9776
test: fix model test failures — re-register SHACL after wipe, resolve…
jhweir Feb 24, 2026
d888c8e
feat(tests): add BelongsToMany hydration test + model-prolog.test.ts …
jhweir Feb 24, 2026
16c33e1
feat(tests/model): add WhereOps, rollback, createdAt/get(include) tes…
jhweir Feb 24, 2026
7912d6e
refactor(tests): rename prolog-and-literals → sdna.test.ts, drop dupl…
jhweir Feb 24, 2026
707b992
test: restructure JS test suite — model suite, SDNA cleanup, dynamic …
jhweir Feb 24, 2026
faa0677
test: reorganise test suite into subfolders
jhweir Feb 24, 2026
c5fe73d
Split multi-user-simple.test.ts into 8 focused test files
jhweir Feb 24, 2026
1e9a59f
Fix TS errors across test files
jhweir Feb 24, 2026
68828e2
refactor(tests): centralise global.fetch polyfill into tests/setup.ts
jhweir Feb 24, 2026
8e1c341
refactor(tests): migrate auth/multi-user tests to startAgent helper
jhweir Feb 24, 2026
ec0830e
refactor(tests): combine auth scripts; fold test-from-json-schema int…
jhweir Feb 24, 2026
0bf4062
refactor(tests): rename test-main → test, test-all → test-run
jhweir Feb 24, 2026
13001ed
refactor(tests): remove test-main/test-all alias scripts
jhweir Feb 24, 2026
26749d1
refactor(tests): rename test-run → test:ci across the monorepo
jhweir Feb 24, 2026
7cd8cd7
refactor(tests): apply consistent file and script naming across auth …
jhweir Feb 24, 2026
f33d6ff
feat(tests): add mochawesome HTML reports (task 6)
jhweir Feb 24, 2026
aa02028
refactor(tests): tasks 7 & 8 — script ordering and integration suite …
jhweir Feb 24, 2026
ffc0903
revert(tests): remove mochawesome — using VS Code Test Explorer instead
jhweir Feb 24, 2026
e75cb64
fix(tests): fix test runner setup and process lifecycle
jhweir Feb 25, 2026
6efc011
refactor(model): remove isInstance, prologCondition, and where.condition
jhweir Feb 25, 2026
aa0c3eb
fix(model): support flagless models; restructure getter tests
jhweir Feb 25, 2026
792ff12
fix(tests): fix multi-user test suite — auth flow, error strings, URI…
jhweir Feb 25, 2026
b688ac7
fix(tests): fix WebSocket teardown errors and batch SetSingleTarget d…
jhweir Feb 25, 2026
1e65f8d
fix(tests): DRY scripts, fix integration paths/assertions, clean up d…
jhweir Feb 25, 2026
034eb71
Cargo fmt
jhweir Feb 25, 2026
f9e8abe
chore(tests): promote --require tests/setup.ts into .mocharc-cli.json
jhweir Feb 25, 2026
baa62f8
fix(model): guard literal:// parsing in resolveValue to resolveLangua…
jhweir Feb 25, 2026
9d8e18c
feat(model): auto-derive @Property initial placeholder; remove manual…
jhweir Feb 25, 2026
91036f3
Make resolveLanguage: "literal" the implicit default
jhweir Feb 26, 2026
7792146
rename writable → readOnly throughout model/SHACL/Rust stack
jhweir Feb 26, 2026
c73d0e9
fix: tests green — Literal boolean/zero, safer-buffer CJS patch, stal…
jhweir Feb 26, 2026
324e308
refactor(core): improve Ad4mModel.test.ts quality and remove anti-pat…
jhweir Feb 26, 2026
1774b1f
fix(rust-executor): create agent data directory on init to prevent sa…
jhweir Feb 26, 2026
be25aa7
refactor(model): Phase 3e — remove server-push SurrealDB subscription…
jhweir Feb 26, 2026
e9d9599
Cargo fmt
jhweir Feb 26, 2026
3b28582
Merge remote-tracking branch 'origin/dev' into ad4m-model-refactor
jhweir Feb 26, 2026
9cf3e80
docs(model): fix method names in README — .get() not .run(), .live() …
jhweir Feb 26, 2026
2681203
docs(PR): add Phase 3e, literal-guard merge note, and README corrections
jhweir Feb 26, 2026
444e14c
docs(subscriptions): add MCP/AI agent compatibility section
jhweir Feb 26, 2026
679a6df
fix(tests): remove unsupported --serial flag from ts-mocha scripts
jhweir Feb 26, 2026
51b5964
fix(tests): retry with backoff in injectPublishingAgent.js
jhweir Feb 26, 2026
13a582c
fix(neighbourhood): use block-body arrow in dispatchSignal forEach
jhweir Feb 26, 2026
e9714f4
fix(neighbourhood): track and dispose Apollo signal subscriptions on …
jhweir Feb 26, 2026
d609cc8
docs(PR): fix typo — string::starts_with not string::starts::with
jhweir Feb 26, 2026
e7e4757
docs(PR): fix spelling — Centralized not Centralised
jhweir Feb 26, 2026
3180cfe
fix(tests): clear and unref fallback SIGKILL timer in AgentHandle.stop()
jhweir Feb 26, 2026
a3a4fd1
fix(tests): guard emailTestModeDisable in after() so waitForExit alwa…
jhweir Feb 26, 2026
f9ae7f5
docs(tests): align TEST-REORGANISATION.md H1 with filename
jhweir Feb 26, 2026
e78affa
docs(tests): capitalise We app name in TEST-REORGANISATION.md
jhweir Feb 26, 2026
ad1a769
docs(model): update AD4M-MODEL-REFACTOR.md plan doc
jhweir Feb 26, 2026
e7effda
fix(tests): trap EXIT to guarantee cleanup after last suite or on fai…
jhweir Feb 26, 2026
514c913
fix(model): throw early in relation decorators when through predicate…
jhweir Feb 26, 2026
506d684
fix(model): use normalizeTimestamp for numeric min/max comparison in …
jhweir Feb 26, 2026
1e72528
fix(model): fold not/between into allMet chain in matchesCondition so…
jhweir Feb 26, 2026
46cf594
fix(rust): alias collectionSetter for RelationSetter enum variant for…
jhweir Feb 26, 2026
40a036c
fix(core): throw on unsupported literal type in Literal.toUrl() inste…
jhweir Feb 26, 2026
4029775
fix(core): strict boolean parsing in Literal.get() — reject non-true/…
jhweir Feb 26, 2026
e224790
docs(model): remove duplicate rows from IMPROVEMENTS.md priority table
jhweir Feb 26, 2026
c00abfc
fix(tests): regenerate bootstrapSeed.json + feat(model): nested inclu…
jhweir Feb 26, 2026
9d128ed
merge(dev): merge origin/dev — concurrent-CI-safe process cleanup
jhweir Feb 26, 2026
09d5353
docs(model): consolidate planning docs into IMPROVEMENTS.md
jhweir Feb 26, 2026
3802024
chore(core): clean up tests and tooling
jhweir Feb 26, 2026
f7fca20
fix(executor): patch bundle.js buffer require() calls for Deno ESM co…
jhweir Feb 27, 2026
e61d176
PR.md removed
jhweir Feb 27, 2026
fccdea9
Merge remote-tracking branch 'origin/dev' into ad4m-model-refactor
jhweir Feb 27, 2026
01c6b35
fix: suppress WS 1006 teardown noise and stabilise BelongsToMany CI test
jhweir Feb 27, 2026
c48e181
test: double p2p sync retry limits and bump integration suite timeout
jhweir Feb 27, 2026
0ab9ab7
refactor(ad4m-hooks): slim to useModel-only, drop legacy helpers
jhweir Feb 27, 2026
d82516f
test: fix triple-agent DHT sync flakiness — pre-sleep, slower retry, …
jhweir Feb 27, 2026
4825bd7
test: ensure Alice/Bob in sync before phase-3 writes; fix aliceLinks …
jhweir Feb 27, 2026
94c7d37
ci: fix stale script names in CircleCI config
jhweir Feb 27, 2026
fe33af5
test: bump multi-user before-hook timeouts 120s -> 300s
jhweir Feb 27, 2026
f6a28ab
fix(tests): lazy-load PUBLISHING_AGENT in runtime.suite.ts
jhweir Feb 27, 2026
5a3b150
fix: use TypeScript private instead of JS # fields in Ad4mModel for V…
jhweir Feb 27, 2026
de0830f
fix(ci): run prepare-test before multi-user suites; bump timeout to 60m
jhweir Feb 27, 2026
342e2e6
fix: suppress WebSocket 1006 close errors in subscription handlers; f…
jhweir Feb 27, 2026
8546b85
test(integration): increase retries and sleep for triple-agent DHT sy…
jhweir Feb 27, 2026
529cab3
refactor(model): add instanceToSerializable helper and use in stableF…
jhweir Feb 27, 2026
e15d8fa
fix(tests): reset bootstrap seed cleanly before each prepare-test run
jhweir Feb 28, 2026
206fbc5
fix(ci): add prepare-test step to integration-tests-js job
jhweir Feb 28, 2026
86ab057
fix(ci): isolate setup port ranges per concurrent job + waitForPortFree
jhweir Feb 28, 2026
e0b8b1e
refactor(model): remove deprecated update() method from Ad4mModel
jhweir Feb 28, 2026
0776265
fix(tests): add process-level unhandledRejection guard for 1006 close…
jhweir Feb 28, 2026
278e05c
docs: add ORM architecture improvement plans
jhweir Feb 28, 2026
578ff1d
feat: dirty tracking, properties projection fixes, and comprehensive …
jhweir Feb 28, 2026
66ddc5a
fix(test): update properties-filter unit test to match current strip-…
jhweir Feb 28, 2026
dc842ee
feat(model): support where-filtering on relation fields + multi-field…
jhweir Feb 28, 2026
9ed5d92
ci: rename jobs for clarity and remove duplicate email-verification job
jhweir Feb 28, 2026
78a0c91
feat(hooks,model): replace useModel with useLive; add linkedFrom quer…
jhweir Feb 28, 2026
cd3897f
fix(hooks,model): guard useLive against undefined parent.id; remove d…
jhweir Feb 28, 2026
cff5515
feat(model): add parent option to create(), auto-cleanup on delete()
jhweir Feb 28, 2026
7084c59
feat(model): add parent query, refactor useLive signature, add integr…
jhweir Feb 28, 2026
6208473
refactor(hooks): rename useLive -> useLiveQuery in React and Vue hooks
jhweir Feb 28, 2026
f6a6ad9
fix(hooks): expand ParentScope to union supporting raw predicate form
jhweir Feb 28, 2026
95952cf
feat(model): add batchId support to Ad4mModel.create()
jhweir Mar 1, 2026
5e6058d
feat(model): add static update() and delete() convenience methods
jhweir Mar 1, 2026
b38b35d
Merge remote-tracking branch 'origin/dev' into ad4m-model-refactor
jhweir Mar 4, 2026
7e86b74
fix: update turbo to v2 to match turbo.json tasks format
jhweir Mar 4, 2026
40b1230
chore: sync deno.lock with turbo v2 pin
jhweir Mar 4, 2026
485197e
fix: switch agent context for managed users in expression_create
jhweir Mar 4, 2026
aac2d4e
Revert "fix: switch agent context for managed users in expression_cre…
jhweir Mar 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 38 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ commands:
name: Build bootstrap languages
command: pnpm run build-languages


jobs:
build-and-test:
build:
machine: true
resource_class: coasys/marvin
steps:
Expand Down Expand Up @@ -99,44 +98,59 @@ jobs:
command: pnpm test
no_output_timeout: 30m

integration-tests-js:
integration-tests-core:
machine: true
resource_class: coasys/marvin
environment:
# Unique port range for this job's setup executor so it never conflicts
# with integration-tests-multi-user running concurrently on the
# same self-hosted runner (both jobs run after build in parallel).
AD4M_SETUP_GQL_PORT: "15700"
AD4M_SETUP_HC_ADMIN_PORT: "15701"
AD4M_SETUP_HC_APP_PORT: "15702"
steps:
- setup_integration_test_environment
- run:
name: Kill any orphaned executors from previous runs
command: |
# Self-hosted runners reuse workdirs; previous job may have left
# an executor alive (exec() shell-wrap means kill() only kills
# the shell, not the executor grandchild). Clear ports before test.
# the shell, not the executor grandchild). Clear our port range.
for port in 15700 15701 15702; do
lsof -ti:$port | xargs -r kill -9 2>/dev/null || true
lsof -ti:$port -s TCP:LISTEN | xargs -r kill -9 2>/dev/null || true
done
sleep 1
- run:
name: Prepare test environment
command: cd ./tests/js && pnpm run prepare-test
no_output_timeout: 20m
- run:
name: Run integration tests
command: cd ./tests/js && pnpm run test-main
command: cd ./tests/js && pnpm run test:ci
no_output_timeout: 30m

integration-tests-multi-user-simple:
integration-tests-multi-user:
machine: true
resource_class: coasys/marvin
environment:
# Unique port range for this job's setup executor — offset by 10 from
# integration-tests-core to prevent conflicts when both jobs run in parallel.
AD4M_SETUP_GQL_PORT: "15710"
AD4M_SETUP_HC_ADMIN_PORT: "15711"
AD4M_SETUP_HC_APP_PORT: "15712"
steps:
- setup_integration_test_environment
- run:
name: Run multi-user-simple integration tests
command: cd ./tests/js && ./test-multi-user-with-setup.sh
no_output_timeout: 30m

integration-tests-email-verification:
machine: true
resource_class: coasys/marvin
steps:
- setup_integration_test_environment
name: Kill any orphaned executors from previous runs
command: |
for port in 15710 15711 15712; do
lsof -ti:$port -s TCP:LISTEN | xargs -r kill -9 2>/dev/null || true
done
sleep 1
- run:
name: Run email-verification integration tests
command: cd ./tests/js && ./email-verification-test-with-setup.sh
no_output_timeout: 30m
name: Run multi-user integration tests
command: cd ./tests/js && pnpm run test-multi-user
no_output_timeout: 60m

integration-tests-cli:
machine: true
Expand Down Expand Up @@ -164,13 +178,10 @@ workflows:
version: 2
build-and-test:
jobs:
- build-and-test
- integration-tests-js:
requires:
- build-and-test
- integration-tests-multi-user-simple:
- build
- integration-tests-core:
requires:
- build-and-test
- integration-tests-email-verification:
- build
- integration-tests-multi-user:
requires:
- build-and-test
- build
8 changes: 0 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -437,14 +437,6 @@ jobs:
tag: ${{ env.NPM_TAG }}
access: public

- name: Publish ad4m hook helpers
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.COASYS_NPM_TOKEN }}
package: ad4m-hooks/helpers/package.json
tag: ${{ env.NPM_TAG }}
access: public

- name: Publish ad4m react hooks
uses: JS-DevTools/npm-publish@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ jobs:
TAG="${{ env.NPM_TAG }}"
echo "Publishing with tag: $TAG"
FAILED=0
for PKG in core connect ad4m-hooks/helpers ad4m-hooks/react ad4m-hooks/vue executor test-runner; do
for PKG in core connect ad4m-hooks/react ad4m-hooks/vue test-runner; do
echo "=== Publishing $PKG ==="
set +e
OUTPUT=$(cd "$PKG" && npm publish --access public --tag "$TAG" --registry https://registry.npmjs.org 2>&1)
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading