Thanks to visit codestin.com
Credit goes to github.com

Skip to content

align stable release docs with 1.2.2 - #341

Merged
ndycode merged 6 commits into
mainfrom
audit/pr5-release-docs-safety
Apr 1, 2026
Merged

ndycode merged 6 commits into
mainfrom
audit/pr5-release-docs-safety

Conversation

@ndycode

@ndycode ndycode commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • add the missing v1.2.2 stable release note and keep the docs portal tied to the package version that is actually being published

What Changed

  • added docs/releases/v1.2.2.md
  • updated the root README and docs portal release links to point at v1.2.2, v1.2.1, and v1.2.0
  • changed the documentation integrity test to derive the current stable release note from package.json instead of a stale hardcoded file name

Validation

  • npm run lint
  • npm run typecheck
  • npm test
  • npm test -- test/documentation.test.ts
  • npm run build
  • Focused tests: npx vitest run test/documentation.test.ts

Docs and Governance Checklist

  • README updated (if user-visible behavior changed)
  • docs/getting-started.md updated (if onboarding flow changed)
  • docs/features.md updated (if capability surface changed)
  • relevant docs/reference/* pages updated (if commands/settings/paths changed)
  • docs/upgrade.md updated (if migration behavior changed)
  • SECURITY.md and CONTRIBUTING.md reviewed for alignment

Risk and Rollback

  • Risk level: Low
  • Rollback plan: Revert acb932b

Additional Notes

  • This keeps future release-doc drift from recurring when package.json is bumped again.

note: greptile review for oc-chatgpt-multi-auth. cite files like lib/foo.ts:123. confirm regression tests + windows concurrency/token redaction coverage.

Greptile Summary

docs-only pr that adds the missing v1.2.2 release note and re-targets all stable release links in README.md and docs/README.md. the most meaningful change is in test/documentation.test.ts, which now derives currentStableReleaseDoc from package.json at test runtime via a beforeAll hook, eliminating the drift risk when the package version is bumped again.

key changes:

  • docs/releases/v1.2.2.md — new stable release note; all internal links resolve correctly
  • README.md / docs/README.md — three release link rows updated to v1.2.2 / v1.2.1 / v1.2.0
  • test/documentation.test.tsreadPackageVersion() + beforeAll replaces the hardcoded "docs/releases/v1.1.10.md" entry; previousStableReleaseDoc and earlierStableReleaseDoc remain intentionally hardcoded per the inline comment

minor issues found:

  • a spurious leading tab was added to the describe("Documentation Integrity", ...) call — cosmetic, won't break vitest, but inconsistent with the rest of the file
  • currentStableReleaseDoc starts as "" with no guard in getUserDocs(); safe today but fragile if the helper is reused outside it() bodies

no vitest coverage gaps introduced by this pr (docs/test changes only). no windows filesystem or token safety concerns in the changed code. full npm test checkbox is unchecked in the pr description — worth running the complete suite before merging to confirm no regressions across the 87-file suite.

Confidence Score: 5/5

  • safe to merge — all findings are p2 style nits, no logic bugs or runtime errors introduced
  • only two findings, both p2: a cosmetic indentation regression and a defensive-coding suggestion. the functional changes (doc links and test logic) are correct. v1.2.1 and v1.2.0 release docs exist on disk. the beforeAll / getUserDocs() wiring is safe for all current call sites. p2 findings do not reduce the score below 5 per scoring policy.
  • test/documentation.test.ts — leading-tab regression on the describe block and missing guard on currentStableReleaseDoc

Important Files Changed

Filename Overview
test/documentation.test.ts replaces hardcoded release doc list with package.json-derived currentStableReleaseDoc via beforeAll; minor indentation regression introduced on the describe block (leading tab)
docs/releases/v1.2.2.md new stable release note anchoring v1.2.2 docs portal entry; content is accurate and links are valid
README.md three release links updated from v1.1.10/v0.1.9/v0.1.8 to v1.2.2/v1.2.1/v1.2.0; clean mechanical change
docs/README.md four portal link rows updated to point at v1.2.2/v1.2.1/v1.2.0; clean and consistent with README.md changes

Sequence Diagram

sequenceDiagram
    participant V as Vitest runtime
    participant B as beforeAll()
    participant PJ as package.json
    participant GD as getUserDocs()
    participant FS as Node FS

    V->>B: execute before any it()
    B->>PJ: readFileSync("package.json")
    PJ-->>B: { version: "1.2.2" }
    B->>B: set packageVersion = "1.2.2"
    B->>B: set currentStableReleaseDoc = "docs/releases/v1.2.2.md"

    V->>GD: called inside it() body
    GD-->>V: [..., "docs/releases/v1.2.2.md", "docs/releases/v1.2.1.md", "docs/releases/v1.2.0.md", ...]

    V->>FS: existsSync + readFileSync for each doc
    FS-->>V: all present and non-empty ✓
Loading

Fix All in Codex

Prompt To Fix All With AI
This is a comment left during a code review.
Path: test/documentation.test.ts
Line: 143

Comment:
**Spurious leading tab on `describe` block**

the `describe` line got an extra leading tab while its body (`it(...)` blocks) did not. all other top-level statements in this file sit at column 0. this looks like an accidental whitespace edit.

```suggestion
describe("Documentation Integrity", () => {
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: test/documentation.test.ts
Line: 34-38

Comment:
**`currentStableReleaseDoc` starts as empty string with no guard**

`currentStableReleaseDoc` is `""` at module-init time and only set inside `beforeAll`. `getUserDocs()` silently includes `""` in the array if it were ever called before `beforeAll` completes (e.g. during test collection in a future refactor, or if this helper is imported by another test file). `join(projectRoot, "")` resolves to the project root directory, so `read("")` would throw an `EISDIR` error instead of a meaningful assertion failure.

current call-sites are all inside `it()` bodies so it's safe today, but a defensive early throw would lock in that contract:

```typescript
function getUserDocs(): string[] {
	if (!currentStableReleaseDoc) {
		throw new Error("getUserDocs() called before beforeAll — currentStableReleaseDoc not set");
	}
	return [
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (6): Last reviewed commit: "chore: final CodeRabbit retrigger" | Re-trigger Greptile

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Summary

This is a low-severity documentation-only PR that updates stable release references from v1.1.10 to v1.2.2 across README files, adds the corresponding release note, and improves test durability by deriving the stable release version dynamically from package.json rather than hardcoding it. No runtime code, security, or data-loss concerns are present; validation tests (lint, typecheck, build, and documentation test) all passed.

Key changes

  • Release documentation: Added docs/releases/v1.2.2.md documenting the stable release scope and updated version references in README.md and docs/README.md (from v1.1.10 → v1.2.2, v0.1.9 → v1.2.1, v0.1.8 → v1.2.0).
  • Test refactoring: Replaced hardcoded release versions in test/documentation.test.ts with a dynamic approach that reads package.json at runtime to determine the current stable release path, while intentionally keeping two older stable release slots pinned for backwards-compatibility validation.
  • Test coverage expansion: Extended assertions to verify that both root and docs README files contain links to the dynamic current stable release and the two pinned older stable releases.

Architectural decision

The PR shifts responsibility for stable release version management from hardcoded test values to a single source of truth (package.json), reducing manual maintenance burden and lowering the risk of documentation–package version misalignment.

Risk assessment

Low risk. All changes are documentation and test metadata; no shipped code logic is affected. The test improvements make the documentation validation more resilient to version updates.

Walkthrough

release version links bumped from v1.1.10/v0.1.9/v0.1.8 to v1.2.2/v1.2.1/v1.2.0 across readme files. documentation test suite refactored to derive current stable release path from package.json version instead of hardcoded strings. new stable release doc added for v1.2.2.

Changes

Cohort / File(s) Summary
README Updates
README.md, docs/README.md
Updated release notes links to point to v1.2.2 (current), v1.2.1 (previous), and v1.2.0 (earlier) stable versions. Root README references the same three versions; docs README duplicates these links plus adds a reference section entry pointing to current stable.
New Stable Release Doc
docs/releases/v1.2.2.md
New documentation page establishing v1.2.2 as the stable release line. Declares package version, command family (codex auth ...), package name (codex-multi-auth), and scope of updates including README/docs portal alignment and test fixture adjustments.
Test Suite Refactor
test/documentation.test.ts
Replaced hardcoded userDocs array with dynamic getUserDocs() function that derives current stable path from package.json version at runtime plus two pinned older stable docs. Added readPackageVersion() helper (test/documentation.test.ts:line ~20-30). Updated all doc-dependent tests and extended release history link assertions to validate both README files link to dynamically-resolved current stable doc.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes


heads up: the test refactor at test/documentation.test.ts introduces runtime reads of package.json for version derivation. no explicit error handling shown for malformed json or missing version field—verify readPackageVersion() throws descriptive errors as documented. also, no obvious regression tests validating the new dynamic resolution works correctly when version string changes. windows edge cases around file path handling should be checked if this runs on windows CI. concurrency risk is minimal here since it's test-only and reads happen in beforeAll(), but ensure parallel test runs don't stomp on state if tests expand later.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Title check ❓ Inconclusive title follows conventional commits format with lowercase type and summary under 72 chars, but lacks required scope and references feature (docs alignment) that is secondary to the test durability fix. consider scoping as docs(releases): or test(releases): to clarify primary change domain; e.g. docs(releases): align stable release docs with 1.2.2
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed description covers summary, what changed, validation status, and risk/rollback; addresses the core intent. however, full npm test suite remains unchecked and greptile flags an indentation slip on test/documentation.test.ts:143 not mentioned in author's validation or notes.

✏️ 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 audit/pr5-release-docs-safety
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch audit/pr5-release-docs-safety

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.

@ndycode

ndycode commented Apr 1, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ndycode

ndycode commented Apr 1, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/documentation.test.ts`:
- Line 143: The leading tab before the describe("Documentation Integrity", () =>
{ line creates inconsistent indentation; remove the leading tab so the describe
starts at column 0 to match the closing `});` and the rest of the file. Locate
the describe block by the exact string describe("Documentation Integrity", () =>
{ and adjust its indentation to be flush left (no leading whitespace) so the
file's indentation is consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e2f636b0-acb2-46a5-b5e2-df798307976f

📥 Commits

Reviewing files that changed from the base of the PR and between b9c9273 and 1044774.

📒 Files selected for processing (4)
  • README.md
  • docs/README.md
  • docs/releases/v1.2.2.md
  • test/documentation.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Greptile Review
🧰 Additional context used
📓 Path-based instructions (2)
docs/**

⚙️ CodeRabbit configuration file

keep README, SECURITY, and docs consistent with actual CLI flags and workflows. whenever behavior changes, require updated upgrade notes and mention new npm scripts.

Files:

  • docs/README.md
  • docs/releases/v1.2.2.md
test/**

⚙️ CodeRabbit configuration file

tests must stay deterministic and use vitest. demand regression cases that reproduce concurrency bugs, token refresh races, and windows filesystem behavior. reject changes that mock real secrets or skip assertions.

Files:

  • test/documentation.test.ts
🔇 Additional comments (7)
README.md (1)

311-313: lgtm — release links now track v1.2.x stable line.

links in README.md:311-313 are consistent with docs/README.md and the new docs/releases/v1.2.2.md entry. the test suite (test/documentation.test.ts:171-173) validates these paths against package.json, so future version bumps will fail ci if the readme drifts.

docs/README.md (1)

26-28: docs portal release table updated consistently.

docs/README.md:26-28 and :54 now reference the v1.2.x stable line, matching the root readme and the new release note. test coverage at test/documentation.test.ts:160-162 confirms these paths appear in the portal content.

Also applies to: 54-54

docs/releases/v1.2.2.md (1)

1-31: new stable release note looks good.

docs/releases/v1.2.2.md anchors the current stable version and explains the docs alignment scope. relative links at :28-31 resolve correctly from within docs/releases/. the test at test/documentation.test.ts:57 will catch if this file goes missing after a future version bump.

test/documentation.test.ts (4)

17-32: readPackageVersion() is solid.

good defensive parsing with explicit error messages at test/documentation.test.ts:24-26 and test/documentation.test.ts:28-29. trimming the version string handles accidental whitespace. this keeps the test deterministic since it reads from the repo's own package.json.


34-38: module-level state initialized via beforeAll — works but worth noting the coupling.

currentStableReleaseDoc at :35 starts empty and is set in beforeAll at :95. any call to getUserDocs() before beforeAll runs would include an empty string in the array. vitest guarantees beforeAll runs before test cases, so this is safe in practice, but the implicit dependency could confuse future maintainers.

the comment at :36-38 explaining why previousStableReleaseDoc and earlierStableReleaseDoc stay hardcoded is helpful — keeps the intent clear.

Also applies to: 93-96


40-70: getUserDocs() dynamically includes current stable release doc — clean approach.

returning a fresh array each call at test/documentation.test.ts:40-70 ensures the list reflects the initialized currentStableReleaseDoc. including the hardcoded older stable docs (v1.2.1.md, v1.2.0.md) alongside the dynamic one keeps the "short stable-history window" intentional per :36-38.


155-173: assertions now validate both readmes against derived version — good coverage.

test/documentation.test.ts:160-162 checks the docs portal includes the current and pinned stable docs. :171-173 does the same for the root readme. this catches drift if someone bumps package.json but forgets to update the markdown links.

}

describe("Documentation Integrity", () => {
describe("Documentation Integrity", () => {

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.

🧹 Nitpick | 🔵 Trivial

cosmetic: leading tab on describe block creates inconsistent indentation.

test/documentation.test.ts:143 has a leading tab while the closing }); at the end of the file (not shown but implied) stays at column 0. pr objectives already noted this. minor, but worth fixing to keep the file formatting consistent.

🧹 proposed fix
-	describe("Documentation Integrity", () => {
+describe("Documentation Integrity", () => {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
describe("Documentation Integrity", () => {
describe("Documentation Integrity", () => {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/documentation.test.ts` at line 143, The leading tab before the
describe("Documentation Integrity", () => { line creates inconsistent
indentation; remove the leading tab so the describe starts at column 0 to match
the closing `});` and the rest of the file. Locate the describe block by the
exact string describe("Documentation Integrity", () => { and adjust its
indentation to be flush left (no leading whitespace) so the file's indentation
is consistent.

@ndycode
ndycode merged commit fdf1b3f into main Apr 1, 2026
2 checks passed
@ndycode
ndycode deleted the audit/pr5-release-docs-safety branch April 1, 2026 18:17
ndycode added a commit that referenced this pull request Apr 6, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Jul 28, 2026
6 tasks
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