Skip to content

feat(docs-sync): run DeepSeek V4.1 Flash at max effort and open per-surface PRs - #14085

Closed
iscekic wants to merge 1 commit into
mainfrom
kwf/docs-sync-surface-prs-34e3
Closed

iscekic wants to merge 1 commit into
mainfrom
kwf/docs-sync-surface-prs-34e3

Conversation

@iscekic

@iscekic iscekic commented Sep 13, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog for users

  • The docs-sync bot now runs its triage, edit, and learnings calls on DeepSeek V4.1 Flash at maximum reasoning effort.
  • Auto-docs changes open one pull request per product surface plus one other pull request, instead of a single rolling pull request.
  • Each pull request carries only its surface's doc changes, and every changed file appears in exactly one pull request.
  • Each product-surface pull request is assigned to and requests review from the two most active recent contributors to that surface; the other pull request uses lambertjosh and intentionally-left-nil.
  • Every pull request body states how its surface was derived, which paths fall to other, and how its reviewers were computed.
  • Deleting a doc page now carries the deletion into that page's surface pull request instead of failing the surface.
  • One surface failing does not block the others; the full change set stays on the integration branch and the watermark does not advance past uncovered pull requests.
  • A workflow_dispatch dry run still collects and triages and opens no pull request.

Changelog for maintainers

  • Review hint: surfaces.json is the committed surface map (cli, vscode, jetbrains, gateway, web, plus other), and a path resolves to exactly one surface by longest prefix match; upsert-pr.mjs rebuilds each surface branch in a throwaway worktree so a doc file lands in exactly one pull request and human commits survive; prepare-branch.mjs keeps docs/auto-sync as the integration base and pushes the tree to the sibling ref docs/auto-sync-integration; reviewers.mjs ranks contributors with a 180-day half-life and drops bots and non-writers, replacing DOCS_OWNER; lib.mjs exports REASONING_VARIANT, the workflow cites the Kilo gateway DeepSeek id with --variant max at every kilo run call site, and model-config.test.mjs plus surfaces.test.mjs cover the wiring, with the selftest job running every .github/docs-sync/*.test.mjs.
  • .github/docs-sync/upsert-pr.mjs:460 — accepted and fixed: git checkout cannot apply a deletion, so the branch runs git rm -rf --ignore-unmatch on the deleted paths first and then restores the rest from the integration tree; selftest case 16 covers a deletion and an added page landing on the same surface branch.
  • .github/docs-sync/reviewers.mjs:124 — rejected, no change: a failed permission lookup is caught and degrades to the documented explanatory note, so it never assigns a wrong person.
  • .github/docs-sync/prepare-branch.mjs:211 — rejected, no change: the stale remote-tracking ref must be removed for the surface branches to coexist with docs/auto-sync, and the cleanup only warns when it fails.
  • .github/docs-sync/reviewers.mjs:109 — rejected, no change: the commit mapping skips a commit with no linked GitHub account, which is the intended reviewer-candidate behavior.
  • .github/docs-sync/upsert-pr.mjs:580 — accepted: learn.mjs learns corrections from every open surface pull request, not just the first, and patches each pull request's learned-through marker; case 17 covers it.
  • .github/docs-sync/upsert-pr.mjs:695 — accepted: a skipped surface refreshes its open pull request's processed-through marker, and the watermark comes from the most recently updated pull request; cases 19-20 cover it.
  • .github/docs-sync/prepare-branch.mjs:203 — accepted: the legacy docs/auto-sync branch is deleted whenever it exists, not only when an open legacy pull request exists; case 18 covers it.

E2E proof

No live proof applies: the change is offline GitHub Actions docs-sync scripting, and the repair touches only learn.mjs, prepare-branch.mjs, selftest.mjs, upsert-pr.mjs, and watermark.mjs, so there is no runtime surface to record. This replaces the earlier selftest proof claim: the superseded cases 12-15 statement gives way to the selftest cases 16-20, which cover the page deletion, per-pull-request learnings, legacy-ref cleanup, and skipped-surface marker refresh.

Owner manual verification

The workflow skipped these checks. Owner verification is pending; these checks did not pass automatically.

  • live gateway proof: dispatch the real workflow with dry_run=true (gh workflow run docs-sync.yml -f dry_run=true) and confirm triage runs with kilo/deepseek/deepseek-v4.1-flash --variant max, which requires KILO_API_KEY and KILO_ORG_ID plus org entitlement to the DeepSeek model; do not open PRs or real review requests.
Owner request

Surface: the docs sync GitHub Action in this repo (.github/workflows/docs-sync.yml and .github/docs-sync/*.mjs).

Make two changes to it.

  1. Change the model to DeepSeek 4.1 Flash at maximum reasoning effort.
  • TRIAGE_MODEL and EDIT_MODEL are set at .github/workflows/docs-sync.yml:44-45, today ${{ vars.DOCS_SYNC_TRIAGE_MODEL || 'kilo/moonshotai/kimi-k3' }} and the same for the edit model. Change both defaults to DeepSeek 4.1 Flash and keep the repository-variable override.
  • Find the exact provider/model id the kilo CLI accepts for DeepSeek 4.1 Flash, and the exact flag or env the CLI takes for reasoning effort; set the effort to its maximum. Do not guess an id: read the CLI's model list or its docs and cite where you got it. triage.mjs, edit.mjs and learn.mjs each read these env values, so check every call site (-m "$MODEL" and the args: arrays) and pass the effort the same way in all three.
  1. Segment the created pull requests by product surface, instead of one rolling PR.
  • Today .github/docs-sync/upsert-pr.mjs maintains ONE rolling PR and assigns it, and requests review from, a single DOCS_OWNER.
  • Produce one PR per product surface, plus one other PR for everything that fits no surface. Each PR carries only that surface's doc changes; a doc file belongs to exactly one PR.
  • Enumerate the product surfaces yourself from the repository, and write the enumeration down as data the action reads (a committed map from doc paths and/or source paths to a surface name), not as a hard-coded list inside a function. Derive the surfaces from how the repo is actually laid out (the docs tree, the packages/apps, the extension/CLI/web/mobile split, and the existing labels or CODEOWNERS if they carry surface names). State in the PR body how you derived them and which paths fall to other.
  • For each product-surface PR, assign it to and request review from the TWO people who touch that surface most. Derive them from the git history of that surface's source paths (recent commits weigh more than old ones; exclude bots and people with no write access). Say in the PR body how the two were computed.
  • Everything under other is assigned to and reviewed by https://github.com/lambertjosh and https://github.com/intentionally-left-nil.
  • Running the per-surface jobs in parallel is fine and preferred. The rolling-branch machinery (prepare-branch.mjs, the watermark, the auto-docs label, the learnings loop) must keep working; one surface failing must not lose another surface's changes or stall the watermark.

Constraints and proof.

  • A dry run (workflow_dispatch with dry_run) must still collect and triage without editing or opening a PR.
  • .github/docs-sync/selftest.mjs must pass, and extend it to cover the new segmentation: a fixture change set that spans two surfaces plus an unmapped file produces three PRs with the right assignees and reviewers, and no file appears twice.
  • Prove the action end to end without spamming the repo: run it against a scratch branch or a fork, or with the GitHub API calls stubbed in the selftest, and show the computed surface map, the per-surface assignee pairs, and the PR bodies. Do not open real review requests to people while testing.
  • If a needed token or repository variable is missing, name it in the PR body rather than working around it.

Comment thread .github/docs-sync/reviewers.mjs
Comment thread .github/docs-sync/prepare-branch.mjs Outdated
Comment thread .github/docs-sync/upsert-pr.mjs Outdated
Comment thread .github/docs-sync/reviewers.mjs
@iscekic
iscekic marked this pull request as draft September 13, 2026 11:31
@iscekic
iscekic force-pushed the kwf/docs-sync-surface-prs-34e3 branch from 498940a to 15828c6 Compare September 13, 2026 11:46
@iscekic
iscekic marked this pull request as ready for review September 13, 2026 11:55
Comment thread .github/docs-sync/upsert-pr.mjs
Comment thread .github/docs-sync/upsert-pr.mjs
Comment thread .github/docs-sync/prepare-branch.mjs Outdated
@kilo-code-bot

kilo-code-bot Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file, incremental delta)
  • .github/docs-sync/selftest.mjs - new case 21 mirrors the existing surface-segmentation fixtures; helpers (startSurfaceStub, setupSurfaceRepo, runUpsert, readStubLog, pairFor) are used consistently, the stub child is killed in finally, and the assertions cover exactly three surface PRs, the per-surface assignees/reviewers, and that no changed file appears twice.
Previous Review Summaries (2 snapshots, latest commit 64df058)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 64df058)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (5 files, incremental delta)
  • .github/docs-sync/learn.mjs
  • .github/docs-sync/prepare-branch.mjs
  • .github/docs-sync/selftest.mjs
  • .github/docs-sync/upsert-pr.mjs
  • .github/docs-sync/watermark.mjs

Previous review (commit 15828c6)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
.github/docs-sync/upsert-pr.mjs 580 learn.mjs still reads a single auto-docs PR, so corrections on the other surface PRs are missed
.github/docs-sync/upsert-pr.mjs 695 Skipped surfaces keep an older processed-through marker, and watermark.mjs reads the newest-created PR's marker, so the watermark can regress or pin
.github/docs-sync/prepare-branch.mjs 203 Legacy docs/auto-sync ref is deleted only when an open legacy PR exists, so a lingering ref blocks every docs/auto-sync/<surface> push
Files Reviewed (15 files)
  • .github/docs-sync/edit.mjs - no new issues
  • .github/docs-sync/learn.mjs - single-PR assumption noted via upsert-pr.mjs:580
  • .github/docs-sync/lib.mjs - no issues
  • .github/docs-sync/model-config.test.mjs - no issues
  • .github/docs-sync/prepare-branch.mjs - 1 issue
  • .github/docs-sync/reviewers.mjs - no new issues
  • .github/docs-sync/selftest.mjs - no new issues
  • .github/docs-sync/surfaces.json - no issues
  • .github/docs-sync/surfaces.mjs - no issues
  • .github/docs-sync/surfaces.test.mjs - no issues
  • .github/docs-sync/triage.mjs - no issues
  • .github/docs-sync/upsert-pr.mjs - 2 issues
  • .github/workflows/docs-sync.yml - no issues; --variant max is a valid kilo run flag (packages/opencode/src/cli/cmd/run.ts:226), but the DeepSeek id itself is only asserted as a literal by model-config.test.mjs and cannot be verified from the committed model fixture
  • bun.lock - no functional change (entry reordering only)
  • patches/ghostty-web@0.3.0.patch - deletion of an orphaned 0.3.0 patch (repo now pins ghostty-web 0.4.0; no patchedDependencies entry); safe but unrelated to this PR

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic marked this pull request as draft September 13, 2026 12:06
@iscekic
iscekic force-pushed the kwf/docs-sync-surface-prs-34e3 branch from 15828c6 to 64df058 Compare September 13, 2026 12:37
@iscekic
iscekic marked this pull request as ready for review September 13, 2026 12:43
@iscekic iscekic added the human-ready PR is ready for a human review. label Sep 13, 2026
@iscekic iscekic self-assigned this Sep 13, 2026
@iscekic
iscekic force-pushed the kwf/docs-sync-surface-prs-34e3 branch from 64df058 to 68567d8 Compare September 13, 2026 15:58
@iscekic
iscekic added this pull request to stack #14092 September 13, 2026 17:21
@iscekic

iscekic commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #14093, which now targets main directly and carries a superset of this change.

#14093 has the same docs-sync work — the surface map, per-surface PRs, the reviewer ranking, the max-effort model config, the bun.lock change and the orphan ghostty-web patch removal — plus two additions: the cloud repo's product surfaces (their docs live in this repo, so they were falling to the other catch-all), and the rule that legacy dated docs/auto-sync-<date> PRs are ignored rather than commented on and closed.

Three open PRs were implementing one feature. Collapsing to one. Any review finding raised here still applies and should be re-checked against #14093.

@iscekic iscekic closed this Sep 13, 2026
@iscekic iscekic removed the human-ready PR is ready for a human review. label Sep 14, 2026
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