Skip to content

Fix/release pipeline - #20

Merged
dpalfery merged 24 commits into
developfrom
fix/release-pipeline
Aug 12, 2026
Merged

Fix/release pipeline#20
dpalfery merged 24 commits into
developfrom
fix/release-pipeline

Conversation

@dpalfery

Copy link
Copy Markdown
Owner

Summary

Test plan

  • dotnet build KyberWeave.sln -c Release
  • dotnet test tests/KyberWeave.Tests/KyberWeave.Tests.csproj -c Release
  • Manual checks (describe if needed):

Checklist

  • Linked issue (if applicable): #
  • Docs / samples updated when user-facing behavior changes
  • No secrets or credentials in the diff

dpalfery and others added 19 commits August 1, 2026 13:43
The documentation led with skills and agents, which buried the feature that
carries the project's unique value. Restructure around three features, and
close the gap that made the primary one unadoptable.

Documentation, now a self-governing corpus:

  Feature 1  DocGraph        the ontology, its gates, the in-memory retrieval
                             graph, and the MCP server
  Feature 2  ContextHygiene  skill and agent-harness governance, plus the
                             shared instruction-surface scanner
  Feature 3  CI Pipelines    the diagnostic engine every gate reports through

Everything under docs/ now carries conformant frontmatter and passes
`docs validate` and `docs drift` with zero findings, via a .kyber-weave/
config that moves docs-root to docs/ and clears the inherited DevOps
exclusions. README becomes a router; install guidance is curl-only, and the
CI templates move off npm pinning to the install script.

Adoption path — previously absent:

`docs init` scaffolds host config, the catalog that supplies the component
and owner vocabularies, and the ontology reference. That last file closes a
real bug: every KW-DOC-SPEC-001 diagnostic told authors to read
<docs-root>/documentation-ontology.md, which the tool never produced.

It then deploys the kyber-weave-docs authoring skill through APM, defaulting
to the agent-skills target (.agents/skills/). APM is an expected dependency
and is never auto-installed; when absent, the corpus is still scaffolded and
the manual command is printed.

The skill is shipped as an APM package and governed by our own gates —
skill validate and scan clean, routing score 100/100.

Verified: 144 tests pass (+15), docs validate and docs drift clean, and a
scratch host repo initialises to a corpus that validates immediately.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Five AGENTS.md files, layered so each answers only what its directory makes
true. Product knowledge stays in docs/ and is linked, never restated.

  /                          commands, non-negotiables, routing table
  src/KyberWeave.Core        ports vs adapters, rule-id permanence, deps
  src/KyberWeave.Cli         command+settings pairing, exit codes, stdout
  src/KyberWeave.Mcp         stdout is JSON-RPC; log to stderr only
  tests/KyberWeave.Tests     fakes vs the real sqlite fixture, fixtures

Each has a paired CLAUDE.md that only points at its AGENTS.md, so the
guidance has a single home.

Root AGENTS.md directs agents to query the corpus through docs_explore
rather than grepping docs/, which is the progressive-disclosure path: the
routing table names where to go, and the corpus answers what things are.

Nothing is placed under docs/ — files there are loaded by DocumentLoader
and would need conformant frontmatter and compete in retrieval; docs/README.md
already serves as the corpus index.

Note recorded in the root file: `apm compile` generates AGENTS.md and
CLAUDE.md at these exact paths and would overwrite them. This repository uses
APM only for skill distribution via `apm install`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
apm compile writes AGENTS.md, CLAUDE.md, GEMINI.md,
.github/copilot-instructions.md and a file per harness. That behaviour is
APM's, but what aimed it at this repository was ours: apm.yml left `targets:`
commented out, so APM auto-detected from the .github/ and .claude/ folders
present and resolved to `all`.

Pinning `targets: [agent-skills]` scopes compile to .agents/skills/, which
produces no compile output, so the hand-authored AGENTS.md and CLAUDE.md files
are safe.

Verified with a real (non-dry-run) compile against a copy of this tree: both
files byte-identical afterwards, no harness files generated.

Consumers are unaffected — --target outranks apm.yml in APM's resolution
chain, confirmed by installing with --target claude against a pinned manifest
and seeing it deploy to .claude/skills/. `docs init` always passes --target
explicitly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Reading one redirected stream to the end and then the other deadlocks: an OS
pipe buffer is finite, so a child that fills the stream the parent is not yet
reading blocks on write, while the parent blocks on a read that can never
complete. `docs init` would hang instead of deploying or skipping the skill.

The same bug class was present in three places:

  DocsInitCommand      sequential ReadToEnd on both streams
  CodeGraphResolver    same, and it drains the whole node table, so stdout is
                       large by design and stderr sits unread behind it
  CodeGraphFixtureDb   worse — WaitForExit() with both pipes redirected and
                       neither drained

Centralised into Core/Processes/ProcessRunner, which starts both reads before
awaiting either, then waits for exit once both streams are at EOF.

ProcessRunnerTests covers a child writing 300 KB to each stream and the
asymmetric large-stdout case. The capture runs on a worker with a 30s bound so
a regression fails with a diagnostic rather than hanging CI forever — verified
by reintroducing the sequential reads, which times out exactly as intended.

The generator reads /dev/zero rather than piping `yes` into `head`; the latter
leaves `yes` writing to a closed pipe, and its "Broken pipe" message adds 25
stray stderr bytes per invocation.

Recorded in src/KyberWeave.Core/AGENTS.md — three independent occurrences is
enough to make it a stated convention.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deployed into this tree by APM during development and picked up by a
'git add -A'. It is a general-purpose review skill, unrelated to this
branch, and is generated output rather than repository source.

Untracked with --cached so the working copy is left in place; track it
deliberately elsewhere if that is wanted.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…values

Two findings from review of this branch, both reproduced before fixing.

Path containment (medium). --docs-root reached Path.Combine unchecked.
Path.Combine returns its second argument outright when that argument is
rooted, and '..' segments walk upward, so `docs init . --docs-root
/tmp/pwned` wrote catalog.md and documentation-ontology.md outside the
repository entirely. Verified by reproduction, not inspection.

RequireContained canonicalises and refuses anything landing outside the root.
It runs once up front against the resolved docs root and again per write. The
up-front check is not redundant: the host config resolves inside the root, so
a per-write-only check created it successfully and left it behind pointing at
a docs root rejected a moment later. Rejection is now all-or-nothing.

Value injection (low). owner and docs-root were interpolated raw into YAML
frontmatter and into the pipe-delimited catalog row, so a newline added a key
and a pipe shifted the columns the component and owner vocabularies are read
from. RequireEmittableValue rejects control characters, '|' and '"'.
Rejecting beats escaping here — two output formats would need two escapes,
and silently rewriting what the operator typed is worse than stopping.

DocsInitCommand catches ArgumentException so both surface as a red message
and exit 1 rather than an unhandled crash.

Nine tests cover relative escape, absolute escape, each injecting character,
that nothing is written on rejection, and that ordinary values still work.

Also ignores .agents/ and apm_modules/ — APM deploy targets holding generated
output, including skills from unrelated packages. One such skill was swept
into a commit on this branch by a `git add -A` and untracked in the previous
commit; this stops it recurring.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Manual Run workflow now takes a SemVer input and creates the v* tag plus
GitHub Release at that commit, so a dry-run checkbox alone is not a no-op.

Co-authored-by: Cursor <cursoragent@cursor.com>
…issions

feat: add GitHub Copilot configuration file
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml
@kilo-code-bot

kilo-code-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

Code Review Roast 🔥

Verdict: 4 Issues Found | Recommendation: Address before merge

Overview

Severity Count
🚨 critical 0
⚠️ warning 2
💡 suggestion 1
🤏 nitpick 1
Issue Details (click to expand)
File Line Roast
.github/workflows/ci.yml 8 A de-duplication PR that opens with a duplicated 7-line header comment
.github/workflows/ci.yml 25 Memorial blank line where the duplicate schedule: block was amputated
.github/workflows/ci.yml 90 Format + vulnerability-audit steps duplicated — CI runs a matinee and evening show
.github/workflows/ci.yml 231 Unexplained CodeQL action SHA flip (also line 250) in the security-gates file

🏆 Best part: Removing the duplicate schedule: and permissions keys was the right surgery, .vscode/mcp.json is a correctly formed VS Code MCP config, and the net diff is admirably tiny. I almost went home early.

💀 Worst part: The 31-line duplicate step cluster at ci.yml:90 — the PR whose entire résumé says "removes duplicates" shipped the biggest duplicate of all.

📊 Overall: Like a locksmith who locks himself out — the right tools, a confident attitude, and a door that still won't open cleanly.

⚠️ Assumptions: (1) PR check-run status is outside this reviewer's permitted command surface, so CodeQL job completion could not be verified before publication; the review is based on the diff at HEAD ea3b32a. (2) The earlier commits in the branch series largely duplicate content already present in develop; review scope was the net base…head diff (2 files).

Fix these issues in Kilo Cloud

Files Reviewed (2 files)
  • .github/workflows/ci.yml - 4 issues
  • .vscode/mcp.json - 0 issues

Reviewed by kimi-k3 · Input: 132.4K · Output: 24.9K · Cached: 431.6K

@dpalfery
dpalfery merged commit 714f187 into develop Aug 12, 2026
13 checks passed
@dpalfery
dpalfery deleted the fix/release-pipeline branch August 12, 2026 01:30
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