Skip to content

fix(surveyor): fail closed when an issue row has no issueType key - #230

Merged
devantler merged 1 commit into
mainfrom
claude/surveyor-issuetype-missing-key-229
Sep 21, 2026
Merged

devantler merged 1 commit into
mainfrom
claude/surveyor-issuetype-missing-key-229

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Agentic Engineer

Why

The portfolio survey counts open issues by type. If a response row came back without its type field at all, the count quietly filed it as "untyped" instead of reporting that the answer was incomplete. A survey that cannot tell a malformed answer from a real one can mislead the engineer about what work exists.

What

A row missing its type, or carrying a type in the wrong shape, now makes the count fail and report the query as unknown. It no longer produces a number. Complete answers are counted exactly as before.

Fixes #229

In jq an absent key reads as null, so a malformed row was counted as an
untyped issue. The reference aggregation now requires each row to be an
object carrying issueType, and a non-null issueType to be an object with a
string name.

Fixes #229

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Tried as a user, at 2334873. I ran the prescribed aggregation filter, as extracted from the agent definition by the contract test, over hand-built GraphQL pages:

  • Valid pages: a typed row, an explicit issueType: null, and a literal untyped type give the same summary as before: {"total":4,…}.
  • Now rejected with QUERY-UNKNOWN: incomplete or malformed issue aggregation input: a row with no issueType key, which was previously counted as untyped; issueType: "Bug" as a string; and a non-object row.

RED/GREEN: the old definition fails the new missing-key case, and the new one passes the whole contract. The plugin version was bumped to 5.1.8 and the desired-state digest refreshed, and validate-manifests.sh is clean. The consumer overlay copy follows on the next plugin rollout, per the issue's third criterion.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

@devantler: I will perform a full review of #230.

✅ Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 92d144e3-d122-4feb-b5ad-df32d59ca15f

📥 Commits

Reviewing files that changed from the base of the PR and between 54870e5 and 2334873.

📒 Files selected for processing (7)
  • .claude-plugin/marketplace.json
  • .github/plugin/marketplace.json
  • plugins/agentic-engineering/.claude-plugin/plugin.json
  • plugins/agentic-engineering/agents/portfolio-surveyor.agent.md
  • plugins/agentic-engineering/plugin.json
  • plugins/agentic-engineering/resources/provider-neutral.desired-state.json
  • plugins/agentic-engineering/scripts/portfolio-surveyor-agent.test.sh

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (3)
Any change to the plugin set updates both manifests in the same PR

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • .github/plugin/marketplace.json
  • .claude-plugin/marketplace.json
A plugin's version is its cache key — move it whenever its content changes.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • plugins/agentic-engineering/.claude-plugin/plugin.json
  • plugins/agentic-engineering/plugin.json
keep manifests/README cross-tool

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • .github/plugin/marketplace.json
  • .claude-plugin/marketplace.json
🔇 Additional comments (7)
plugins/agentic-engineering/agents/portfolio-surveyor.agent.md (1)

84-84: LGTM!

plugins/agentic-engineering/scripts/portfolio-surveyor-agent.test.sh (1)

146-159: LGTM!

.claude-plugin/marketplace.json (1)

30-30: LGTM!

.github/plugin/marketplace.json (1)

30-30: LGTM!

plugins/agentic-engineering/.claude-plugin/plugin.json (1)

4-4: LGTM!

plugins/agentic-engineering/plugin.json (1)

4-4: LGTM!

plugins/agentic-engineering/resources/provider-neutral.desired-state.json (1)

69-69: LGTM!


📝 Walkthrough

Walkthrough

The issue aggregation query now requires each issue node to be an object with an explicit issueType. Non-null issue types must be objects with string name values. Tests cover missing keys, invalid issue types, and non-object rows. Plugin manifests are updated to version 5.1.8, and the portfolio-surveyor definition hash is refreshed.

Priority: ⬇️ Low

Severity of issue fixed: Low


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Linked Issues check ❌ Error Issue [#229] requires the aggregation command to reject rows without issueType and malformed non-null values. The summary shows that portfolio-surveyor.agent.md now requires an explicit `issueType… Update the consumer overlay copy verbatim as required by [#229], or provide evidence that this PR is not the rollout covered by that acceptance criterion.
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The changed files support [#229]. The agent definition implements fail-closed validation. The surveyor test verifies the new contract. The plugin version, marketplace versions, and desired-state diges…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Title check ✅ Passed The title clearly identifies the main change: fail-closed handling for issue rows without an issueType key.
Description check ✅ Passed The description explains why malformed issue rows are unsafe and states that invalid rows now produce an unknown query while valid rows remain unchanged.
Full details: Linked Issues check

Explanation

Issue [#229] requires the aggregation command to reject rows without issueType and malformed non-null values. The summary shows that portfolio-surveyor.agent.md now requires an explicit issueType, validates object rows, and returns QUERY-UNKNOWN for malformed input. The test adds coverage for the missing key, non-object issueType, and non-object rows. The summary does not show the required consumer overlay copy update. The author states that the overlay update is deferred to the next plugin rollout.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Readiness at 2334873: all 41 checks green; CodeRabbit full review green at this head (its summary names 233487317e with no actionable comments, status Review completed, 0 review threads); tried as a user per the evaluation comment above. Promoting and merging head-pinned.

@devantler
devantler marked this pull request as ready for review September 21, 2026 15:22
@devantler
devantler merged commit b4dc2f7 into main Sep 21, 2026
42 checks passed
@devantler
devantler deleted the claude/surveyor-issuetype-missing-key-229 branch September 21, 2026 15:23
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Surveyor issue aggregation treats a missing issueType as untyped instead of failing closed

1 participant