fix(offerings): slug 锁定错误带被拒新值,消除 Value: nil 排障误导 - #486
Closed
sundevilyang wants to merge 1 commit into
Closed
Conversation
Ash keyword add_error 不传 :value 时 InvalidAttribute.value 恒为 nil, 生产排障无法区分「confirm 重放丢参数」与「锁定规则正确拦截」 (2026-09-09 物理课实例:参数链路健康,误判成疑似 bug 排查一轮)。 course/event 两处锁定校验补 value: get_attribute(:slug); open 后改 slug 用例断言消息含 Value: "new-slug" 防回归。
sundevilyang
enabled auto-merge
September 9, 2026 07:13
Contributor
Author
auto-merge was automatically disabled
September 9, 2026 07:24
Pull request was closed
sundevilyang
added a commit
that referenced
this pull request
Sep 9, 2026
…e-lib fix(offerings): slug 锁定错误带被拒新值(lib 部分,补 #486 漏提)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
可观测性修复(今天物理课排查的副产品)
疑点:生产 confirm 报
Value: nil,疑似 pending 重放丢参数。排查结论:参数链路健康(pending 落库原始 params→confirm collect_changes 正常);
Value: nil源于 Ashadd_errorkeyword 形式不传:value时InvalidAttribute.value恒为 nil(deps/ash changeset.ex:7776 to_change_error 实锤)。修复:course.ex/event.ex 两处 slug 锁定校验补
value: get_attribute(:slug),错误消息带被拒新值,排障时一眼区分「参数丢失」vs「锁定拦截」。
验证:event_slug 11 passed(含新断言
Value: "new-slug")+ courses 16 passed。