Skip to content

Prompt for create-chkit example and refactor docs install snippets#130

Closed
KeKs0r wants to merge 8 commits into
mainfrom
marc/update-example-app-name
Closed

Prompt for create-chkit example and refactor docs install snippets#130
KeKs0r wants to merge 8 commits into
mainfrom
marc/update-example-app-name

Conversation

@KeKs0r
Copy link
Copy Markdown
Member

@KeKs0r KeKs0r commented May 26, 2026

Summary

  • create-chkit now prompts for the example to scaffold from a bundled examples/manifest.json instead of silently defaulting to clickbench. The manifest ships with the package via a copy-manifest.ts build step, and a new scripts/check-examples-manifest.ts CI guard keeps it in sync with the examples/ directory.
  • Replaced per-page Starlight <Tabs>/<TabItem> package-manager blocks across the getting-started docs with a new <PackagedCommand> component (plus a <Command> helper), and wired in a dev-only React integration with an Agentation footer for local doc authoring.
  • Added explicit sidebar.order to the schema docs (Overview → Refreshable Views → DSL Reference) and documented the new examples/ + manifest.json workflow in CLAUDE.md.

Test plan

  • bun verify passes locally
  • bun create chkit@latest prompts for example selection from the manifest
  • Docs build renders <PackagedCommand> snippets correctly on the getting-started pages

🤖 Generated with Claude Code

…dCommand

- create-chkit: drop the silent `clickbench` default; prompt from a
  bundled `examples/manifest.json` instead. Manifest is shipped with the
  package via a `copy-manifest.ts` build step, and a new
  `scripts/check-examples-manifest.ts` CI guard keeps it in sync with
  `examples/`.
- docs: replace per-page `<Tabs>`/`<TabItem>` package manager blocks
  with a new `<PackagedCommand>` component (and `<Command>` helper) for
  install/exec/create snippets. Adds React integration (dev-only) and a
  dev-only Agentation footer.
- docs: add `sidebar.order` to schema pages so they sort
  Overview → Refreshable Views → DSL Reference.
- CLAUDE.md: document the `examples/` + `manifest.json` workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Comment thread apps/docs/src/components/AgentationDev.tsx Fixed
Comment thread packages/create-chkit/src/examples.ts Fixed
KeKs0r and others added 7 commits May 26, 2026 15:54
Move the ObsessionDB plugin page out of /plugins and into a new
top-level /obsessiondb section (overview, getting-started, services,
engine-rewriting). Update cross-links from CLI, schema, and plugins
overview pages.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Switch the ClickBench data load from the public clickhouse-public-datasets
S3 bucket to the ObsessionDB-hosted mirror on Hetzner Object Storage
(fsn1.your-objectstorage.com/obsessiondb-datasets/clickbench/) so the
example doesn't depend on external infrastructure.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Add examples/clickbench to the root workspaces and switch its devDependencies
to workspace:* so it builds against the in-tree packages instead of the
published 0.1.0-beta.24 versions.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
When send_progress_in_http_headers=1, ClickHouse commits to a 200 status
before the query completes; query-time exceptions then surface only in the
x-clickhouse-exception-code response header. @clickhouse/client doesn't throw
on this, so chkit could record a failed INSERT as applied.

Inspect response_headers after every command/query/queryJson/insert and throw
a new ClickHouseStreamedException (carrying code, exceptionTag, query_id)
when a non-zero exception code is present.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Mark a migration operation as async via 'mode=async' on its '-- operation:'
header. When chkit migrate --apply encounters one it:

1. Derives a deterministic query_id from sha256(filename + ':' + statement_index).
2. Checks system.processes / system.query_log for any prior attempt with that id.
3. Submits the INSERT without blocking on its HTTP response, then polls
   queryStatus every 5s and prints written/elapsed progress.
4. On QueryFinish records the journal entry; on ExceptionWhileProcessing
   surfaces the server's exception; on a prior failure resubmits.

This unblocks long INSERTs through proxies with an HTTP duration ceiling and
makes transient client-side errors recoverable: a re-run attaches to the
in-flight query rather than starting over. Existing migrations without the
annotation continue to use the synchronous path.

Apply the new mode to the clickbench load_clickbench_data migration and add
a before-retry compensation that TRUNCATEs the target before any retry so
partial loads from a prior crash don't accumulate.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@KeKs0r
Copy link
Copy Markdown
Member Author

KeKs0r commented May 27, 2026

Superseded by the split PRs: #131 for create-chkit/docs, #132 for streamed ClickHouse exception handling, and #133 for async migration mode.

@KeKs0r KeKs0r closed this May 27, 2026
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.

2 participants