Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3ddb671
Align Directory listing admission with current SDK
Aug 15, 2026
fd7a8e7
Complete Directory SDK contract alignment
Aug 18, 2026
026fad0
Harden Directory listing publication and admission
Aug 18, 2026
1d24aea
Serialize concurrent SQLite migrations
Aug 18, 2026
b2309db
Decouple listing acceptance from the demo gateway
Aug 18, 2026
da16ec7
Merge main into agent/sdk-listing-alignment
randomblocker Oct 13, 2026
d0f5da1
Fail closed on SDK-defined listing admission checks
randomblocker Oct 13, 2026
55bb0a3
Pin the native envelope-hash binding in listing confirmation
randomblocker Oct 13, 2026
f332290
Pin the Directory to dacs-sdk 3904d70
randomblocker Oct 13, 2026
fb5c0d0
Authorize listing signers by CF-3 ClaimReference identity
randomblocker Oct 13, 2026
a81f190
Merge main d1de29d into #85
randomblocker Oct 13, 2026
bde1ba4
Isolate Directory local verification state and SDK checkout
randomblocker Oct 13, 2026
c59f84b
Pin readiness migration and document historical anchor names
randomblocker Oct 13, 2026
29a4ca0
Keep Directory SDK installs in checkout-local Git storage
randomblocker Oct 13, 2026
766d042
Admit and publish current Listings exactly as the pinned SDK reads them
randomblocker Oct 14, 2026
5d0cd07
Never republish a listing as active while its revocation is unreadable
randomblocker Oct 14, 2026
0b61ec4
Scope the finality claim to browser publication and correct Directory…
randomblocker Oct 14, 2026
7a9efe5
Treat a storage not-found as indeterminate and pin revocation authori…
randomblocker Oct 15, 2026
5a05e67
Publish DACS-4 registry rail IDs and keep them in the catalog projection
randomblocker Oct 15, 2026
d21b68e
Match the pinned SDK on bundle hashing, bindings and Demos write reads
randomblocker Oct 15, 2026
d0da471
Verify the pinned SDK and Standard revisions during setup
randomblocker Oct 15, 2026
e0c33b4
Accept parameter-bearing revocation bindings in the well-known crawler
randomblocker Oct 15, 2026
ad5fd36
Pin the indexer's deal-evidence guards and seller labels
randomblocker Oct 15, 2026
bec26b6
Stop asserting a signature on the unsigned PA-1 rail table
randomblocker Oct 15, 2026
30b4d42
Report listing anchors as included, never final, from a pinned node
randomblocker Oct 15, 2026
e66e67e
Authenticate the packaged SDK build by its digest
randomblocker Oct 15, 2026
2b4531c
Build the SDK into an empty dist and fix the digest CLI path check
randomblocker Oct 15, 2026
f388b83
Run the listing-upgrade acceptance check from one shared reader setup
randomblocker Oct 15, 2026
25f4c58
Refuse unverified listing publication and pin the node everywhere
randomblocker Oct 15, 2026
3d38d25
Hold index-now to the node pin and record refused reindex runs
randomblocker Oct 15, 2026
b518af9
Pin the known-marker memory, the reputation hint and negotiation phases
randomblocker Oct 15, 2026
c935f07
Print the SDK digest when the app path is a symlink
randomblocker Oct 15, 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
82 changes: 63 additions & 19 deletions docs/codex-local-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ It uses the Node version and SDK revision already pinned by the repository.
`reference-implementations/dacs-directory/.nvmrc` and `package.json`.
- Do not copy `.env` files, tokens, wallets, seeds, `data/`, `node_modules/`, or
`vendor/` from another worktree.
- Keep any mutable catalog state under this worktree's
`reference-implementations/dacs-directory/data/` directory.
- Keep development catalog state under this worktree's
`reference-implementations/dacs-directory/data/` directory. Verification uses
a separate disposable directory, as shown below.
- Do not run the indexer or live/paid browser tests as part of local static and
unit verification. They are separate, networked activities.

Expand All @@ -37,24 +38,51 @@ reuse a clean vendor checkout in this worktree and install both dependency trees
from their lockfiles. The block runs in a subshell with `set -euo pipefail`, so
pasting it into an interactive shell stops at the first failure instead of
building whatever the SDK checkout happens to contain. It builds only after
`HEAD` is verified to be the pinned commit:
`HEAD` is verified to be the pinned commit. The object-store check uses
`git rev-parse --path-format=absolute`, which needs Git 2.31 or later; older Git
stops at that check:

