Skip to content

Deny graded in denylist#3589

Merged
handeyeco merged 3 commits intomainfrom
deny-graded
May 6, 2026
Merged

Deny graded in denylist#3589
handeyeco merged 3 commits intomainfrom
deny-graded

Conversation

@handeyeco
Copy link
Copy Markdown
Contributor

@handeyeco handeyeco commented May 6, 2026

Summary:

graded was getting erroneously added to widget options which was breaking publish for certain widgets because the backend doesn't allow unknown fields.

This adds graded to the deny list, so that shouldn't happen anymore. It breaks my "interactive but not scored" feature, but that's behind a feature flag so I think that's okay.

See: https://khanacademy.slack.com/archives/C01AZ9H8TTQ/p1778089642003609

@handeyeco handeyeco self-assigned this May 6, 2026
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🗄️ Schema Change: No Changes ✅

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Size Change: +4 B (0%)

Total Size: 504 kB

📦 View Changed
Filename Size Change
packages/perseus/dist/es/index.js 198 kB +4 B (0%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 20.6 kB
packages/keypad-context/dist/es/index.js 1 kB
packages/kmath/dist/es/index.js 6.32 kB
packages/math-input/dist/es/index.js 98.5 kB
packages/math-input/dist/es/strings.js 1.61 kB
packages/perseus-core/dist/es/index.item-splitting.js 12 kB
packages/perseus-core/dist/es/index.js 25.5 kB
packages/perseus-editor/dist/es/index.js 104 kB
packages/perseus-linter/dist/es/index.js 9.41 kB
packages/perseus-score/dist/es/index.js 9.78 kB
packages/perseus-utils/dist/es/index.js 403 B
packages/perseus/dist/es/strings.js 8.5 kB
packages/pure-markdown/dist/es/index.js 1.39 kB
packages/simple-markdown/dist/es/index.js 6.71 kB

compressed-size-action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🛠️ Item Splitting: No Changes ✅

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (153c767) and published it to npm. You
can install it using the tag PR3589.

Example:

pnpm add @khanacademy/perseus@PR3589

If you are working in Khan Academy's frontend, you can run the below command.

./dev/tools/bump_perseus_version.ts -t PR3589

If you are working in Khan Academy's webapp, you can run the below command.

./dev/tools/bump_perseus_version.js -t PR3589

@handeyeco handeyeco changed the title docs(changeset): Deny graded in denylist Deny graded in denylist May 6, 2026
@handeyeco handeyeco merged commit 6da01cb into main May 6, 2026
26 of 27 checks passed
@handeyeco handeyeco deleted the deny-graded branch May 6, 2026 19:28
handeyeco pushed a commit that referenced this pull request May 6, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @khanacademy/perseus@77.4.2

### Patch Changes

- [#3585](#3585)
[`4ea67efffa`](4ea67ef)
Thanks [@ivyolamit](https://github.com/ivyolamit)! - Fix mobile
Interactive Graph's asymptote drag not blurring previously focused point


- [#3589](#3589)
[`6da01cb76f`](6da01cb)
Thanks [@handeyeco](https://github.com/handeyeco)! - Deny graded in
denylist

## @khanacademy/perseus-editor@31.2.1

### Patch Changes

- Updated dependencies
\[[`4ea67efffa`](4ea67ef),
[`6da01cb76f`](6da01cb)]:
    -   @khanacademy/perseus@77.4.2

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
handeyeco added a commit that referenced this pull request May 7, 2026
## Summary:

The problem: in #3466 we added a switch for `graded`. Everything was just dandy except that we broke publishes. That's because we started passing `graded` down to widgets (which we needed so IG could change its behavior based on the `graded` flag) but then every widgets started getting `graded`. Because of the janky way we serialize, that started adding `graded` in the WidgetOptions of some widgets ([ticket](https://khanacademy.atlassian.net/browse/LEMS-4105) and [Slack convo](https://khanacademy.slack.com/archives/C01AZ9H8TTQ/p1778089642003609)). Rather than discard unneeded fields, the publish pipeline just explodes when it sees a field it doesn't expect (which is totally cool and awesome) and it wasn't expecting `graded`.

The best solution is to make data serialization opt-in vs opt-out (see [LEMS-4108](https://khanacademy.atlassian.net/browse/LEMS-4108)). However that's probably a medium risk change and we have a playtest today, so this change just skips around the denylist for `graded`.

**Why this should be more safe than the last PR:** in #3466 there were some red flags...namely that I had to add `graded` to a bunch of tests. That was reverted as part of the bugfix (#3589) and the fact that I didn't need to add those changes back in this PR to pass checks indicated that this doesn't have the same problem as the last attempt.

[LEMS-4108]: https://khanacademy.atlassian.net/browse/LEMS-4108?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Author: handeyeco

Reviewers: claude[bot], ivyolamit, catandthemachines

Required Reviewers:

Approved By: ivyolamit

Checks: ⏭️  1 check has been skipped, ✅ 10 checks were successful

Pull Request URL: #3597
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants