KsADK
贡献

Contributing

Contributions should target the public repository, public documentation, and public CI. Do not include internal credentials, private endpoints, customer data, or company-only deployment runbooks in pull requests.

Development Setup

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest

Build docs locally:

make docs-site-build

Run open-source checks:

make open-source-audit
make public-audit

For changes that touch packaging, public docs, release metadata, or repository layout, run the broader review target before asking for release approval:

make public-preflight

Public CI Expectations

Public CI must not require internal kubeconfig files, internal registries, internal object storage, or local .zread/ state.

Before submitting a public PR:

  • run focused tests for the changed area.
  • run make docs-site-build when editing docs-site/; use make docs-site-dev for local preview.
  • update CLI docs when command behavior changes.
  • update release notes when changing packaging or public API behavior.
  • keep examples local-first unless a hosted feature is explicitly approved.

Test Strategy

KsADK keeps public confidence through layered tests:

LayerPurposeTypical command
unit and component testsvalidate isolated helpers, detection, runners, sessions, and packaging rulespytest tests/ -q
CLI snapshot testsprotect user-visible command help, resource output, and error hintsfocused pytest files under tests/
ASGI service testsvalidate FastAPI routes and session events without a real network serverservice/session pytest files
HTTP protocol E2Evalidate /v1/responses, /v1/chat/completions, upload, and local Web UI action payloadsOpenAI protocol E2E tests
browser E2Evalidate built UI behavior when Chromium is availablebrowser-tagged E2E tests
open-source auditsverify public tree, docs, Pages artifact, sdist, wheel, and clean export boundariesmake public-preflight

When a change affects protocol shape, attachment handling, session events, or the local Web UI payload, prefer a test that crosses the same boundary a real client uses. For example, a pure helper test is not enough for an upload flow that must pass through UploadFile, ResponsesInput, normalization, runner payload construction, and session event persistence.

Snapshot Updates

CLI snapshots are intentional public contracts. If a command, option, or error hint changes by design:

  1. update the implementation.
  2. run the focused snapshot test and inspect the diff.
  3. update only the affected snapshot section.
  4. run the focused test again.

Do not refresh all snapshots as a bulk operation unless the formatting system itself changed.

Documentation Contributions

Public docs should be written for external developers. Prefer:

  • commands that work in a clean virtual environment.
  • placeholder credentials and provider URLs.
  • explicit local fallback paths.
  • clear distinction between local SDK behavior and hosted AgentEngine behavior.

Avoid:

  • private URLs.
  • kubeconfig paths.
  • internal registry names.
  • real tokens or customer data.
  • references to generated .zread/ output as the published source.

Local zread wiki output can be useful as an engineering note source, but public documentation should be curated Markdown under docs-site/. Do not publish the generated wiki directory or depend on it during public CI.

Open-Source Review Boundary

The public repository should contain the SDK, public examples, public docs, CI, and release metadata needed by external developers. It should not contain:

  • internal deployment automation.
  • private registry or object-storage locations.
  • internal incident notes or operator playbooks.
  • .pypirc, PyPI/TestPyPI tokens, GitHub tokens, kubeconfigs, or local cloud credentials.
  • local session state, uploaded files, extracted attachment content, or generated build output.

If a file is useful internally but not safe or useful externally, keep it out of the clean export and summarize the relevant public behavior in curated docs.

Security

Report vulnerabilities through the security process documented in SECURITY.md once the public repository is created.

On this page