Skip to content

test(github_intent): cover classification normalization edge cases#3

Draft
Koan-Bot wants to merge 1487 commits into
mainfrom
koan.atoomic/github-intent-edge-tests
Draft

test(github_intent): cover classification normalization edge cases#3
Koan-Bot wants to merge 1487 commits into
mainfrom
koan.atoomic/github-intent-edge-tests

Conversation

@Koan-Bot

Copy link
Copy Markdown
Owner

What: Add 8 behavioral edge-case tests for github_intent._parse_classification.

Why: app/github_intent.py was already at 100% line/branch coverage, but several distinct input→output behaviors of the classification-normalization path had no asserting test. Those branches were executed by existing tests without their specific outcomes being pinned, leaving the coercion/normalization logic open to silent regression.

How: New cases assert: non-string command/context coercion via str(), whitespace-only and /-only commands normalizing to None, context whitespace stripping, nested-brace context extraction (rfind must grab the outermost }), unlabeled code-block parsing, and whitespace-only output returning None.

Testing: pytest koan/tests/test_github_intent.py — 28 passed (was 20), coverage stays 100% line + branch. ruff clean.

Koan-Bot and others added 30 commits June 16, 2026 20:59
Add defense-in-depth is_unlimited_quota() guards inside both
_maybe_warn_burn_rate() and _downgrade_if_burning_fast() so burn-rate
alerts and mode downgrades are suppressed even if the caller's budget_mode
gate fails to resolve correctly.
…ent-1986

feat(skills): add /debug skill with 4-step hypothesis loop
…ss-burn-rate-unlimited-quota

fix(burn-rate): suppress warnings when unlimited_quota is set
Add resolve_project_alias() fallback to 16 skill handlers that accept
project names as arguments but only matched exact project names.

Skills fixed: ai, deep, magic, branches, autoreview, brainstorm,
incident, plan, deepplan, changelog, claudemd, done, explore,
gha_audit, stats, diagnose.

Pattern: exact name match first, then alias fallback — consistent
with resolve_project_name_and_path() already used by audit, doc,
profile, dead_code, spec_audit, private_security_audit, tech_debt.
Move alias resolution before the show_perf early-return branch so
/stats alias --perf correctly maps to the canonical project name.
Previously the perf branch returned before alias resolution happened,
causing empty results when using aliases.
Make is_unlimited_quota() resilient to malformed config (non-dict usage
section) and fix the budget_mode exception fallback in plan_iteration()
to respect unlimited_quota — previously defaulted to "session_only"
even when unlimited_quota was set, causing spurious warnings/downgrades.
…ats-perf-alias

fix(stats): resolve project aliases in --perf mode
…er-unlimited-quota-helper

fix(quota): harden is_unlimited_quota() helper and budget_mode fallback
New status-group skill that displays current server date and time
in a human-friendly format (e.g. 🕐 Tuesday June 17, 2026 — 16:15:42).
…me-skill

feat(skill): add /time core skill with /date alias
Add post_threaded_reply() that threads replies to the original comment:
PR review comments use GitHub's native in_reply_to threading, issue
comments include a blockquote for visual context.

Post brief acknowledgment replies when commands are queued from GitHub
@mentions (e.g. "🤖 /review queued"), so users aren't left waiting
with only a reaction. Configurable via github.ack_enabled (default on).

Update /ask skill and natural-language reply paths to use threaded
replies instead of top-level comments.
…ubmission

Add an `approved` boolean (default: true) to the `review_verdict` config
section. When disabled, review comments and PR feedback are still posted
but the formal APPROVE/REQUEST_CHANGES status is not submitted via the
GitHub API.

The setting can be overridden per-project in projects.yaml via the
`review_verdict` key under each project entry, following the same
defaults-merge pattern as security_review.
Add `parallel_sub_commands` field to `Skill` dataclass, parsed from
`parallel: true` in SKILL.md frontmatter. Introduce `ComboSkill`
namedtuple as the return type of `collect_combo_skills()`, carrying
both the command list and the parallel flag.

Update `expand_combo_skill()` to batch-insert all sub-missions
atomically via `modify_missions_file()` when parallel is set,
while preserving the existing sequential insertion for non-parallel
combo skills.

Closes Anantys-oss#1988

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New core skill that queues /security_audit, /dead_code, and /profile
as parallel missions via the new parallel combo infrastructure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add parallel combo skill documentation to skills README (frontmatter
table + dedicated section with usage example and branch-independence
warning). Add audit_all to user manual and skills reference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cover parallel batch insertion, URL-based dedup, no-project-tag handling,
existing-mission preservation, ComboSkill namedtuple creation, and
parallel flag parsing from SKILL.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add branch name to /status header: 'main - v0.76@abc +458' format.
New get_branch() in version.py, graceful fallback when git unavailable.
…-show-branch

feat(status): show current branch in header
atoomic and others added 28 commits June 24, 2026 15:58
…ent-1660

