Skip to content

Bootstrap embedded docs#677

Merged
peter-leonov-ch merged 16 commits into
mainfrom
bootstrap_embedded_docs
Apr 21, 2026
Merged

Bootstrap embedded docs#677
peter-leonov-ch merged 16 commits into
mainfrom
bootstrap_embedded_docs

Conversation

@peter-leonov-ch

Copy link
Copy Markdown
Collaborator

Summary

A short description of the changes with a link to an open issue.

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

Copilot AI review requested due to automatic review settings April 21, 2026 16:04
@codecov

codecov Bot commented Apr 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/client-node/src/connection/socket_pool.ts 0.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the short keep-alive troubleshooting URL in Node client warning logs with a permanent GitHub docs link, and adds new embedded documentation pages describing keep-alive ECONNRESET/socket hang-up scenarios.

Changes:

  • Update keep-alive mismatch warning link from c.house short URL to docs/howto/keep_alive_timeout.md.
  • Add embedded docs pages for keep-alive timeout troubleshooting and general socket hang-up/ECONNRESET guidance.
  • Update integration test and changelog example to match the new link.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/client-node/src/connection/socket_pool.ts Updates warning log message to point at the new embedded keep-alive timeout doc.
packages/client-node/tests/integration/node_keep_alive_header.test.ts Adjusts log matching in tests to the new doc link.
docs/socket_hang_up_econnreset.md Adds general troubleshooting guide for socket hang up / ECONNRESET.
docs/howto/keep_alive_timeout.md Adds focused guide explaining keep-alive timeout mismatch and how to debug/fix it.
CHANGELOG.md Updates example warning log message URL.
AGENTS.md Adds guidance for agents on logging guard checks and linking to embedded docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/howto/keep_alive_timeout.md Outdated
Comment thread docs/howto/keep_alive_timeout.md Outdated
Comment thread docs/socket_hang_up_econnreset.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread docs/howto/keep_alive_timeout.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 21, 2026 16:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Node client keep-alive troubleshooting guidance by replacing the shortlink previously used in keep-alive/ECONNRESET warning logs with repository-hosted documentation, and adds new embedded docs pages to support these user-facing suggestions.

Changes:

  • Updated keep-alive warning log message (and its tests + changelog example) to link to docs/howto/keep_alive_timeout.md.
  • Added embedded troubleshooting docs under docs/ (including a dedicated keep-alive timeout how-to).
  • Updated AGENTS.md recommendations to codify logging + “link to docs page” guidance.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/client-node/src/connection/socket_pool.ts Updates WARN log message URL for keep-alive timeout mismatch guidance.
packages/client-node/tests/integration/node_keep_alive_header.test.ts Adjusts integration test assertions to match the updated URL; minor whitespace cleanup.
docs/socket_hang_up_econnreset.md Adds a general troubleshooting page for socket hang up / ECONNRESET.
docs/howto/keep_alive_timeout.md Adds a focused how-to explaining keep-alive idle TTL vs server timeout behavior.
CHANGELOG.md Updates example log output to reflect the new documentation URL.
AGENTS.md Adds explicit guidance for eager log-level guards and linking logs to embedded docs pages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/client-node/src/connection/socket_pool.ts
Comment thread CHANGELOG.md
Comment thread docs/howto/keep_alive_timeout.md Outdated
Comment thread docs/socket_hang_up_econnreset.md Outdated
Copilot AI review requested due to automatic review settings April 21, 2026 16:17
peter-leonov-ch and others added 3 commits April 21, 2026 18:18
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the shortlink used in keep-alive/ECONNRESET warning logs with a GitHub-hosted docs link, and bootstraps new embedded troubleshooting documentation pages in-repo.

Changes:

  • Update keep-alive warning log URL (and related tests / changelog example) to point at docs/howto/keep_alive_timeout.md.
  • Add new troubleshooting docs pages for keep-alive timeout mismatch and generic socket hang up / ECONNRESET.
  • Update SocketPool to use a runtime http import and an instanceof Http.Agent guard before iterating freeSockets.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/client-node/src/connection/socket_pool.ts Updates agent guard logic and warning log link.
packages/client-node/tests/integration/node_keep_alive_header.test.ts Adjusts test expectations to match the new docs URL.
docs/socket_hang_up_econnreset.md Adds a new troubleshooting guide for socket hang up / ECONNRESET.
docs/howto/keep_alive_timeout.md Adds a focused keep-alive timeout mismatch guide referenced by logs.
CHANGELOG.md Updates the example warning log message link.
AGENTS.md Adds contributor/agent guidance for logging and doc-linking.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/howto/keep_alive_timeout.md Outdated
Comment thread docs/socket_hang_up_econnreset.md
Comment thread AGENTS.md
Comment thread packages/client-node/src/connection/socket_pool.ts Outdated
peter-leonov-ch and others added 2 commits April 21, 2026 18:24
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 21, 2026 16:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the existing keep-alive troubleshooting shortlink with in-repo documentation, adds new docs pages for ECONNRESET/keep-alive timeout guidance, and adjusts keep-alive socket cleanup guarding in the Node client.

Changes:

  • Update the Node keep-alive ECONNRESET warning to link to docs/howto/keep_alive_timeout.md and adjust related tests/CHANGELOG example.
  • Add new troubleshooting documentation under docs/ (including a new docs/howto page).
  • Tighten the eager stale-socket cleanup guard to run only for http.Agent instances (based on an instanceof check).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/client-node/src/connection/socket_pool.ts Updates http import and guards eager stale-socket cleanup; updates warning link to new docs page.
packages/client-node/tests/integration/node_keep_alive_header.test.ts Updates assertions to match the new docs link emitted in logs.
docs/socket_hang_up_econnreset.md Adds a new troubleshooting guide for socket hang up / ECONNRESET.
docs/howto/keep_alive_timeout.md Adds a focused how-to page explaining keep-alive timeout vs idle_socket_ttl.
CHANGELOG.md Updates the example warning log message URL to the new docs page.
AGENTS.md Adds explicit guidance for agents about log-level guards and linking to docs/ pages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/howto/keep_alive_timeout.md
Comment thread docs/howto/keep_alive_timeout.md Outdated
Comment thread docs/socket_hang_up_econnreset.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 21, 2026 18:35
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR “bootstraps embedded docs” by adding dedicated markdown troubleshooting pages and updating the Node client’s keep-alive warning log to link to the new documentation, with corresponding test and changelog updates.

Changes:

  • Update the keep-alive ECONNRESET warning link to point to a new docs/howto/keep_alive_timeout.md page.
  • Add new troubleshooting documentation pages under docs/.
  • Tighten eager stale-socket cleanup to run only when using the built-in Node.js http.Agent (via instanceof), and adjust integration tests accordingly.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/client-node/src/connection/socket_pool.ts Updates HTTP import to allow instanceof check; restricts eager stale-socket cleanup to http.Agent; updates warning link to new embedded docs.
packages/client-node/tests/integration/node_keep_alive_header.test.ts Updates log matching regex to reflect new docs URL and removes an extra blank line.
docs/socket_hang_up_econnreset.md Adds a general troubleshooting guide for socket hang up / ECONNRESET.
docs/howto/keep_alive_timeout.md Adds a focused how-to page explaining keep-alive timeout vs idle socket TTL and mitigation steps.
CHANGELOG.md Updates the example warning message to the new docs URL.
AGENTS.md Adds explicit guidance for eager log-level guards and linking user-suggestion logs to dedicated docs pages; removes the prior “ongoing refactoring” notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@peter-leonov-ch peter-leonov-ch merged commit 07b355a into main Apr 21, 2026
55 of 56 checks passed
@peter-leonov-ch peter-leonov-ch deleted the bootstrap_embedded_docs branch April 21, 2026 18:39
peter-leonov-ch added a commit that referenced this pull request May 9, 2026
`AGENTS.md` had drifted from reality after PRs #662#712: it claimed
`examples/web` has no `performance/` folder, pointed at a placeholder
docs path, and said nothing about the `skills/` directory or the
`.claude/skills/setup/` skill that replaced `copilot-setup-steps.yml`.

## Summary

- **Examples › `performance/`** — drop the "no `performance/` folder
under `examples/web`" claim; #701 added one for browser-safe streaming.
- **Log-message docs guidance** — point at the real `docs/` layout from
#677 (`docs/socket_hang_up_econnreset.md`, `docs/howto/`) instead of a
fictional `docs/example-log-message.md`. The example URL in the snippet
now also resolves to a real page (`docs/socket_hang_up_econnreset.md`).
- **New `Skills` section** — documents the repo-root `skills/` directory
(#681, #682, #702): `client-node`'s `prepack` ships it via
`@clickhouse/client`, the `agents.skills` field of
`packages/client-node/package.json` declares which skills are
discoverable, and the `Skills E2E` workflow
(`.github/workflows/e2e-skills.yml`, backed by
`tests/e2e/skills/check.js`) asserts the packaged tarball contains the
declared skills. Routes contributors to `.claude/skills/setup/SKILL.md`
(#705) instead of re-introducing `copilot-setup-steps.yml`.
- **`agents.skills` manifest** — adds `clickhouse-js-node-coding`
alongside `clickhouse-js-node-troubleshooting` so both shipped skills
are discoverable to downstream tooling. `tests/e2e/skills/check.js` is
extended to verify both skills land in the packaged `@clickhouse/client`
tarball.
- **New `Embedded docs` section** — surfaces `docs/` as the preferred
home for pages linked from log messages.
- **CHANGELOG guidance** — aligns with the PR template: entry goes in
the PR description and is folded into `CHANGELOG.md` at release time.

Documentation refresh plus a small manifest/test change to make the
second shipped skill discoverable.

## Checklist

- [x] A human-readable description of the changes was provided to
include in CHANGELOG

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
Co-authored-by: Peter Leonov <peter.leonov@clickhouse.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.

2 participants