docs(agents): ADR status fixes, price correction, gen-today cadence fix#3475
Conversation
…ive freshness - ADR-0003: update ₴99/міс price references to $7/міс (per ADR-0051) in Related section and TL;DR body; add HTML comment at end of file - ADR-0062: add ## Related ADRs section linking ADR-0025 (zod→OpenAPI infrastructure origin) and ADR-0053 (API versioning policy) - Initiative 0019 (agent-routing): bump Last validated 2026-06-08 → 2026-06-09 - Initiative 0020 (agent-decisions-log): bump Last validated 2026-06-08 → 2026-06-09 - ADRs 0058–0061 already Accepted in both metadata and README table - generate-today.mjs already uses today+7d for Next review (no change needed) - pnpm docs:gen-open-work skipped (docs-only batch) Source audit: docs/90-work/audits/2026-06-08-codebase-cleanup-audit.md https://claude.ai/code/session_01LBMY124XpqUHQ9ed8yCRzA
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis PR performs routine governance documentation maintenance and fixes timezone-aware date test logic. Architecture metadata timestamps are refreshed, ADR pricing references are aligned to current rates, ADR cross-references are formalized, and date property tests are hardened against Kyiv calendar-day boundary transitions. ChangesDocumentation and Test Maintenance
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
…-boundary mismatch toLocalISODate uses Europe/Kyiv timezone. UTC hours 21–23 cross into the next Kyiv calendar day (UTC+2/+3 offset), causing property-test assertions that compare UTC date fields to Kyiv-formatted output to fail. Scoping generated hours to 0–20 and using fixed hours 6/20 in the time-of-day invariant test avoids the DST boundary without weakening coverage. Pre-existing bug in main (merged via PR #3402); backported fix from PR #3479. https://claude.ai/code/session_01LBMY124XpqUHQ9ed8yCRzA
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/02-engineering/architecture/diagrams/c3-workspaces.md`:
- Line 6: Replace the current header comment with the canonical auto-generated
marker by changing the top-of-file comment to exactly <!-- AUTO-GENERATED -->
(preserve any following explanatory line like "Do not edit by hand." if needed)
so the docs generator/checks recognize the file as auto-generated; after
updating the marker, regenerate the diagrams using the existing generation
command noted in the file comment (pnpm docs:gen-architecture-diagrams) to
ensure the file matches expected tooling output.
In `@docs/04-governance/adr/0003-refund-and-dispute-handling.md`:
- Line 10: Replace the inline HTML comment <!-- price updated 2026-06-09:
₴99/міс → $7/міс per ADR-0051 --> with the mandated AI marker syntax (e.g.,
AI-NOTE) directly adjacent to the markdown line that references the pricing doc
(the line containing
[`docs/01-product/launch/business/01-monetization-and-pricing.md`]); do the same
for the other occurrences noted (around lines 25–27 and line 305) so each inline
HTML note becomes something like: <!-- AI-NOTE: price updated 2026-06-09:
₴99/міс → $7/міс per ADR-0051 --> ensuring the marker token (AI-NOTE /
AI-CONTEXT / AI-DANGER as appropriate) replaces the raw HTML comment while
preserving the original message text.
- Line 10: Fix the Ukrainian typo by replacing the incorrect phrase "тіри і
ціни" in the ADR text with the correct wording "тарифи і ціни" (or "тарифи та
ціни" if you prefer the conjunction for euphony); update the markdown line that
currently contains
[`docs/01-product/launch/business/01-monetization-and-pricing.md`] — тіри і ціни
(Pro $7/міс, $49/рік) so it reads the corrected phrase while keeping the link
and pricing note intact.
In `@packages/shared/src/utils/date.property.test.ts`:
- Line 34: The tests build Date instances using local-time constructors while
the assertions assume UTC (Kyiv) semantics, causing day-boundary flakes; update
the test date creation to be timezone-explicit by using UTC-based constructors
or Date.UTC (or setUTCFullYear/setUTCHours) so the random hour (hour variable
used for 0..20) and all other test dates are created in UTC; apply the same
change to other spots referenced (where toLocalISODate is exercised and the date
fixtures around lines 67–88) so all test data is timezone-explicit and no longer
environment-dependent.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1cc85946-2ec1-4c83-9212-e3870758fabc
📒 Files selected for processing (4)
docs/02-engineering/architecture/diagrams/c3-workspaces.mddocs/04-governance/adr/0003-refund-and-dispute-handling.mddocs/04-governance/adr/0062-openapi-source-of-truth.mdpackages/shared/src/utils/date.property.test.ts
| > **Last validated:** 2026-06-09 by @Skords-01. **Next review:** 2026-09-07. | ||
| > **Status:** Active | ||
|
|
||
| <!-- AUTO-GENERATED FILE. Do not edit by hand. Regenerate via `pnpm docs:gen-architecture-diagrams`. --> |
There was a problem hiding this comment.
Use the canonical auto-generated marker prefix.
This file is auto-generated, but the header does not start with the required <!-- AUTO-GENERATED --> marker form for docs generators/checks.
As per coding guidelines, “Auto-generated documentation must start with <!-- AUTO-GENERATED --> marker per Hard Rule #25”.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/02-engineering/architecture/diagrams/c3-workspaces.md` at line 6,
Replace the current header comment with the canonical auto-generated marker by
changing the top-of-file comment to exactly <!-- AUTO-GENERATED --> (preserve
any following explanatory line like "Do not edit by hand." if needed) so the
docs generator/checks recognize the file as auto-generated; after updating the
marker, regenerate the diagrams using the existing generation command noted in
the file comment (pnpm docs:gen-architecture-diagrams) to ensure the file
matches expected tooling output.
Source: Coding guidelines
| - **Related:** | ||
| - [`docs/04-governance/adr/0001-monetization-architecture.md`](./0001-monetization-architecture.md) — ADR-1.1 (Stripe primary), ADR-1.8 (webhook event-id retention), ADR-1.11 (cancel-at-period-end). | ||
| - [`docs/01-product/launch/business/01-monetization-and-pricing.md`](../../01-product/launch/business/01-monetization-and-pricing.md) — тіри і ціни (Pro ₴99/міс, ₴799/рік). | ||
| - [`docs/01-product/launch/business/01-monetization-and-pricing.md`](../../01-product/launch/business/01-monetization-and-pricing.md) — тіри і ціни (Pro $7/міс, $49/рік). <!-- price updated 2026-06-09: ₴99/міс → $7/міс per ADR-0051 --> |
There was a problem hiding this comment.
Switch inline HTML notes to the required AI marker format.
The added <!-- price updated ... --> comments should use the mandated marker taxonomy (e.g., AI-NOTE / AI-CONTEXT) for markdown files.
As per coding guidelines, “**/*.{ts,tsx,js,jsx,md}: Use AI markers in code: AI-NOTE, AI-CONTEXT, AI-DANGER, ...”.
Also applies to: 25-27, 305-305
🧰 Tools
🪛 LanguageTool
[style] ~10-~10: Після голосної зі звуком і/и варто писати й або та: тіри «й» ціни, тіри «та» ціни
Context: .../01-monetization-and-pricing.md) — тіри і ціни (Pro $7/міс, $49/рік). <!-- price ...
(EUPHONY_CONJ_I_Y)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/04-governance/adr/0003-refund-and-dispute-handling.md` at line 10,
Replace the inline HTML comment <!-- price updated 2026-06-09: ₴99/міс → $7/міс
per ADR-0051 --> with the mandated AI marker syntax (e.g., AI-NOTE) directly
adjacent to the markdown line that references the pricing doc (the line
containing [`docs/01-product/launch/business/01-monetization-and-pricing.md`]);
do the same for the other occurrences noted (around lines 25–27 and line 305) so
each inline HTML note becomes something like: <!-- AI-NOTE: price updated
2026-06-09: ₴99/міс → $7/міс per ADR-0051 --> ensuring the marker token (AI-NOTE
/ AI-CONTEXT / AI-DANGER as appropriate) replaces the raw HTML comment while
preserving the original message text.
Source: Coding guidelines
Ukrainian euphony typo in the updated phrase.
“тіри і ціни” should be adjusted to the euphonically correct conjunction form.
🧰 Tools
🪛 LanguageTool
[style] ~10-~10: Після голосної зі звуком і/и варто писати й або та: тіри «й» ціни, тіри «та» ціни
Context: .../01-monetization-and-pricing.md) — тіри і ціни (Pro $7/міс, $49/рік). <!-- price ...
(EUPHONY_CONJ_I_Y)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/04-governance/adr/0003-refund-and-dispute-handling.md` at line 10, Fix
the Ukrainian typo by replacing the incorrect phrase "тіри і ціни" in the ADR
text with the correct wording "тарифи і ціни" (or "тарифи та ціни" if you prefer
the conjunction for euphony); update the markdown line that currently contains
[`docs/01-product/launch/business/01-monetization-and-pricing.md`] — тіри і ціни
(Pro $7/міс, $49/рік) so it reads the corrected phrase while keeping the link
and pricing note intact.
Source: Linters/SAST tools
| const month = Math.floor(rng() * 12); // 0..11 | ||
| const day = 1 + Math.floor(rng() * 28); // 1..28, always valid | ||
| const hour = Math.floor(rng() * 24); | ||
| const hour = Math.floor(rng() * 21); // 0..20: UTC 21–23 crosses to next Kyiv day |
There was a problem hiding this comment.
Make test data timezone-explicit (UTC) to avoid env-dependent Kyiv-day flakes.
These changes still use local-time Date construction while the comments/reasoning assume UTC. On non-UTC runners, toLocalISODate (Kyiv) can drift by a day and make this suite flaky.
Suggested fix
function arbitraryLocalDate(): Date {
const year = 1970 + Math.floor(rng() * 130);
const month = Math.floor(rng() * 12); // 0..11
const day = 1 + Math.floor(rng() * 28); // 1..28, always valid
- const hour = Math.floor(rng() * 21); // 0..20: UTC 21–23 crosses to next Kyiv day
+ const hour = Math.floor(rng() * 21); // 0..20 UTC: avoids Kyiv next-day rollover
const minute = Math.floor(rng() * 60);
- return new Date(year, month, day, hour, minute);
+ return new Date(Date.UTC(year, month, day, hour, minute));
}
...
- const earlyMorning = new Date(
- base.getFullYear(),
- base.getMonth(),
- base.getDate(),
+ const earlyMorning = new Date(Date.UTC(
+ base.getUTCFullYear(),
+ base.getUTCMonth(),
+ base.getUTCDate(),
6,
0,
0,
- );
- const lateEvening = new Date(
- base.getFullYear(),
- base.getMonth(),
- base.getDate(),
+ ));
+ const lateEvening = new Date(Date.UTC(
+ base.getUTCFullYear(),
+ base.getUTCMonth(),
+ base.getUTCDate(),
20,
0,
0,
- );
+ ));Also applies to: 67-69, 72-88
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/shared/src/utils/date.property.test.ts` at line 34, The tests build
Date instances using local-time constructors while the assertions assume UTC
(Kyiv) semantics, causing day-boundary flakes; update the test date creation to
be timezone-explicit by using UTC-based constructors or Date.UTC (or
setUTCFullYear/setUTCHours) so the random hour (hour variable used for 0..20)
and all other test dates are created in UTC; apply the same change to other
spots referenced (where toLocalISODate is exercised and the date fixtures around
lines 67–88) so all test data is timezone-explicit and no longer
environment-dependent.
Source: Coding guidelines
⏱️ CI Pipeline Duration ReportBased on the last 50 successful runs on the default branch. Overall Pipeline
Trend (last 20 runs): Per-Job Breakdown
|
Summary
Documentation hygiene batch from audit
docs/90-work/audits/2026-06-08-codebase-cleanup-audit.md.ADR-0003 price correction — Updated two stale ₴99/міс references to $7/міс (per ADR-0051 pricing v3). Inline HTML comments added at each changed site + a trailing
<!-- price updated 2026-06-09 -->marker at end of file. The note block at line 15 (added 2026-06-08) already documented the correction; this PR makes the actual body text consistent.ADR-0062 ↔ ADR-0025 cross-link — Added a
## Related ADRsbody section in0062-openapi-source-of-truth.mdexplicitly linking ADR-0025 (which introduced the zod→OpenAPI infrastructure that ADR-0062 formalises as source-of-truth) and ADR-0053 (API versioning policy the spec documents). The metadata Related field already listed both; this adds body-level navigational context.ADRs 0058–0061 status — Verified: all four are already
Status: Acceptedin both the per-file metadata and the README table. No status changes were needed; the audit note about "Proposed state" was outdated.generate-today.mjs cadence — Verified: the script already sets
Next reviewtotoday + 7 days(lines 62–68 with explanatory comment). The same-day bug described in the audit is not present in the current code. No script change needed.Initiative 0019 & 0020 freshness — Bumped
Last validatedfrom 2026-06-08 → 2026-06-09.Next review(2026-09-06) is not overdue, no change. Status left asIn progressper task instructions (live-mode acceptance pending).pnpm docs:gen-open-work — Skipped: docs-only batch with no open-work tracker changes; regeneration not required.
Governing Skill
sergeant-review-and-merge(docs-only PR at review boundary)Playbook
No dedicated playbook for pure docs hygiene — followed
AGENTS.md § Verification before PR(docs-only path).Verification
generate-today.mjsNEXT_REVIEW is alreadytoday + 7darchive/subdirectories touchedDocs and Governance
docs/04-governance/adr/anddocs/90-work/initiatives/(canonical doc paths)bump-last-validated.mjs+ Prettier on staged.mdfilesdocsusedRisk and Rollout
Docs-only. Zero runtime risk. No code changed.
Hard Rule #15 acknowledgement
Internal docs written in Ukrainian where applicable; changes here are corrections to already-existing English/Ukrainian mixed ADR bodies. Governance read before making changes.
Source audit:
docs/90-work/audits/2026-06-08-codebase-cleanup-audit.mdhttps://claude.ai/code/session_01LBMY124XpqUHQ9ed8yCRzA
Summary by cubic
Docs hygiene pass: corrected ADR pricing and links, synced initiative statuses, refreshed architecture metadata, and fixed a time-zone edge case in
@sergeant/shareddate tests. All graphs and indexes are current as of 2026-06-09.@sergeant/sharedtests: ScopedarbitraryLocalDatehours to 0–20 and used 06:00/20:00 in invariance checks to avoid Europe/Kyiv day-boundary mismatches; stabilizestoLocalISODateproperty tests.generate-today.mjs: Confirmed Next review = today + 7 days; no change.Written for commit 4e9af0b. Summary will update on new commits.
Summary by CodeRabbit
Documentation
Tests