Skip to content

fix(crm): a cleared value clears the copy, and the manifest fake takes a union's value - #3102

Merged
leemour merged 2 commits into
mainfrom
fix/crm-manifest-attio
Nov 17, 2026
Merged

leemour merged 2 commits into
mainfrom
fix/crm-manifest-attio

Conversation

@leemour

@leemour leemour commented Nov 17, 2026

Copy link
Copy Markdown
Member

Task

The Attio pilot (attio-cli, built only from wirecat.config.ts) runs crmSourceContract over crmManifestFixture. Every case failed, and a value cleared in Attio stayed in the store.

Why

  • FIND-2748. crmManifestFake wrote a mapped value (values.name.0.full_name) into a sample of the union's first branch. Attio's values are a oneOf of 17 types, so the row matched none, and the strict fake refused its own answer.
  • FIND-2760. at read values.job_title.0.value on [] as "not sent", so the stored position stayed.
  • FIND-2761. Attio's GET /v2/self answers 200 { "active": false } to an unknown, revoked or deleted token; the config had no way to say so.

What

  • The fake samples a row from the schema cut, path by path, to the branch each mapped path needs, through unions, lists, objects, open maps and allOf.
  • at: past the end of a list, or under a null the service sent, is null. Watch for: an each under such a null gives [], so links clear too. A path the answer does not have still gives no key.
  • auth.verify.active (type and strict schema) in @wirecat/cli-core/manifest; valueAt exported there. Nothing in cli-core reads active: the template's session seed does (the coordinator's agent is on it).

Reviewed by a fresh agent; its BUG-1 (a list the first sample already held kept the first branch) is fixed in the second commit, with a test.

Testing

  • vitest run src/crm src/manifest src/cli/service-api: 489 passed; lint, typecheck, docs:check clean.
  • Each new test fails with its code reverted (the fake: 11 tests; the map and verify tests: 1 each).
  • attio-cli on this branch plus cli-base chore: release 0.157.0 #642: 17 failing tests → 0; cli-dev ready verified everywhere but the live check.

Follow-up, not here: src/cli/service-api-manifest.ts keeps its own at for page tokens (DEBT-367).

🤖 Generated with Claude Code

leemour and others added 2 commits November 17, 2026 23:55
…s a union's value

- map: a path past the end of a list or under a null the service sent is null, not
  "not sent", so Attio's values.job_title.0.value on [] clears the stored position
- crmManifestFake builds a missing part of a mapped path from the union branch that has
  the rest of the path; it wrote into the first branch and its strict fake refused the row
- auth.verify.active names where the token check says the token works (Attio answers a
  dead token with 200 {"active": false}); valueAt is exported from cli-core/manifest

Found by the Attio pilot built from wirecat.config.ts (FIND-2748, FIND-2760, FIND-2761).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… path needs

The first fix narrowed only a list the fake built itself; a row whose first sample
already held the list (fixed value fields, an allOf) still carried the first branch.
narrowed now steps through objects, open maps and allOf, and rowOf samples from the
schema cut by every mapped path. A test covers fixed value fields and an each under null.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour merged commit 7974313 into main Nov 17, 2026
43 checks passed
@leemour
leemour deleted the fix/crm-manifest-attio branch November 17, 2026 23:38
leemour added a commit that referenced this pull request Nov 18, 2026
…in (#3106)

## Task

The single cli-core release (carrying #3102, #3103, #3104) pins cli-base
0.117.0, which has #642, #643 (Basic sign-in, which #3104 handles) and
#644 (the tracker nouns that let a tracker CLI pass `cli-dev lint`).

## What

cli-base 0.117.0, the peer floor raised to it, STANDARD.md regenerated.

## Testing

typecheck, docs:check, `src/tracker src/cli/service-api src/manifest`
locally; the rest in CI (the disk is nearly full).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant