Skip to content

feat(adr-corner): add ADR pull request inventory - #7877

Merged
ifireball merged 6 commits into
fullsend-ai:mainfrom
ifireball:codex/adr-corner
Oct 5, 2026
Merged

ifireball merged 6 commits into
fullsend-ai:mainfrom
ifireball:codex/adr-corner

Conversation

@ifireball

Copy link
Copy Markdown
Member

Summary

  • add a skill-based /adr-corner command for open PRs that change ADRs
  • report one row per newly added ADR, with update-only fallback for human-attributed PRs
  • infer human attribution for bot-authored PRs and surface discussion excerpts and dates
  • exclude unattributed PRs that only modify existing ADRs

Validation

Generated with Codex.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Add /adr-corner inventory for open ADR pull requests

✨ Enhancement 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Add a read-only slash command to inventory open PRs that change ADRs.
• Report new ADRs first, with human-attributed update-only PRs as a fallback.
• Include author evidence, decision summaries, human discussion excerpts, and dates in Markdown or
 JSON.
Diagram

graph TD
  A["/adr-corner"] --> B["Inventory helper"] --> C["GitHub GraphQL"] --> D["ADR file filter"] --> E{"Human or added?"}
  E -->|include| F["Summaries and discussion"] --> G["Markdown or JSON"]
  E -->|exclude| H["Skip PR"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Use GitHub REST endpoints
  • ➕ PR file listing has straightforward endpoint pagination.
  • ➕ Avoids maintaining several GraphQL query definitions.
  • ➖ Requires more separate requests to assemble PRs, attribution evidence, discussions, and ADR contents.
  • ➖ Makes the inventory's cross-resource data gathering less cohesive.

Recommendation: Keep the dedicated, read-only GraphQL helper: it fits the existing skill-and-script pattern and gathers the related PR data without extending the much broader /nextwork workflow. REST is viable if GraphQL query limits become a practical constraint.

Files changed (6) +836 / -0

Enhancement (2) +600 / -0
adr-corner.mdExpose the /adr-corner slash command +20/-0

Expose the /adr-corner slash command

• Defines command arguments and delegates to the skill's read-only helper. It instructs the agent to preserve helper failures rather than invent results or mutate GitHub.

commands/adr-corner.md

adr_corner.pyGather and format open ADR PR inventory +580/-0

Gather and format open ADR PR inventory

• Uses the GitHub CLI and GraphQL to paginate open PRs and changed files, identify ADRs, infer human attribution, and retrieve ADR contents and discussion. Emits oldest-first Markdown or JSON rows, preferring newly added ADRs and excluding unattributed update-only PRs.

skills/adr-corner/scripts/adr_corner.py

Tests (2) +181 / -0
MakefileRun ADR Corner tests in the script-test target +1/-0

Run ADR Corner tests in the script-test target

• Adds the new Python test suite to the repository's script-test target.

Makefile

adr_corner_test.pyTest ADR identification and report selection rules +180/-0

Test ADR identification and report selection rules

• Adds network-free unit tests for ADR paths and summaries, attribution, inclusion and file precedence, discussion filtering, dates, ordering, GraphQL flags, and connection errors.

skills/adr-corner/scripts/adr_corner_test.py

Documentation (2) +55 / -0
customizing-with-skills.mdDocument workflow-oriented slash commands +6/-0

Document workflow-oriented slash commands

• Adds /adr-corner alongside /nextwork as an example of a repository skill exposed through a portable slash command.

docs/guides/user/customizing-with-skills.md

SKILL.mdDefine ADR inventory behavior and safeguards +49/-0

Define ADR inventory behavior and safeguards

• Documents report contents, attribution and inclusion rules, output formats, and the read-only treatment of untrusted PR text. It also explains how to handle unavailable GitHub network access.

skills/adr-corner/SKILL.md

@ifireball ifireball self-assigned this Sep 30, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 7:32 PM UTC · Completed 7:57 PM UTC

Commit: af8c5cd · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $5.90

@qodo-code-review

qodo-code-review Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Older human commits lose attribution ✓ Resolved
Description
PR_DETAILS_QUERY retrieves only the last 30 commits, while infer_adr_authors() examines only the
returned nodes. A bot-authored PR whose human commit falls earlier than that slice can be reported
with unknown attribution, or excluded entirely if it only updates ADRs and has no other attribution
source.
Code

skills/adr-corner/scripts/adr_corner.py[66]

+      commits(last: 30) {
Relevance

●●● Strong

Accepted precedent favors preserving complete gathered data; bounded commits can directly lose
required attribution.

PR-#6314

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The commits connection uses last: 30 with no pagination fields; inference iterates only those
nodes. should_include_adr_pr() then rejects an unattributed PR unless it adds an ADR.

skills/adr-corner/scripts/adr_corner.py[59-83]
skills/adr-corner/scripts/adr_corner.py[229-261]
skills/adr-corner/scripts/adr_corner.py[489-493]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The last-30-commits limit can hide the human author of a bot-authored ADR update.
## Fix Focus Areas
- skills/adr-corner/scripts/adr_corner.py[59-87]
- skills/adr-corner/scripts/adr_corner.py[229-261]
## Recommended Fix
Paginate commits when commit-based attribution is needed, retaining the existing attribution precedence. Test a human commit outside the initial 30-commit slice.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Routine comments hide review concerns ✓ Resolved
Description
discussion_points() places concern-bearing records first, then reverses the entire list before
selecting four excerpts. When four ordinary comments are present, they fill the report before an
earlier question or changes-requested review is considered.
Code

skills/adr-corner/scripts/adr_corner.py[322]

+    for record in reversed(selected):
Relevance

●●● Strong

The ordering reverses the intended priority, causing ordinary records to displace explicitly flagged
concerns.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The code concatenates hinted before other human records at line 319, but reversed(selected) at
line 322 visits the ordinary records first; the loop stops after limit excerpts at lines 329–330.

skills/adr-corner/scripts/adr_corner.py[313-330]
skills/adr-corner/SKILL.md[23-25]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Reversing the combined discussion list selects ordinary comments before prioritized concerns.
## Fix Focus Areas
- skills/adr-corner/scripts/adr_corner.py[313-331]
## Recommended Fix
Order records within each priority group as desired, then select from the concern group before ordinary comments. Add a test with a concern followed by at least four ordinary comments.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. ADR text can split report columns ✓ Resolved
Description
format_markdown() escapes pipes without first escaping backslashes already present in an ADR
summary or discussion excerpt. If that text contains \|, the output contains \\|, leaving the
pipe available as a table separator in Markdown rendering.
Code

skills/adr-corner/scripts/adr_corner.py[544]

+        lines.append("| " + " | ".join(cell.replace("|", "\\|") for cell in cells) + " |")
Relevance

●●● Strong

This is a deterministic Markdown correctness bug with an obvious local escaping fix.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Text normalization retains backslashes, and both ADR summaries and discussion excerpts flow into
table cells. The final replacement inserts one backslash before each pipe regardless of an existing
preceding backslash.

skills/adr-corner/scripts/adr_corner.py[159-172]
skills/adr-corner/scripts/adr_corner.py[270-283]
skills/adr-corner/scripts/adr_corner.py[498-521]
skills/adr-corner/scripts/adr_corner.py[532-544]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
An existing backslash before a pipe defeats the Markdown table-cell escaping.
## Fix Focus Areas
- skills/adr-corner/scripts/adr_corner.py[526-545]
## Recommended Fix
Escape existing backslashes before pipes, or encode pipes in table cells without backslash escaping. Test ADR and discussion text containing a backslash immediately before a pipe.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View medium (1)
4. Long reviews lose discussion excerpts ✓ Resolved
Description
PR_DISCUSSION_QUERY requests bounded slices of comments, reviews, threads, and thread comments
without cursors or pagination. On a PR exceeding any of those limits, fetch_pr_discussion()
supplies an incomplete history to the excerpt selector, so relevant concerns outside the returned
slices cannot appear.
Code

skills/adr-corner/scripts/adr_corner.py[105]

+      reviewThreads(first: 50) {
Relevance

●●● Strong

Accepted precedent favors lossless gathered data; fixed discussion slices directly omit relevant
review evidence.

PR-#6314

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The query caps comments and reviews at 50, threads at 50, and each thread's comments at 20; it
requests no page information. The fetch function executes that query once, and enrich_pr() uses
its result directly.

skills/adr-corner/scripts/adr_corner.py[89-115]
skills/adr-corner/scripts/adr_corner.py[445-453]
skills/adr-corner/scripts/adr_corner.py[489-509]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Fixed-size, unpaginated discussion connections silently omit review history.
## Fix Focus Areas
- skills/adr-corner/scripts/adr_corner.py[89-115]
- skills/adr-corner/scripts/adr_corner.py[445-453]
## Recommended Fix
Fetch subsequent pages for each discussion connection, including thread comments, before selecting excerpts. Test a concern that falls beyond an initial page.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 72 rules
✅ Cross-repo context — repo relationships
Review mode: ⚖️ Balanced: Downgraded extended -> standard: change is below the extended eligibility bar (hunks 6/18, lines 836/200; both must reach the floor). Router rationale: This adds a substantial GitHub-integrated runtime script with multiple independent paths—pagination, attribution, filtering, content parsing, discussion extraction, and formatting—plus tests and command integration, creating a high density of easy-to-miss behavioral defects.

Grey Divider

Tip of the day
💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread skills/adr-corner/scripts/adr_corner.py Resolved
Comment thread skills/adr-corner/scripts/adr_corner.py Resolved
Comment thread skills/adr-corner/scripts/adr_corner.py Resolved
Comment thread skills/adr-corner/scripts/adr_corner.py Resolved
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Site preview

Preview: https://690f39a9-site.fullsend-ai.workers.dev

Commit: 8ab2cd931218da164b0020709e663290455a0fa4

@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review fullsend-ai-review Bot added the risk/elevated PR risk: elevated label Sep 30, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Risk Assessment: elevated (3/5)

Details

Large diff touching protected skill paths and Makefile, combined with high regression history and multi-author contention on touched files, produces an elevated risk score.

Previous run

Risk Assessment: elevated (3/5)

Details

Elevated risk driven by a large diff (1,081 lines) touching protected skill paths and the shared Makefile, which exhibits high churn, regression history, and file coupling, offset by the largely additive nature of the new skill tooling and absence of dependency changes.

Previous run (2)

Risk Assessment: elevated (3/5)

Details

Elevated risk driven by a large diff (1,037 lines) touching protected skill paths and the shared Makefile, which exhibits high churn, regression history, and file coupling, offset by the largely additive nature of the new skill tooling and absence of dependency changes.

Previous run (3)

Risk Assessment: elevated (3/5)

Details

Elevated risk driven by a large diff (1,031 lines) touching protected skill paths and the shared Makefile, which exhibits high churn, regression history, and file coupling, offset by the largely additive nature of the new skill tooling and absence of dependency changes.

Previous run (4)

Risk Assessment: elevated (3/5)

Details

Elevated risk driven by a large diff (836 lines) touching protected skill paths and the shared Makefile, which shows high recent churn/regression history in this repo, offset by the fully additive, read-only, well-tested nature of the new skill tooling and no CI/dependency changes of its own.

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review

Findings

High

  • [protected-path] skills/adr-corner/SKILL.md — The PR modifies protected governance/infrastructure files: skills/adr-corner/SKILL.md, skills/adr-corner/scripts/adr_corner.py, skills/adr-corner/scripts/adr_corner_test.py. No authorizing issue is linked, so the PR lacks the justification required for modifying these protected files under the protected-path review policy. Human approval is required; this does not establish that the feature itself is unauthorized.
    Remediation: Provide linked scope/justification for the protected-file changes and obtain explicit human approval before merge.

Medium

  • [logic-error] skills/adr-corner/scripts/adr_corner.py:204 — Markdown normalization removes literal technical characters everywhere, including inside inline code, corrupting both ADR summaries and discussion excerpts. For example, created_at > watermark becomes created at watermark, and retries >= 3 becomes retries = 3. This changes the meaning of reported conditions rather than merely removing formatting.
    Remediation: Remove Markdown delimiters contextually while preserving inline-code contents, comparison operators, and identifier underscores. Restrict blockquote/header stripping to their structural positions and add regression tests covering technical expressions in summaries and discussions.

  • [logic-error] skills/adr-corner/scripts/adr_corner.py:228 — Every heading changes the active section, including subsections of Decision. An ADR containing ## Decision followed immediately by ### Backend therefore has an empty Decision section, causing the helper to fall back to Context. If Context says “Keep the old backend” and the Decision subsection says “Replace it with the new backend”, the summary reports the opposite decision.
    Remediation: Track heading levels and include nested subsection content in its enclosing Decision section until an equal-or-higher-level heading appears. Add a regression test with an immediately nested Decision subsection and conflicting Context text.

  • [injection-vuln] skills/adr-corner/scripts/adr_corner.py:660 — The Markdown encoder escapes pipes, backslashes, and newlines but leaves active Markdown and HTML in contributor-controlled ADR paths. A path such as docs/ADRs/<img src=https:&#47;&#47;attacker.example&#47;pixel>.md passes ADR-path classification and is emitted without literal-text encoding. In a renderer that permits HTML images, displaying the inventory could trigger an unsolicited external request. The filename-derived summary prefix is also emitted without literal-text encoding; actual rendering and network behavior were not verified.
    Remediation: Encode untrusted cell content as literal text, including filenames and summary prefixes. Build the intentional PR link and discussion separators separately from escaped data, and add tests for HTML tags, Markdown images, and entity-encoded URLs in ADR paths.

Low

  • [missing-authorization] skills/adr-corner/SKILL.md — The supplied PR body introduces the ADR inventory skill and slash command without linking a tracking issue that establishes agreed feature scope. Its PR references are presented as validation examples, not authorization. This is a scope-confirmation question for maintainers, not evidence that the feature is unauthorized.
    Remediation: If a tracking issue exists, link it; otherwise ask the reviewing maintainer to confirm the feature scope.

Labels: The PR introduces a new user-facing skill and slash command, matching the skills component and feature labels.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run

Review

Findings

High

  • [protected-path] skills/adr-corner/ — This PR adds files under the protected path skills/ (skills/adr-corner/SKILL.md, skills/adr-corner/scripts/adr_corner.py, skills/adr-corner/scripts/adr_corner_test.py). No issue is linked, and the PR description explains what the change does but not an authorization trail for modifying this governance/infrastructure path. Human approval is always required for protected-path changes. This finding has recurred unchanged across all prior review rounds on this PR.
    Remediation: Obtain explicit maintainer/human approval before merging. Link an issue or reference the discussion that authorizes this skill addition.

  • [sub-agent-failure] N/A — The correctness sub-agent did not return findings after two dispatch attempts (each timing out at 900s). This Opus-tier, safety-critical dimension (logic errors, edge cases, test adequacy) was not evaluated for the ~690-line new script and ~309-line test file in this run. The two low-severity findings from the prior review's correctness pass (slash-comment filtering in _comment_record, bot-login fixture coverage in the test suite) could not be re-verified against the current head and may or may not still apply — treat them as unconfirmed, not resolved.
    Remediation: Re-run the correctness sub-agent (or a manual correctness pass) against skills/adr-corner/scripts/adr_corner.py and skills/adr-corner/scripts/adr_corner_test.py before merging.

  • [sub-agent-failure] N/A — The security sub-agent did not return findings after two dispatch attempts (each timing out at 900s). This Opus-tier, safety-critical dimension was not evaluated for a script whose primary function is fetching and rendering untrusted GitHub PR/issue/comment content via gh api, with output intended to be printed verbatim as an agent-facing answer (per commands/adr-corner.md) — exactly the kind of surface this dimension exists to check (injection patterns, output encoding, read-only/mutation guarantees, subprocess argument handling).
    Remediation: Re-run the security sub-agent (or a manual security pass focused on injection defense and output encoding) against skills/adr-corner/scripts/adr_corner.py before merging.

Low

  • [sub-agent-failure] N/A — The challenger adversarial pass was skipped: the review's time budget dropped under the 600s threshold (~437s remaining) after two retry attempts on the correctness and security sub-agents. The finding set above is the pre-challenger merged set, not adversarially reviewed.

  • [provenance-warning] — Not applicable this run: PRIOR_REVIEW_PROVENANCE was app-verified, so severity anchoring against the prior review was attempted where sub-agents completed (docs-currency, style-conventions, risk-assessment). No finding to report here; included for completeness since the field exists in the inputs.

Dimensions that completed cleanly

  • docs-currency — no stale documentation found. The new ## Slash command section and author-evidence-source scoping in skills/adr-corner/SKILL.md (flagged in earlier review rounds) were independently re-verified as present/correct at the current head.
  • style-conventions — no findings (trivial scope, re-review with no prior findings in this dimension).
  • risk-assessment — elevated (3/5): large diff (1,081 lines) touching protected skill paths and the shared Makefile, with notable churn/regression history and file coupling in that area, offset by the largely additive nature of the new tooling and no dependency changes. Consistent with the prior risk assessment on this PR.

Not observed in current diff (independently re-verified by the docs-currency sub-agent only; correctness could not re-verify its own prior low-severity findings this round — see above): the SKILL.md slash-command link and author-evidence-source scoping issues from earlier rounds both appear addressed in the current head.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (2)

Review

Findings

High

  • [protected-path] skills/adr-corner/ — This PR adds files under the protected path skills/ (skills/adr-corner/SKILL.md, skills/adr-corner/scripts/adr_corner.py, skills/adr-corner/scripts/adr_corner_test.py). No issue is linked, and the PR description explains what the change does but not an authorization trail for modifying this governance/infrastructure path. Human approval is always required for protected-path changes.
    Remediation: Obtain explicit maintainer/human approval before merging. Link an issue or reference the discussion that authorizes this skill addition.

Low

  • [logic-error] skills/adr-corner/scripts/adr_corner.py:315 — _comment_record drops any normalized body that merely starts with a slash token (SLASH_COMMAND_RE), not only command-only comments. A human note such as /fs-review Why should this stay a separate decision? is discarded entirely, so discussion_points can miss the contention the report is supposed to surface. test_ignores_command_only_comments only covers a bare /fs-review body; no test covers a command followed by prose.
    Remediation: Strip a leading /command token and keep the remainder when it is non-empty; drop the record only when nothing remains. Add a test that /fs-review Why should this remain...? still yields a discussion excerpt.

  • [missing-test] skills/adr-corner/scripts/adr_corner_test.py:59 — Bot fixtures use REST-style logins (fullsend-ai-coder[bot], bot[bot]). GitHub GraphQL omits the [bot] suffix and relies on __typename: Bot. Production is_bot() checks typename first, so current behavior is correct, but BOT_LOGIN_RE alone does not match unsuffixed names like fullsend-ai-coder. Removing the typename check would still pass these tests while mis-attributing coder/review bots as humans — no test guards against that regression.
    Remediation: Add fixtures with GraphQL identities such as {login: "fullsend-ai-coder", __typename: "Bot"} and assert infer_adr_authors / discussion_points treat them as bots even without a [bot] suffix.

Not observed in current diff: the previously flagged logic-error in ADR_FILENAME_RE (line 20, matching non-numbered ADR-like filenames such as commands/adr-corner.md) and the incomplete-doc finding about a missing "## Slash command" section in skills/adr-corner/SKILL.md — both addressed by this PR's latest commit (narrowed regex plus negative test; added slash-command section linking to commands/adr-corner.md).


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (3)

Review

Findings

High

  • [protected-path] skills/adr-corner/ — This PR adds files under the protected path skills/ (skills/adr-corner/SKILL.md, skills/adr-corner/scripts/adr_corner.py, skills/adr-corner/scripts/adr_corner_test.py). No issue is linked, and the PR description explains what the change does but not an authorization trail for modifying this governance/infrastructure path. Human approval is always required for protected-path changes.
    Remediation: Obtain explicit maintainer/human approval before merging. Link an issue or reference the discussion that authorizes this skill addition.

Low

  • [logic-error] skills/adr-corner/scripts/adr_corner.py:20 — ADR_FILENAME_RE's second alternative (adr[-_ ].+\.md$) matches any Markdown file whose basename starts with adr-/adr_/adr , even outside an ADR directory. is_adr_path("commands/adr-corner.md") is therefore True — this PR's own command file (and any similarly named commands/*.md file) would be inventoried by the tool as an ADR change, with its blob summarized as if it were a decision record. TestAdrPaths only asserts positive matches and has no negative case for a path like this.
    Remediation: Narrow the filename pattern to numbered ADRs only (adr[-_ ]?\d+) and rely on ADR_DIRECTORY_RE for unnumbered files under adr/adrs directories. Add a negative test for commands/adr-corner.md-style paths.

  • [incomplete-doc] skills/adr-corner/SKILL.md — Sibling slash-command skills (skills/nextwork/SKILL.md, skills/topissues/SKILL.md) each include a "## Slash command" section linking to their commands/*.md definition. skills/adr-corner/SKILL.md still has no equivalent link to commands/adr-corner.md — not addressed by the fix commits on this PR.
    Remediation: Add a "## Slash command" section to skills/adr-corner/SKILL.md linking to commands/adr-corner.md, matching the sibling skills.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (4)

Review

Findings

High

  • [protected-path] skills/adr-corner/ — This PR adds files under the protected path skills/ (skills/adr-corner/SKILL.md, skills/adr-corner/scripts/adr_corner.py, skills/adr-corner/scripts/adr_corner_test.py). No issue is linked, and the PR description explains what the change does but not an authorization trail for modifying this governance/infrastructure path. Human approval is always required for protected-path changes.
    Remediation: Obtain explicit maintainer/human approval before merging. Link an issue or reference the discussion that authorizes this skill addition.

Medium

  • [logic-error] skills/adr-corner/scripts/adr_corner.py:322 — discussion_points() builds selected = hinted + [ordinary human records] (hinted = prioritized concern/question/CHANGES_REQUESTED records), then iterates reversed(selected). Reversing the whole concatenated list visits ordinary records first, so any PR with 4+ ordinary human comments fills the limit=4 result entirely with routine comments and silently drops every prioritized concern — the opposite of the documented behavior ("prioritizing questions, concerns, requested changes, and trade-offs"). Verified by direct reproduction. No existing test exercises more than one hinted comment, so this escaped the 16-test suite.
    Remediation: Reverse each priority bucket independently before concatenating, e.g. selected = list(reversed(hinted)) + list(reversed([r for r in human if r not in hinted])), then iterate for record in selected. Add a test with 1 hinted comment followed by 4+ ordinary comments.

Low

  • [injection-pattern] skills/adr-corner/scripts/adr_corner.py:544 — The script's Markdown output — containing attacker-reachable ADR blob content and discussion excerpts from any open PR — is intended to be printed verbatim as the agent's user-facing answer (per commands/adr-corner.md). The only output encoding applied is pipe-escaping in format_markdown; normalize_text does not strip angle brackets or other instruction-like delimiters. This mirrors the same prompt-instruction-only mitigation already used by the existing /nextwork and /topissues skills (both escape only | before printing forge text), so it is not a new regression, but the underlying structural gap is real.
    Remediation: Optional defense-in-depth, ideally applied consistently across /nextwork, /topissues, and /adr-corner: wrap excerpt/summary fields in an explicit untrusted-data delimiter or banner, or prefer links over inlined raw excerpt bodies.

  • [logic-error] skills/adr-corner/scripts/adr_corner.py:250 — infer_adr_authors() adds PR/linked-issue assignee logins to the human-attribution candidate list without an actor dict, so bot detection falls back to BOT_LOGIN_RE, which does not match this repo's GraphQL-unsuffixed bot logins (e.g. fullsend-ai-coder, per docs/contributing/bot-identities.md). Whether a GitHub App identity can actually occupy a PR's assignees connection is unconfirmed, so real-world impact is uncertain, but the code path has no defense against it if it can.
    Remediation: If bot-safe assignee attribution is required, request __typename on assignee nodes and pass the actor dict into is_bot() instead of an empty dict, matching the pattern already used for PR author and commit author/committer.

  • [portability] skills/adr-corner/scripts/adr_corner.py:344 — friendly_datetime() uses strftime('%-d %b %Y, %H:%M UTC'). %-d is a glibc/macOS-only extension and can raise ValueError on other platforms/libc. Sibling skills format timestamps with portable directives. The existing test uses a two-digit day (30), so it would not catch a regression.
    Remediation: Use a portable formatting approach, e.g. f"{parsed.day} {parsed.strftime('%b %Y, %H:%M UTC')}", and add a test case with a single-digit day.

  • [logic-error] skills/adr-corner/scripts/adr_corner.py:275 — _comment_record() drops any comment/review whose normalized body starts with /, intended to filter slash-command invocations like /fs-review. This also silently discards legitimate human comments that happen to begin with a leading slash.
    Remediation: Match slash commands more precisely, e.g. re.match(r'^/[A-Za-z0-9_-]+(?:\s|$)', body), rather than any leading /.

  • [incorrect-doc] skills/adr-corner/SKILL.md:21 — SKILL.md states the report includes "the most likely human ADR author and the evidence source for that inference." format_markdown() only emits the author login in the default Markdown table; the evidence source (adr_author_source) is only present in --format json output.
    Remediation: Either add the evidence source to the Markdown table (e.g. "login (source)"), or clarify in SKILL.md that the evidence source is JSON-only.

  • [incomplete-doc] skills/adr-corner/SKILL.md — Sibling slash-command skills in this repo (skills/nextwork/SKILL.md, skills/topissues/SKILL.md) each include a "## Slash command" section linking to their commands/*.md definition. skills/adr-corner/SKILL.md has no equivalent link to commands/adr-corner.md.
    Remediation: Add a "## Slash command" section to skills/adr-corner/SKILL.md linking to commands/adr-corner.md, matching skills/nextwork/SKILL.md and skills/topissues/SKILL.md.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Ended 8:01 PM UTC

Commit: 235295d · View workflow run →

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:02 PM UTC · Completed 8:17 PM UTC

Commit: d5ba02c · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $3.74

fullsend-ai-review[bot]

This comment was marked as outdated.

@ifireball

Copy link
Copy Markdown
Member Author

Protected-path review gate: this PR was created at Barak Korren's explicit request in the task conversation, which is the authorization trail available here. No GitHub issue was supplied or created. The repository's required human maintainer approval remains necessary before merge; this gate is intentionally left for that approval.

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:54 PM UTC · Completed 9:11 PM UTC

Commit: d5936e5 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $3.93

fullsend-ai-review[bot]

This comment was marked as outdated.

Signed-off-by: Barak Korren <bkorren@redhat.com>
Assisted-by: Codex (gpt-5.6-sol)
Signed-off-by: Barak Korren <bkorren@redhat.com>
Assisted-by: Codex (gpt-5.6-sol)
Signed-off-by: Barak Korren <bkorren@redhat.com>
Assisted-by: Codex (gpt-5.6-sol)
Signed-off-by: Barak Korren <bkorren@redhat.com>
Assisted-by: Codex (gpt-5.6-sol)
Signed-off-by: Barak Korren <bkorren@redhat.com>
Assisted-by: Codex (gpt-5.6-sol)
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 6:08 AM UTC · Completed 6:46 AM UTC

Commit: 57ba9c6 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $2.17

fullsend-ai-review[bot]

This comment was marked as outdated.

@ifireball
ifireball enabled auto-merge October 5, 2026 07:55
Signed-off-by: Barak Korren <bkorren@redhat.com>
Assisted-by: Codex (gpt-5.6-sol)
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:07 AM UTC · Completed 8:23 AM UTC

Commit: 8ab2cd9 · View workflow run →

Runtime: pi · Model: openai/gpt-6.1-sol → gpt-6.1-sol · Effort: high · Cost: $2.10

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the review comment for full details.

text = re.sub(r"<!--.*?-->", " ", text, flags=re.DOTALL)
text = re.sub(r"```.*?```", " ", text, flags=re.DOTALL)
text = MARKDOWN_LINK_RE.sub(r"\1", text)
text = re.sub(r"[#>*`_]", " ", text)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[medium] logic-error

Markdown normalization removes literal technical characters everywhere, including inside inline code, corrupting both ADR summaries and discussion excerpts. For example, created_at > watermark becomes created at watermark, and retries >= 3 becomes retries = 3. This changes the meaning of reported conditions rather than merely removing formatting.

Suggested fix: Remove Markdown delimiters contextually while preserving inline-code contents, comparison operators, and identifier underscores. Restrict blockquote/header stripping to their structural positions and add regression tests covering technical expressions in summaries and discussions.

for line in lines:
heading = re.match(r"^#{1,6}\s+(.+?)\s*$", line)
if heading:
current = normalize_text(heading.group(1)).lower()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[medium] logic-error

Every heading changes the active section, including subsections of Decision. An ADR containing ## Decision followed immediately by ### Backend therefore has an empty Decision section, causing the helper to fall back to Context. If Context says “Keep the old backend” and the Decision subsection says “Replace it with the new backend”, the summary reports the opposite decision.

Suggested fix: Track heading levels and include nested subsection content in its enclosing Decision section until an equal-or-higher-level heading appears. Add a regression test with an immediately nested Decision subsection and conflicting Context text.


def escape_markdown_cell(value: str) -> str:
"""Escape Markdown table syntax without allowing backslashes to escape pipes."""
return value.replace("\\", "\\\\").replace("|", "\\|").replace("\n", " ")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[medium] injection-vuln

The Markdown encoder escapes pipes, backslashes, and newlines but leaves active Markdown and HTML in contributor-controlled ADR paths. A path such as docs/ADRs/<img src=https:&#47;&#47;attacker.example&#47;pixel>.md passes ADR-path classification and is emitted without literal-text encoding. In a renderer that permits HTML images, displaying the inventory could trigger an unsolicited external request. The filename-derived summary prefix is also emitted without literal-text encoding; actual rendering and network behavior were not verified.

Suggested fix: Encode untrusted cell content as literal text, including filenames and summary prefixes. Build the intentional PR link and discussion separators separately from escaped data, and add tests for HTML tags, Markdown images, and entity-encoded URLs in ADR paths.

@fullsend-ai-review fullsend-ai-review Bot added component/skills type/feature New capability request labels Oct 5, 2026
Merged via the queue into fullsend-ai:main with commit 66c7ffc Oct 5, 2026
56 checks passed
@ifireball
ifireball deleted the codex/adr-corner branch October 5, 2026 08:37

This branch was successfully deployed

1 active and 1 inactive deployments
site-preview — 8ab2cd93 Deployed Oct 5, 2026 by github-actions[bot]
dev — 8ab2cd93 Deployed Oct 5, 2026 by ifireball via playback #15355
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/skills risk/elevated PR risk: elevated type/feature New capability request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants