Skip to content

ci: scope doc-sync to existing docs only, record no-op decisions - #1315

Merged
abueide merged 5 commits into
masterfrom
abueide/doc-sync-debug-api-key-length
Aug 28, 2026
Merged

ci: scope doc-sync to existing docs only, record no-op decisions#1315
abueide merged 5 commits into
masterfrom
abueide/doc-sync-debug-api-key-length

Conversation

@abueide

@abueide abueide commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #1313 now that the API key secret has been replaced and verified working.

Changes:

  • Removes the temporary secret-length-check step from the real doc-sync job — its replacement was confirmed working via a push-triggered smoke test, which has now also been removed (served its purpose; doc-sync is back to its original single-job, pull_request_target-only shape).
  • Tightens the prompt: Claude is now explicitly told it's only keeping existing documentation accurate, and must never create new documentation files or sections that didn't already exist before the merged PR.
  • When no existing docs are relevant to a change, Claude now records that decision (1-2 sentences, e.g. "No existing docs reference the changed behavior in X; nothing to update.") to doc-sync-decision.md, which a new step uploads as a job artifact (if-no-files-found: ignore covers the normal case where a PR was opened instead and the file was never written) — so a "nothing to do" outcome is visible in the run's artifacts rather than just silently vanishing.
  • Adds CLAUDE.md instructing that in-code comments stay to 1 line, so this applies both to interactive Claude Code use and to the doc-sync automation. Not AGENTS.md: this repo's .gitignore deliberately keeps AGENTS.md local-only (grouped with other "not for commit" entries), which would mean it never reaches doc-sync's CI checkout at all — CLAUDE.md isn't gitignored and Claude Code reads it the same way.

🤖 Generated with Claude Code

abueide and others added 5 commits August 27, 2026 11:24
The previous real doc-sync run failed with "401 API key is invalid" -
adds a step that prints ANTHROPIC_API_KEY's length (never its value)
right before the real Claude step, to confirm the freshly-replaced
secret is actually reaching the runner.

Also adds a separate smoke-test job on push to abueide/** so this can
be checked by just pushing a commit, rather than needing to merge a
real, approved PR each time - push events have no PR to gate on or
diff against, so it's a distinct job with its own minimal prompt
rather than reusing doc-sync's PR-dependent steps.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Removes the temporary ANTHROPIC_API_KEY length check from the real
  doc-sync job now that the push-triggered smoke test has confirmed
  the replaced secret authenticates correctly.
- Prompt now explicitly instructs Claude to only update EXISTING
  documentation and never create new docs/README sections that didn't
  already exist before the merged PR.
- When no existing docs are relevant, Claude records that decision to
  doc-sync-decision.md instead of silently doing nothing - a new step
  uploads it as a job artifact (if-no-files-found: ignore covers the
  normal case where a PR was opened instead and no file was written).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Removes the smoke-test job and its push-to-abueide/** trigger now that
it's served its purpose (confirmed the API key works) - doc-sync is
back to its original single-job, pull_request_target-only shape.

Adds CLAUDE.md instructing in-code comments stay to 1 line, so Claude
follows it both for interactive use and for the doc-sync automation.
Not AGENTS.md: this repo's .gitignore deliberately keeps AGENTS.md
local-only (grouped with other "not for commit" entries), which would
mean it never reaches doc-sync's CI checkout at all. CLAUDE.md isn't
gitignored and Claude Code reads it the same way.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Follows the CLAUDE.md rule added in the previous commit - collapses
the four multi-paragraph header comments and the artifact-upload
comment down to a single line each, moving the dropped detail to PR
descriptions instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Four single-line comments in a row at the file header read as one
4-line comment in practice. Distributes each to sit directly next to
the line it explains (trigger choice, approval gate, CLI install)
instead, and drops the purely-descriptive one that just restated what
the workflow/job/step names already say.

Also tightens CLAUDE.md's wording so this doesn't happen again: a
comment must be a single line AND not stacked with others as a
paragraph substitute.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@abueide
abueide merged commit 49b7890 into master Aug 28, 2026
9 checks passed
@abueide
abueide deleted the abueide/doc-sync-debug-api-key-length branch August 28, 2026 15:45
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