Implement: Expose usage, metrics, and log-tail endpoints in the REST A
…s warning

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…llama-launch)

Removes the 'local' provider, its homegrown agentic runner, and every
registry/onboarding/diagnostics/status reference. A stale cli_provider:
local config now logs a clear startup warning and falls back to claude.
ollama-launch is unchanged; the standalone 'make ollama' path keeps an
'ollama' sentinel so ollama serve still starts.

BREAKING CHANGE: cli_provider: local is no longer supported; importing
LocalLLMProvider from app.cli_provider/app.provider now raises ImportError.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ent-1819

Remove deprecated local CLI provider (preserve ollama-launch)
Introduces a messaging.level setting with two values — debug (legacy
firehose) and normal (new default: quiet, operator-focused). In normal
mode the bridge stops narrating mission lifecycle, collapses GitHub/Jira
per-mention chatter into a single aggregate count, and reports finished
tracked skill missions as one scannable line with the PR URL. Failures
and command replies still pass; every suppressed message is still logged.

- messaging_level.py: env > state file > config.yaml > "normal" resolution
  + debug_only() gating helper (always logs, conditionally sends)
- config.py: get_configured_messaging_level[_explicit]()
- /messaging_level skill (alias /msglevel) to toggle live
- run.py: concise normal-mode completion line; debug keeps verbose summary
- loop_manager/jira: gate per-mention sends, emit aggregate counts
- mission_executor: gate mission-start lines
- startup_manager: one-time normal-default advisory (sentinel-gated)
- docs + instance.example config

Closes Anantys-oss#2064

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(docker): recommend prebuilt GHCR image
…ent-2043

perf(quota): share one BurnRateSnapshot in /quota burn-rate line
…ent-2064

Implement: Reduce verbosity from Telegram / Slack
When a user configured Slack (KOAN_SLACK_* env vars) but left
messaging.provider unset, resolution defaulted to telegram. The bridge then
emitted 'Set KOAN_TELEGRAM_TOKEN and KOAN_TELEGRAM_CHAT_ID env vars.' and
exited — despite a bridge platform being set up.

resolve_provider_name() now infers a non-telegram provider when exactly one
has credentials present (slack/matrix/discord via env, matrix/discord via
config block). Explicit env/config still wins; ambiguous setups keep the
telegram default. The spurious warning only fires when no platform is connected.
When the Telegram bridge ran a background task (worker skill, GitHub
notification parsing), incoming chat messages were rejected with
"⏳ Busy" because chat replies and background work shared a single
worker lane. Split `_run_in_worker` into two concurrent named lanes —
`chat` (interactive, notifies when busy) and `bg` (background, silent
when busy). Worker skills now dispatch on the `bg` lane so a long
background task no longer silences the chat channel. No extra process
is forked; both lanes are daemon threads inside the bridge.

Closes Anantys-oss#2099

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
When the project being prepared resolves to the same repo as KOAN_ROOT
(self-hosting) and it is on a non-base branch, prepare_project_branch now
leaves it in place instead of checking out and resetting to the base branch.
This lets an operator test a development branch of the launching repo without
Koan switching it back to main. All other managed projects still reset to
their base branch before each mission.
…ent-2099

feat(bridge): split worker into chat and bg lanes
…aunching-repo-branch

fix(git-prep): keep launching repo on its custom branch
…malization

Module was already at 100% line/branch coverage. These 8 cases assert
distinct input->output behaviors not previously covered: non-string
command/context coercion, whitespace/slash-only command normalizing to
None, nested-brace context extraction, and unlabeled code-block parsing.
Guards the normalization logic against regressions.
Koan-Bot added a commit that referenced this pull request Jul 11, 2026
Add _flatten_github_alerts() folding `> [!TYPE]` blocks into plain
`TYPE: text`. Wire it into _strip_markdown_for_jira() (plan path) and the
Jira branches of build_pr_comment_success/_failure (PR path). The GitHub
branches keep native alert rendering. Regression tests pin all 5 kinds,
the PR-comment Why-line leak, and the pr_submit bypass-path body.

Audit of criterion #3: jira_add_comment() is the raw ADF poster, left
as-is (flattening it would mangle human /comment blockquotes); all
Koan-generated Jira bodies are flattened at the builder layer upstream.

Closes Anantys-oss#2305

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
BabyKoan pushed a commit that referenced this pull request Jul 11, 2026
Add _flatten_github_alerts() folding `> [!TYPE]` blocks into plain
`TYPE: text`. Wire it into _strip_markdown_for_jira() (plan path) and the
Jira branches of build_pr_comment_success/_failure (PR path). The GitHub
branches keep native alert rendering. Regression tests pin all 5 kinds,
the PR-comment Why-line leak, and the pr_submit bypass-path body.

Audit of criterion #3: jira_add_comment() is the raw ADF poster, left
as-is (flattening it would mangle human /comment blockquotes); all
Koan-generated Jira bodies are flattened at the builder layer upstream.

Closes Anantys-oss#2305

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

6 participants