Skip to content

feat(changelog): one-line summaries by default, --full to expand - #401

Merged
padak merged 2 commits into
mainfrom
claude/zealous-wilbur-87aebd
Jun 4, 2026
Merged

feat(changelog): one-line summaries by default, --full to expand#401
padak merged 2 commits into
mainfrom
claude/zealous-wilbur-87aebd

Conversation

@padak

@padak padak commented Jun 4, 2026

Copy link
Copy Markdown
Member

What

kbagent changelog now shows a one-line summary per version by default instead of a wall of text. --full (-v) expands every note as before.

Before (0.57.0 was a single ~3 KB bullet):

v0.57.0
  • BREAKING (flow / conditional flows): the flow command group now targets conditional flows
    (keboola.flow) ONLY; keboola.orchestrator support is dropped. --component-id is removed from
    every flow subcommand and from the /flows REST surface (FlowCreate/FlowUpdate/FlowSchedule
    ... [~40 more lines] ...

After:

v0.57.0
  • BREAKING (flow / conditional flows): the flow command group now targets conditional flows
    (keboola.flow) ONLY; keboola.orchestrator support is dropped.  (+4 more)

Run with --full (-v) to see complete notes.

Why

The changelog data had drifted from its own contract ("one-line summaries per version") into multi-paragraph essays, and the renderer — though it word-wraps and colours prefixes — can't rescue a single 3 KB bullet. Two compounding problems: data (mega-paragraphs) and rendering (no summary view). This fixes both.

Changes

Rendering (commands/changelog.py)

  • Default = summary: first note's headline + dim (+N more) + a --full footer hint when detail is hidden.
  • --full / -v: full notes, word-wrapped (previous behaviour).
  • New recognised prefix BREAKING: (bold red) in _PREFIX_STYLES + _PREFIX_RE — previously it got no prefix styling.
  • --full bound via functools.partial so the --json payload stays {entries} only (flag is presentation, not data).

Summarisation (changelog.py)

  • New headline(): first sentence, capped at CHANGELOG_HEADLINE_MAX_CHARS on a word boundary, with guards so periods inside version numbers (0.57.0) and abbreviations (e.g.) aren't read as sentence ends, plus a dangling-backtick cleanup.
  • format_whats_new (post-update banner) now summarises the same way.

Data + authoring

  • The 0.57.0 entry is re-split from one mega-paragraph into five prefixed bullets as the reference example.
  • Authoring contract (one logical change per bullet, recognised prefix, self-contained first sentence) documented in the changelog.py module docstring and CONTRIBUTING.md.

Config: CHANGELOG_HEADLINE_MAX_CHARS = 160 in constants.py (no hardcoded literal in the renderer).

Docs synced: CLAUDE.md command list, AGENT_CONTEXT (context.py), commands-reference.md.

Tests

  • tests/test_changelog_render.py (16 cases): headline() guards (version-number, abbreviation, truncation, dangling backtick), summary vs --full, (+N more), BREAKING styling, clean JSON payload, format_whats_new summarisation.
  • Full non-e2e suite green (3884 passed).

Notes for reviewers

  • No version bump. This intentionally ships in a later release PR — that PR must add the changelog entry for this feature (none is added here, since 0.57.0 is already tagged).
  • The 0.57.0 entry re-split is editorial (same information, reorganised) and stands on its own.
  • make typecheck baseline (47 pre-existing diagnostics) is unchanged; none touch the changed files.

🤖 Generated with Claude Code


Open in Devin Review

`kbagent changelog` dumped one giant paragraph per version (0.57.0 was a
single ~3 KB bullet), which made the command unscannable.

Rendering: default mode now shows a one-line headline per version (the
first note's first sentence) plus a dim `(+N more)` marker and a
`--full` (-v) footer hint when detail is hidden. `--full` expands every
note as before. The post-update "What's new" banner is summarised the
same way. `BREAKING:` is now a recognised prefix (bold red); previously
it got no prefix styling at all.

Summarisation: new `changelog.headline()` extracts the first sentence,
skipping periods inside version numbers (`0.57.0`) and abbreviations
(`e.g.`), capped at `CHANGELOG_HEADLINE_MAX_CHARS` on a word boundary
with a dangling-backtick guard.

Data + authoring: the 0.57.0 entry is re-split from one mega-paragraph
into five prefixed bullets as the reference example. The authoring
contract (one logical change per bullet, recognised prefix,
self-contained first sentence) lives in the changelog.py module
docstring and CONTRIBUTING.md.

No version bump: this ships in a later release PR.

Docs synced: CLAUDE.md command list, AGENT_CONTEXT (context.py),
commands-reference.md. Tests: tests/test_changelog_render.py (16 cases).

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

Addresses two findings from the Devin review of #401:

- headline(): the `before.isdigit()` guard meant to skip version-number
  periods (0.57.0) was applied to all `[.!?]` terminators, so a digit
  before "!" or "?" (e.g. "exit code 5!") was wrongly suppressed as a
  sentence boundary. Scope the guard to periods only.

- The 0.57.0 "Change (flow validation)" reference bullet led with a
  ~600-char first sentence, contradicting the very authoring contract
  this PR introduces. Split it into a tight 149-char first sentence so
  the example actually models the contract.

Test: headline() digit-guard-is-period-only case added.
@padak

padak commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

Devin review findings — addressed in e1c1249

The 4 Devin findings live in the Devin app (not posted as GitHub inline threads), so there's nothing to resolve here — recording the disposition for reviewers:

# Finding Disposition
1 changelog.py:38 — 0.57.0 "Change (flow validation)" bullet has a ~600-char first sentence, doesn't honour the new "self-contained first sentence" contract Fixed. Split into a tight 149-char first sentence so the reference example actually models the contract.
2 commands/changelog.py:168partial() binding compatible with OutputFormatter.output No action — verification only; confirmed correct (and covered by test_json_payload_has_no_full_key).
3 changelog.py:859 — a sentence genuinely ending in a version number (0.56.0 entry) isn't split No action — inherent, ambiguous heuristic limitation; the truncation fallback keeps it scannable and the authoring contract steers new entries away from it. Devin flagged it as not-a-bug.
4 changelog.py:860 — the before.isdigit() guard also suppresses !/? after a digit (e.g. "exit code 5!") Fixed. Scoped the guard to periods only (note[dot] == "."); a digit before !/? is now a genuine boundary. Added a regression test.

@padak
padak merged commit 4b1e892 into main Jun 4, 2026
4 checks passed
@padak
padak deleted the claude/zealous-wilbur-87aebd branch June 4, 2026 23:21
padak added a commit that referenced this pull request Jun 4, 2026
#401

The 0.58.0 BigQuery note was a single wall-of-text bullet. #401 (merged to
main) introduced the `kbagent changelog` one-line-summary view + an authoring
contract (one logical change per prefixed bullet, self-contained first
sentence). Reformat the entry into New:/Fix:/Change: bullets so the default
`kbagent changelog` view stays scannable, and add a bullet documenting the
#401 feature itself (it shipped to main without a version bump, so 0.58.0 is
its release home).
padak added a commit that referenced this pull request Jun 4, 2026
* feat(workspace): BigQuery support for `workspace query` (0.58.0)

