Skip to content

fix(sql-optim-env): match -ly and doubled-consonant keyword endings - #1612

Merged
burtenshaw merged 2 commits into
openenv:mainfrom
OfficialAbhinavSingh:fix/sql-optim-keyword-endings
Nov 13, 2026
Merged

burtenshaw merged 2 commits into
openenv:mainfrom
OfficialAbhinavSingh:fix/sql-optim-keyword-endings

Conversation

@OfficialAbhinavSingh

@OfficialAbhinavSingh OfficialAbhinavSingh commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #1006, from the review there. Matching issue keywords as whole words stopped "explicitly", "implicitly", "full scanning" and "zone mapping" from matching explicit, implicit, full scan and zone map. This allows a -ly ending and a doubled final consonant before -ing/-ed.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • New environment
  • Refactoring

Alignment Checklist

Before submitting, verify:

  • I have read .claude/docs/PRINCIPLES.md and this PR aligns with our principles (grader-only change; reward stays inside the environment)
  • I have checked .claude/docs/INVARIANTS.md and no invariants are violated
  • I have run /pre-submit-pr (or bash .claude/hooks/lint.sh and tests) and addressed all issues

RFC Status

  • Not required (bug fix, docs, minor refactoring)
  • RFC exists: #___
  • RFC needed (will create before merge)

Test Plan

Claude Code Review

N/A


Note

Low Risk
Grader-only heuristic tweak with targeted tests; no execution, auth, or data-path changes.

Overview
Issue-detection keyword matching in the SQL optim grader now treats -ly adverbs and doubled final consonants before -ing/-ed as valid inflections of ground-truth keywords, restoring credit when summaries use forms like explicitly, scanning, or zone mapped while keeping whole-word boundaries.

_kw_pattern adds ly to the allowed suffix list and, for keywords ending in a consonant, an extra pattern for consonant + (ing|ed) (e.g. scan → scanning, map → mapped). Tests add five parameterized cases for those phrases.

Reviewed by Cursor Bugbot for commit f3ed013. Bugbot is set up for automated code reviews on this repo. Configure here.

Matching issue keywords as whole words (openenv#1006) stopped `explicitly`,
`implicitly`, `full scanning` and `zone mapping` from matching the
`explicit`, `implicit`, `full scan` and `zone map` keywords, which the
earlier substring matcher accepted.

Allow a `-ly` ending, and let a final consonant double before -ing/-ed.
Every form this re-allows was also matched by the substring matcher, and
the fragments the whole-word change rejected (`star` in `started`, `cast`
in `forecast`, `join` in `joint`) stay rejected.

@burtenshaw burtenshaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, this does what the summary says. A -ly ending and a doubled final consonant before -ing/-ed now match, and the false positives #1006 removed (star in started, join in joint, cast in forecast) are still rejected.

I checked the new endings for every task keyword against an English word list. The only new matches with a different meaning are constantly, starred and starring. All three matched before #1006 too, and they are unlikely in a review summary, so this is fine.

CI is green, including both test-sql-optim-env jobs. I'll update the branch and merge it.

@burtenshaw
burtenshaw merged commit 96f6201 into openenv:main Nov 13, 2026
16 checks passed
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.

2 participants