Skip to content

fix: data-sources create uses text+chunk (not phantom content) + skill fact-check#159

Merged
yorkable merged 1 commit into
mainfrom
fix-datasource-create-and-skill-factcheck
Jun 12, 2026
Merged

fix: data-sources create uses text+chunk (not phantom content) + skill fact-check#159
yorkable merged 1 commit into
mainfrom
fix-datasource-create-and-skill-factcheck

Conversation

@yorkable

Copy link
Copy Markdown
Contributor

What

Fixes a real bug in data-sources create and corrects the usage skill after a fact-check against docs.syllable.ai and the embedded OpenAPI spec.

Data source bug (code)

  • Inline create built a body with a content field the API doesn't define and omitted the required text/chunk → it always 422'd. Now sends --text + chunk:false.
  • get/list tables read content/last_updated, but the API returns text/updated_at, so those columns were always blank. Fixed; get also shows chunk.
  • Added TestDataSourcesCreateWithFlags; updated the list/get stubs to the real field names.
  • Verified live on the cli-test org: inline create now succeeds, the detail view renders Text/Chunk/Updated At, and the old --content path reproduced the 422.

Skill (docs)

  • Professionalized the tone (removed "silently…"/"crashes internally"/dated forensic logs; reframed each entry as usage guidance).
  • Corrected the vars. variable-prefix guidance to match docs + the skill's own detailed reference: custom variables use the same bare key everywhere; vars. is only for system (vars.session.*) and auto-prefixed campaign variables.
  • Corrected greeting subject: rejected with a 422 on a greeting (confirmed live).
  • Synced AGENTS.md for the flag change.

Tests

gofmt, go vet, go build, and the full unit suite pass.

🤖 Generated with Claude Code

The inline `data-sources create` path built a request body with a `content`
field the API does not define, and omitted the required `text` and `chunk`
fields, so it always failed with a 422. Renamed the inline flag to `--text`,
send the required `chunk`, and fixed the `get`/`list` tables, which read
`content`/`last_updated` when the API returns `text`/`updated_at` (so those
columns were always blank). Added a create-body test. Verified live against
the cli-test org: inline create now succeeds and the detail view renders Text,
Chunk, and Updated At.

Also fact-checked the usage skill against docs.syllable.ai and the embedded
OpenAPI spec, professionalized the tone (removed the defect-log framing), and
corrected two skill claims:
- Variable vars. prefix: custom variables use the same bare key everywhere;
  vars. is reserved for system (vars.session.*) and auto-prefixed campaign
  variables. {{ vars.name }} resolves empty for a custom key named "name".
- Greeting subject: rejected with a 422 on a greeting (only valid on
  email_template), confirmed live; the spec's "ignored otherwise" is wrong.

Synced AGENTS.md for the data-source flag change.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@yorkable
yorkable merged commit cb7d796 into main Jun 12, 2026
1 check passed
@yorkable
yorkable deleted the fix-datasource-create-and-skill-factcheck branch June 12, 2026 06:40
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