The Query Service backend now runs BigQuery (as keboola-mcp-server already
uses). The query execution path was always backend-agnostic -- submit + CSV
export are identical for Snowflake and BigQuery -- so a SELECT against a
BigQuery workspace already returned rows. The gaps were classification and
error legibility:

- qs_compatible is now keyed by (backend, loginType). BigQuery workspaces
  carry loginType `default`, which IS Query-Service-compatible, but `default`
  was off the Snowflake-only whitelist, so every BigQuery workspace was
  reported qs_compatible=false and hidden by `workspace list --qs-compatible`.
  New QUERY_SERVICE_COMPATIBLE_LOGIN_TYPES_BIGQUERY whitelist is kept separate
  because Snowflake's legacy `default` is rejected ('JWT token is invalid') --
  the same string means compatible for BigQuery, incompatible for Snowflake.
- workspace create on BigQuery now requests loginType `default` explicitly
  (matches keboola-mcp-server) instead of relying on the backend default.
- BigQuery query errors are unwrapped: the Query Service serializes them as
  {Location: ...; Message: "..."; Reason: ...}; _unwrap_bigquery_error extracts
  the inner Message so the error reads like Snowflake plain text.

Verified live against project 9621 (e2e-bigquery, connection.keboola.com):
create/list/detail/load/query/delete, real-data query, qs_compatible surfacing,
and clean error messages.

Tests: TestBigQueryQueryServiceSupport, TestUnwrapBigQueryError + a BigQuery
case in TestExtractQueryJobError; test_e2e workspace query is now backend-aware
(BigQuery back-tick vs Snowflake double-quote quoting).

* docs(workspace): note BigQuery qs_compatible + backend-agnostic query (review NB-1)

Addresses the kbagent-pr-reviewer NB-1 finding: the commands-reference.md
workspace list/detail/query entries documented the #304 qs_compatible fields
but not the v0.58.0 backend-aware change. Without it, an agent on an older
install hitting a BigQuery project would get zero `--qs-compatible` results
with no explanation.

- workspace list / detail: note qs_compatible is keyed by (backend, loginType)
  and BigQuery `default` workspaces are now qs_compatible=true (Snowflake's own
  legacy `default` stays false).
- workspace query: note it is backend-agnostic since v0.58.0 and the
  Snowflake double-quote vs BigQuery back-tick dialect difference.

* docs(changelog): reformat 0.58.0 per #401 authoring contract + document #401

The 0.58.0 BigQuery note was a single wall-of-text bullet. #401 (merged to
main) introduced the `kbagent changelog` one-line-summary view + an authoring
contract (one logical change per prefixed bullet, self-contained first
sentence). Reformat the entry into New:/Fix:/Change: bullets so the default
`kbagent changelog` view stays scannable, and add a bullet documenting the
#401 feature itself (it shipped to main without a version bump, so 0.58.0 is
its release home).
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