```bash
(
set -euo pipefail
die() { echo "stopped: $*" >&2; exit 1; }

# Resolve all Git paths from the selected checkout, not the caller's shell.
unset GIT_DIR GIT_WORK_TREE GIT_COMMON_DIR GIT_INDEX_FILE GIT_SHALLOW_FILE
unset GIT_OBJECT_DIRECTORY GIT_ALTERNATE_OBJECT_DIRECTORIES

sdk_rev=$(sed -n 's/^SDK_REV="\([0-9a-f]\{40\}\)"$/\1/p' scripts/setup-sdk.sh)
[ "${#sdk_rev}" -eq 40 ] || die "no 40-hex SDK_REV found in scripts/setup-sdk.sh"

sdk=vendor/dacs-sdk
app_root=$(pwd -P)
sdk="$app_root/vendor/dacs-sdk"
# Reject redirected paths before cloning or changing any checkout.
[ ! -L "$app_root/vendor" ] || die "vendor must not be a symlink"
[ ! -L "$sdk" ] || die "$sdk must not be a symlink"
if [ ! -e "$sdk" ]; then
mkdir -p vendor
git clone --filter=blob:none https://github.com/DACS-Agent-commerce/dacs-sdk.git "$sdk"
fi

# An existing path must be its own Git checkout with no local changes.
[ "$(git -C "$sdk" rev-parse --show-toplevel)" = "$(cd "$sdk" && pwd -P)" ] \
# Require a standalone checkout here, not a linked worktree or shared store.
[ "$(cd "$sdk" && pwd -P)" = "$sdk" ] || die "$sdk resolves outside this worktree"
[ -d "$sdk/.git" ] && [ ! -L "$sdk/.git" ] \
|| die "$sdk needs a private .git directory; linked worktrees are not supported"
objects="$sdk/.git/objects"
[ -d "$objects" ] && [ ! -L "$objects" ] \
&& [ "$(cd "$objects" && pwd -P)" = "$objects" ] \
&& [ "$(git -C "$sdk" rev-parse --path-format=absolute --git-path objects)" = "$objects" ] \
|| die "$sdk needs its own local .git/objects directory"
object_links=$(find "$objects" -type l -print -quit) || die "cannot inspect $objects"
[ -z "$object_links" ] || die "$sdk has redirected object-store entries; use a standalone clone"
for alternate in alternates http-alternates; do
[ ! -e "$objects/info/$alternate" ] && [ ! -L "$objects/info/$alternate" ] \
|| die "$sdk shares an object store; use a standalone clone"
done
for metadata in shallow FETCH_HEAD; do
[ ! -L "$sdk/.git/$metadata" ] || die "$sdk/.git/$metadata must not be a symlink"
done
[ "$(git -C "$sdk" rev-parse --show-toplevel)" = "$sdk" ] \
|| die "$sdk is not a Git checkout of its own; inspect it, do not overwrite it"
[ -z "$(git -C "$sdk" status --porcelain)" ] \
|| die "$sdk has local changes; inspect them, do not overwrite them"
Expand All @@ -64,6 +92,9 @@ building whatever the SDK checkout happens to contain. It builds only after
[ "$(git -C "$sdk" rev-parse HEAD)" = "$sdk_rev" ] || die "$sdk is not at $sdk_rev"

(cd "$sdk" && npm ci --no-audit --no-fund && npm run build)
# scripts/setup-sdk.sh accepts a packaged dist only with this marker, and
# only when its bytes also hash to the pinned SDK_DIST_SHA256.
printf '%s' "$sdk_rev" > "$sdk/dist/.dacs-sdk-revision"
npm ci --no-audit --no-fund
)
```
Expand All @@ -74,34 +105,47 @@ continuing; do not run the checks below on a partial install. Access to the SDK
repository may require your normal GitHub authentication; do not put a token in
a remote URL or committed file.

The existing clone's `origin` is used for fetching, but its checked-out `HEAD`
must still match the exact SDK commit pinned by this repository.

## Run deterministic checks

These are the same check commands as the Directory CI's typecheck, test,
origin-validation, and production-build steps. The install differs: CI runs
`npm run setup` (`npm install`), while this workflow uses `npm ci`. Use the same
origin-validation, and production-build steps. CI's `npm run setup` and the
installation above both use `npm ci` for the SDK and app. Use the same
placeholder origins as the `env:` block of
`.github/workflows/dacs-directory-ci.yml` (today
`NEXT_PUBLIC_DIRECTORY_URL` and `NEXT_PUBLIC_BUTLER_ORIGIN`; drop any variable
the workflow no longer sets):

```bash
npm run typecheck
npm test
NEXT_PUBLIC_DIRECTORY_URL=https://directory.ci.local \
NEXT_PUBLIC_BUTLER_ORIGIN=https://agents.ci.local \
npm run check:deploy-config
NEXT_PUBLIC_DIRECTORY_URL=https://directory.ci.local \
NEXT_PUBLIC_BUTLER_ORIGIN=https://agents.ci.local \
npm run build
(
set -euo pipefail
verification_data=$(mktemp -d "${TMPDIR:-/tmp}/dacs-directory-checks.XXXXXX")
trap 'rm -rf -- "$verification_data"' EXIT
export DACS_DIRECTORY_DATA="$verification_data"

npm run typecheck
npm test
NEXT_PUBLIC_DIRECTORY_URL=https://directory.ci.local \
NEXT_PUBLIC_BUTLER_ORIGIN=https://agents.ci.local \
npm run check:deploy-config
NEXT_PUBLIC_DIRECTORY_URL=https://directory.ci.local \
NEXT_PUBLIC_BUTLER_ORIGIN=https://agents.ci.local \
npm run build
)
```

These commands do not require the indexer, a wallet, paid commerce, or a shared
runtime data directory. Browser checks are separate from this deterministic
verification set.
runtime data directory. Store imports and build-time migrations use the temporary
catalog, which is removed on success or failure. The subshell leaves the
development data path selected above intact. Browser checks are separate from
this deterministic verification set.

If interactive development is needed, first seed the worktree-local catalog the
way `npm run setup` does. The seed is only read when the SQLite catalog is first
created, so copy it before the first `next dev`:
created, so copy it before any development command that imports the store,
including the first `next dev`:

```bash
[ -f data/registrations.json ] || cp data/registrations.example.json data/registrations.json
Expand Down
Loading