-
Notifications
You must be signed in to change notification settings - Fork 1
feat: enforce debug/host guard and document API versioning #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
eb08e28
feat: enforce debug/host guard and document API versioning
clean6378-max-it a5b3015
feat: enforce debug/host guard and document API versioning
clean6378-max-it d7f4701
fix: address PR review on debug guard and API docs
clean6378-max-it ab1bb2e
docs: address PR review on debug guard scope and deprecation wording
clean6378-max-it 1f5456e
fix: address PR review on loopback host, versioning, and docs
clean6378-max-it df73fc5
docs: add Keep a Changelog [Unreleased] compare link
clean6378-max-it File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project are documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). | ||
|
|
||
| ## [Unreleased] | ||
|
|
||
| ### Added | ||
|
|
||
| - `__version__` in `app.py` for release tracking (`0.1.0.dev0` until the first `v0.1.0` git tag) | ||
| - Startup guard refusing `--debug` with a non-loopback `--host` (including bracketed IPv6 loopback such as `[::1]`) | ||
| - [Deprecation policy](docs/deprecation-policy.md) for API and JSON field changes | ||
| - API field **stability** tables in `docs/api-reference.md` (stable / experimental / deprecated) | ||
|
|
||
| ### Changed | ||
|
|
||
| - README notes that the server enforces the debug + host safety rule at startup | ||
|
|
||
| ### Deprecated | ||
|
|
||
| - `export_count` on `GET /api/export/state` (documented only; still returned). Use `last_export_session_count`. Removal planned in a follow-up release per [deprecation policy](docs/deprecation-policy.md). | ||
|
|
||
| [Unreleased]: https://github.com/cppalliance/claude-code-chat-browser/compare/f70505982d435f8b1f754cb18c0c9f65609f11b4...HEAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
clean6378-max-it marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Deprecation policy | ||
|
|
||
| This document defines how **claude-code-chat-browser** evolves its HTTP JSON API and CLI without breaking integrators and the bundled SPA unexpectedly. | ||
|
|
||
| ## Principles | ||
|
|
||
| 1. **Documented fields are a contract.** See [API reference](api-reference.md) — each field is marked `stable`, `experimental`, or `deprecated`. | ||
| 2. **Additive first.** Prefer adding a new field over renaming an existing one. | ||
| 3. **Deprecate before removing.** A deprecated field remains in responses for at least **one release** after the deprecation is announced in [CHANGELOG](../CHANGELOG.md) and the API reference. Fields still read by the bundled SPA need **at least two releases** — see [Removal criteria](#removal-criteria) below. | ||
| 4. **SPA and scripts.** Update `static/js/*.js` and any internal callers before removing a field. | ||
|
|
||
| ## How we announce deprecation | ||
|
|
||
| | Channel | What to update | | ||
| |---------|----------------| | ||
| | CHANGELOG | `### Deprecated` under the release that announces the change | | ||
| | API reference | Set field stability to `deprecated` with a short note and replacement | | ||
| | Response (optional) | Future: `Deprecation` header or JSON `_deprecated` map — not required today | | ||
|
|
||
| ## Removal criteria | ||
|
|
||
| A deprecated field may be removed when: | ||
|
|
||
| - At least one release has shipped with the field still present but documented as deprecated, and | ||
| - The bundled SPA no longer reads the field, and | ||
| - Tests and CHANGELOG document the removal. | ||
|
|
||
| For fields actively read by the bundled SPA (which does not track an external API version), removal happens no earlier than **two tagged releases** after the release that documented the deprecation in CHANGELOG (for example, deprecated in `0.1.0`, removable from `0.3.0` at earliest when versions advance `0.1.0` → `0.2.0` → `0.3.0`), and no earlier than **14 calendar days** after that deprecation announcement. | ||
|
|
||
| ## Example (in progress) | ||
|
|
||
| | Field | Endpoint | Status | Replacement | | ||
| |-------|----------|--------|-------------| | ||
| | `export_count` | `GET /api/export/state` | deprecated | `last_export_session_count` | | ||
|
|
||
| ## Versioning | ||
|
|
||
| Release versions follow `MAJOR.MINOR.PATCH` in `app.__version__` and [CHANGELOG](../CHANGELOG.md). Until the first git tag ships, `main` may carry a `.dev0` suffix (for example `0.1.0.dev0`); the CHANGELOG `[Unreleased]` section is the source of truth for what is not yet tagged. | ||
|
|
||
| | Bump | Pre-1.0 meaning | | ||
| |------|-----------------| | ||
| | **Patch** | Bug fixes and documentation; no intentional API removals | | ||
| | **Minor** | Additive API/features; deprecations may be announced | | ||
| | **Major** | Reserved for the `1.0.0` line and later: signals a stable HTTP JSON contract for external integrators and may include breaking removals that completed their deprecation period | | ||
|
|
||
| While the project is pre-1.0, treat **minor** bumps as the usual vehicle for deprecations and **patch** bumps for safe fixes. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.