GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix stale `didYouMean` props by flowstate · Pull Request #81 · SocketDev/socket-sdk-python

Conversation

@flowstate

@flowstate Eric Hibbs (flowstate) commented May 21, 2026

Copy link
Copy Markdown
Contributor

The didYouMean alert class in socketdev/core/issues.py declared four props keys but the Socket API only emits two of them. Three keys (downloads, downloadsRatio, editDistance)
were dead at runtime — consumers rendering prop labels (PR comments, security comments, dependency overview tables) showed column headers for fields that never populated.
Meanwhile detectedAt, which the API does emit, had no human-readable label.

Root Cause

The didYouMean props dict drifted from the schema — openapi.json around line 9298 declares props: { alternatePackage, detectedAt }, and the python class never caught up.

Fix

Replaced the stale four-key dict with { alternatePackage, detectedAt } to match the OpenAPI schema. Added tests/unit/test_issues_did_you_mean_props.py with two contract tests — one pins the key set against the schema, one guards that every key has a non-empty label — so future drift is caught locally.

Purely a contract correction; no behavioral change beyond the keys exposed by AllIssues().didYouMean.props.

Sibling work in CUS2-4 added a gptDidYouMean class with the same correct shape; this PR brings the existing didYouMean into alignment.

Public Changelog

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@flowstate
Eric Hibbs (flowstate) requested a review from a team as a code owner May 21, 2026 09:27
@github-actions

github-actions Bot commented May 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

🚀 Preview package published!

Install with:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketdev==3.1.1.dev2
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lelia lelia self-assigned this May 21, 2026
@lelia lelia changed the title [cus2-5] fix stale didyoumean props Fix stale didYouMean props May 21, 2026
lelia
lelia requested changes May 22, 2026
View reviewed changes

@lelia lelia left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Eric Hibbs (@flowstate) can you update uv.lock to sync with new version?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Eric Hibbs (flowstate) added 4 commits May 22, 2026 14:39
@flowstate
test: failing regression for stale didYouMean props
f7236da
@flowstate
fix(issues): drop stale didYouMean props, add detectedAt
3fec08f
Resolves CUS2-5. The didYouMean class declared four props
(alternatePackage, downloads, downloadsRatio, editDistance) but the
current OpenAPI schema (socket-sdk-js/openapi.json:9298) only emits
{ alternatePackage, detectedAt }. The three stale keys were dead at
runtime and detectedAt was missing a human-readable label entirely.
Updated to match the schema.
@flowstate
chore(release): bump to 3.1.1 and sync pyproject.toml
3e2afce
Run via .hooks/sync_version.py after merging origin/main (now at 3.1.0
from lelia's purl PR). Keeps pyproject.toml and socketdev/version.py
in lockstep, as flagged in code review.
@flowstate
chore: sync uv.lock to 3.1.1
5e9d425
@flowstate
Eric Hibbs (flowstate) force-pushed the erichibbs/cus2-5-fix-stale-didyoumean-props branch from deb2476 to 5e9d425 Compare May 22, 2026 21:48
lelia
lelia approved these changes May 22, 2026
View reviewed changes
@lelia
lelia merged commit be87c34 into main May 22, 2026
7 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lelia lelia lelia approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@lelia lelia

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@flowstate @lelia
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.