Skip to content

Keep one-letter skills without corrupting others - #50

Open
Disesfgewu wants to merge 1 commit into
sysprog21:mainfrom
Disesfgewu:fix-grounding-short-skills
Open

Disesfgewu wants to merge 1 commit into
sysprog21:mainfrom
Disesfgewu:fix-grounding-short-skills

Conversation

@Disesfgewu

@Disesfgewu Disesfgewu commented Sep 16, 2026

Copy link
Copy Markdown

What

unique() filtered candidates shorter than two characters, meant to drop
stray punctuation left over from a bad split. It also silently dropped
legitimate one-letter skills like C and R before a candidate ever got to
choose them for the interviewer.

Dropping that filter unmasked a second, latent bug: clean()'s leading-strip
regex also swallows a bare digit run, so 5G lost its 5 and survived as the
fabricated skill G once nothing was left to catch the mangled remnant.

Why

  • clean() now only strips a real list markegits
    immediately followed by . or ) and then whitespace -- not a bare leading
    digit. 5G, 3D, 4K, 802.11 pass throow
    Ruststill loses its1. `.
  • unique() now keeps a token only if it hasgit,
    so a split fragment that is pure punctuation (a stray /, #, & left
    over from a bad split) is dropped instead ol.

Testing

scripts/test.sh: 438/438 non-skipped tests
digit-led skills, numbered-list stripping on requirement lines, and
punctuation-only split fragments.


Summary by cubic

Fixes grounding extraction so one-letter skills like C and R survive, and bare numeric or punctuation fragments are no longer kept as skills. The old length floor dropped stray punctuation but also erased one-letter skills, and removing it exposed clean() treating bare digit runs as list markers, so 5G became G.

Changes

  • clean() strips only real list markers (1., 2), bullets) followed by whitespace, so 5G, 3D, and 4K keep their digits while numbered-list stripping on requirement lines still works.
  • unique() now keeps a token only if it contains a letter, dropping pure punctuation and bare numbers — including 24/7 and 100% — while letter-carrying standards like ISO 9001 and 802.11ac survive.

Written for commit 500155f. Summary will update on new commits.

Review in cubic

cubic-dev-ai[bot]

This comment was marked as resolved.

Comment thread web/document-grounding.js Outdated
Comment thread web/document-grounding.js Outdated
@Disesfgewu
Disesfgewu requested a review from jserv September 16, 2026 15:31

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Indent via make indent and then squash commits without Claude markers.

@Disesfgewu
Disesfgewu force-pushed the fix-grounding-short-skills branch 2 times, most recently from 1496214 to 2ad5ddb Compare September 16, 2026 15:43
@Disesfgewu
Disesfgewu requested a review from jserv September 16, 2026 15:45
@Disesfgewu

Copy link
Copy Markdown
Author

Indent via make indent and then squash commits without Claude markers.

Sorry about that! I've run make indent, squashed the commits, and pushed the updates. Could you please take another look when you have a moment? Thanks!

@jserv

jserv commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

I've run make indent, squashed the commits, and pushed the updates. Could you please take another look when you have a moment?

You didn't. Check git manual carefully for git rebase.
Don't be overly polite by including "sorry" in replies; it is not particularly useful during collaboration.

@Disesfgewu

Copy link
Copy Markdown
Author

Oops. I check that again.

@Disesfgewu
Disesfgewu force-pushed the fix-grounding-short-skills branch from 2ad5ddb to 618f25b Compare September 16, 2026 16:07
@jserv

jserv commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Check Git Squash Commits: How to Combine Commits Into One by using git rebase -i carefully.

cubic-dev-ai[bot]

This comment was marked as resolved.

@ColtenOuO ColtenOuO 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.

It's recommended to make the commit message title relevant to the actual changes, as this helps others quickly understand the updates when reviewing.

@Disesfgewu

Copy link
Copy Markdown
Author

It's recommended to make the commit message title relevant to the actual changes, as this helps others quickly understand the updates when reviewing.

That's very helpful advice. I'll apply this practice to my future commits.

@ColtenOuO ColtenOuO 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.

As a reminder, once the issue pointed out is fixed, we should add a regression test for it to ensure the bug doesn't come back in future updates.

@Disesfgewu
Disesfgewu force-pushed the fix-grounding-short-skills branch from 618f25b to 5af2df8 Compare September 16, 2026 16:33

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rebase latest main branch and refine commit messages properly.

@Disesfgewu
Disesfgewu force-pushed the fix-grounding-short-skills branch 2 times, most recently from 1f9eec9 to a1f91ad Compare September 16, 2026 16:44
@jserv
jserv requested a review from ColtenOuO September 16, 2026 16:46
cubic-dev-ai[bot]

This comment was marked as resolved.

@Disesfgewu
Disesfgewu force-pushed the fix-grounding-short-skills branch from a1f91ad to c932cb1 Compare September 16, 2026 16:50
Comment thread web/document-grounding.js Outdated
Comment thread tests/browser/document-grounding.test.js
@ColtenOuO

Copy link
Copy Markdown
Collaborator

Also, I don't think it's a good idea to describe the collaboration process in the commit body. It should focus on what was actually changed.

This issue is still present in the current commit message.

cubic-dev-ai[bot]

This comment was marked as resolved.

Comment thread web/document-grounding.js
Comment thread web/document-grounding.js Outdated
Comment thread web/document-grounding.js Outdated
Comment thread tests/browser/document-grounding.test.js Outdated

@ColtenOuO ColtenOuO 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.

I think some of the newly added tests seem unrelated to this PR (e.g., single isolated skill) and might not be necessary.

While adding tests for different cases can be beneficial, I think we should have a clear rationale for why each change is being made. Just to clarify my earlier point about missing tests: I meant that we still need a test specifically reproducing the scenario where the bug occurred, rather than adding unrelated test cases to this PR.

Adding unrelated tests without a clear purpose might just introduce unnecessary review overhead.

cc. @jserv what do you think?

@ColtenOuO

Copy link
Copy Markdown
Collaborator

By the way, the PR description might need to be updated to reflect the latest changes, as some parts appear to be outdated.

@jserv

jserv commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

I think some of the newly added tests seem unrelated to this PR (e.g., single isolated skill) and might not be necessary.
[...]
Adding unrelated tests without a clear purpose might just introduce unnecessary review overhead.

For small projects like this, it is acceptable to combine diverse changes into a single pull request, provided that each change has a clear purpose and the overall changes are not extensive enough to make the review difficult, allowing reviewers to still walk through them effectively.

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rebase the current branch onto the upstream default branch and rework the series into functionally minimal commits, folding similar ones and enforcing the project's commit message rules.

@Disesfgewu
Disesfgewu force-pushed the fix-grounding-short-skills branch from c272822 to bf7ab09 Compare September 17, 2026 09:59
@ColtenOuO

Copy link
Copy Markdown
Collaborator

Squash the commits touching the same files into one and reword the commit message to reflect the updated state.

@Disesfgewu
Disesfgewu force-pushed the fix-grounding-short-skills branch 4 times, most recently from e63a31d to c8f549a Compare September 17, 2026 11:14

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read https://chris.beams.io/git-commit carefully and enforce the rules.

@Disesfgewu
Disesfgewu force-pushed the fix-grounding-short-skills branch from c8f549a to 1149e07 Compare September 17, 2026 12:42
@sysprog21 sysprog21 deleted a comment from cubic-dev-ai Bot Sep 17, 2026
cubic-dev-ai[bot]

This comment was marked as resolved.

@jserv
jserv requested a review from ColtenOuO September 17, 2026 13:50

@ColtenOuO ColtenOuO 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.

Please remember to resolve the open comments and add regression tests.

Comment thread web/document-grounding.js Outdated
A resume or JD lists skills and requirements as loose text, and
this folds four fixes to how a candidate becomes a skill token:
keep a single-letter skill like C or R that a too-strict length
check used to drop, strip a numbered-list marker only when digits
are followed by punctuation so a digit-led skill like 5G survives,
drop a split fragment that is pure punctuation instead of a real
value, and require every letterless token to carry a letter or be
paired with a slash or percent. A bare number like 27001 or 2015
split from a shared prefix like ISO cannot prove it still belongs
to that prefix, so it is dropped rather than guessed at.
@Disesfgewu
Disesfgewu force-pushed the fix-grounding-short-skills branch from 1149e07 to 500155f Compare September 17, 2026 23:03
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.

3 participants