Skip to content

test: gate startup critical agent contracts - #81

Merged
kyaukyuai merged 1 commit into
mainfrom
codex/kya-298-startup-critical-contract-gates
Apr 1, 2026
Merged

kyaukyuai merged 1 commit into
mainfrom
codex/kya-298-startup-critical-contract-gates

Conversation

@kyaukyuai

@kyaukyuai kyaukyuai commented Apr 1, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Documentation

    • Documented that the default capabilities JSON shape and read entrypoint contracts are startup-critical and release-gated in CI, providing explicit stability guarantees for key interfaces.
  • Tests

    • Added comprehensive validation tests for startup-critical agent read endpoints, ensuring JSON output shapes remain compatible and maintaining required field presence across releases.

@coderabbitai

coderabbitai Bot commented Apr 1, 2026 •

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR adds documentation and CI-enforced tests to protect the JSON contract stability of the CLI's default capabilities output and critical read entrypoints, establishing release-gated guardrails for these startup interfaces.

Changes

Cohort / File(s) Summary
Documentation - Release Management
docs/agent-first.md, docs/json-contracts.md
Added notes stating that the default capabilities JSON shape and top-level JSON of read entrypoints are treated as startup-critical contracts and are release-gated in CI.
Test Suite - Startup Contracts
test/contracts/startup-critical-contracts.test.ts
Introduced new test file with shared helpers (runLinearJsonCommand, MockLinearServer, assertStartupObjectShape, assertStartupArrayShape) to validate CLI JSON output contracts. Tests verify: (1) capabilities --json v1-compatibility, (2) capabilities --json --compat v2 schema metadata opt-in, and (3) seven critical agent read entrypoints (issue view/list, project view, cycle current, document list, webhook view, notification list) preserve consistent top-level JSON shape and required fields.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #72: Implements the linear capabilities --json command whose default output shape and compatibility versions are directly validated by the new startup-contract tests.
  • PR #76: Modifies buildCapabilitiesPayload and adds schema/output metadata that the tests explicitly validate across compatibility versions.
  • PR #69: Implements document list and document view commands whose JSON payloads are validated as startup-critical entrypoints in the new test suite.

Poem

Hop hop, the JSON shapes hold fast,
With CI guards they'll always last,
Test by test, we build the wall,
A startup safe for one and all! 🐰✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding tests to enforce startup-critical agent contracts through CI gating, which is the primary focus of the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/kya-298-startup-critical-contract-gates

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kyaukyuai
kyaukyuai merged commit 6faf5a7 into main Apr 1, 2026
14 checks passed
@kyaukyuai
kyaukyuai deleted the codex/kya-298-startup-critical-contract-gates branch April 1, 2026 07:15
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