Skip to content

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

Closed
iscekic wants to merge 2 commits into
kwf/docs-sync-surface-prs-34e3from
kwf/docs-sync-14085-proof-dcaf
Closed

iscekic wants to merge 2 commits into
kwf/docs-sync-surface-prs-34e3from
kwf/docs-sync-14085-proof-dcaf

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

  • Deleted patches/ghostty-web@0.3.0.patch: no dependency in the tree is patched with ghostty-web, so bun install prunes the orphan patch file.
  • The trustedDependencies and patchedDependencies lists in bun.lock are reordered because bun install rewrites those lists in its own order; the dependency set is unchanged.
  • 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

Offline proof, the action's own selftest: node .github/docs-sync/selftest.mjs, case 21. A fixture change set spanning two product surfaces (cli, vscode) plus one unmapped file produces exactly three pull requests, one per surface, each carrying only its own changed file. The command opens no pull request and calls no live GitHub write API: every create, assignee call and review request below was captured from the action's own requests to a local stub. Raw output:

case 21 — two product surfaces plus one unmapped file
  computed surface map (changed file -> surface):
    packages/kilo-docs/pages/getting-started/new.md -> cli
    packages/kilo-docs/pages/code-with-ai/platforms/vscode/new.md -> vscode
    packages/kilo-docs/pages/community/new.md -> other
  pull request: docs/auto-sync/cli
    title: docs: auto-sync cli with merged PRs (through 2026-09-01)
    assignees: alice, bob
    requested reviewers: alice, bob
  pull request: docs/auto-sync/vscode
    title: docs: auto-sync vscode with merged PRs (through 2026-09-01)
    assignees: erin, frank
    requested reviewers: erin, frank
  pull request: docs/auto-sync/other
    title: docs: auto-sync other with merged PRs (through 2026-09-01)
    assignees: lambertjosh, intentionally-left-nil
    requested reviewers: lambertjosh, intentionally-left-nil
  ok: case21_twoSurfacesOneUnmapped

node .github/docs-sync/selftest.mjs ends with selftest: all cases passed. There is no owner manual check for this change.

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.
Owner request

Surface: the docs sync GitHub Action (.github/docs-sync/**). Update the body of PR #14085 and nothing else. Change no source file unless a test change is needed to produce the proof.

Two gaps in that PR body:

  1. The PR deletes patches/ghostty-web@0.3.0.patch and reorders the trustedDependencies and patchedDependencies lists in bun.lock, and the body does not say why. The reason: no dependency is patched with ghostty-web, so bun install prunes the orphan patch file and rewrites those lists in its own order. Add two lines to the body that state this. Do NOT restore the file and do not revert the lockfile.

  2. The body says "No live proof applies" and leaves an owner verification item asking a person to dispatch the workflow. That is wrong twice: the owner must never be handed work the workflow can do, and this action IS provable offline. Run .github/docs-sync/selftest.mjs against a fixture change set that spans two product surfaces plus one unmapped file, and capture its real output. Put that output in the body as the proof, showing: the computed surface map, the two assignees chosen per surface, the reviewers requested, and the title of each pull request the run would open. Then remove the owner verification item.

Rules: open no real pull request, request review from no real person, and call no live GitHub write API while proving it. The proof must be the selftest's own output, quoted, not a description of it.

…urface PRs

Surface: the docs sync GitHub Action (`.github/docs-sync/**`). Update the body of PR #14085 and nothing else. Change no source file unless a test change is needed to produce the proof.

Two gaps in that PR body:

1. The PR deletes `patches/ghostty-web@0.3.0.patch` and reorders the `trustedDependencies` and `patchedDependencies` lists in `bun.lock`, and the body does not say why. The reason: no dependency is patched with ghostty-web, so `bun install` prunes the orphan patch file and rewrites those lists in its own order. Add two lines to the body that state this. Do NOT restore the file and do not revert the lockfile.

2. The body says "No live proof applies" and leaves an owner verification item asking a person to dispatch the workflow. That is wrong twice: the owner must never be handed work the workflow can do, and this action IS provable offline. Run `.github/docs-sync/selftest.mjs` against a fixture change set that spans two product surfaces plus one unmapped file, and capture its real output. Put that output in the body as the proof, showing: the computed surface map, the two assignees chosen per surface, the reviewers requested, and the title of each pull request the run would open. Then remove the owner verification item.

Rules: open no real pull request, request review from no real person, and call no live GitHub write API while proving it. The proof must be the selftest's own output, quoted, not a description of it.
@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 files)
  • .github/docs-sync/selftest.mjs

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

Review guidance: REVIEW.md from base branch kwf/docs-sync-surface-prs-34e3

@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 commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

Folded into #14085: this branch's only commit added selftest case 21 (two product surfaces plus one unmapped file), which is the acceptance proof for #14085's own request. It belongs in that PR, not in a stacked one. The commit is now squashed into kwf/docs-sync-surface-prs-34e3.

@iscekic
iscekic force-pushed the kwf/docs-sync-surface-prs-34e3 branch from 64df058 to 68567d8 Compare September 13, 2026 15:58
@iscekic iscekic closed this Sep 13, 2026
@iscekic
iscekic deleted the kwf/docs-sync-14085-proof-dcaf branch September 13, 2026 15:58
@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