docs(sdk): clarify machineUserAttributes is required without userProfile#1168
Draft
dqn wants to merge 1 commit into
Draft
docs(sdk): clarify machineUserAttributes is required without userProfile#1168dqn wants to merge 1 commit into
dqn wants to merge 1 commit into
Conversation
The static website OAuth2 example and the auth.md inline comment both
implied `machineUserAttributes` is optional. The SDK types make it
required whenever you use `machineUsers` without a `userProfile`, so
AI-authored configs that try `machineUsers: { runner: {} }` fail
typecheck. Show the machine-user-only shape inline in the static
website "OAuth2 Redirect URIs" example and fix the misleading auth.md
"Optional" comment.
|
⚡ pkg.pr.new@tailor-platform/sdk@tailor-platform/create-sdk
|
Code Metrics Report (packages/sdk)
Details | | main (ebfd66c) | #1168 (9e82c9c) | +/- |
|--------------------|----------------|-----------------|------|
| Coverage | 61.8% | 61.8% | 0.0% |
| Files | 362 | 362 | 0 |
| Lines | 12647 | 12647 | 0 |
| Covered | 7827 | 7827 | 0 |
| Code to Test Ratio | 1:0.4 | 1:0.4 | 0.0 |
| Code | 82684 | 82684 | 0 |
| Test | 34422 | 34422 | 0 |SDK Configure Bundle Size
Runtime Performance
Type Performance (instantiations)
Reported by octocov |
dqn
added a commit
that referenced
this pull request
May 14, 2026
…(Phase 5a) First real AI solve cycle (Phase 4) falsified the LLM-as-judge ambition: judge fired on 1/25 problems, output was a false signal, both true SDK improvements (PRs #1167, #1168) came from analyze --diff + iter variance instead. Phase 5a retires the unused machinery; profile-diff + iter variance become the primary signal in subsequent phases. # What's removed - core/judge.ts (486 lines) + core/judge.test.ts (446 lines) - runJudgePostProcessing / computeJudgeDiff / ImprovementCandidate in cli.ts - ProblemResult.judge, Analytics.affordanceDistribution / improvementCandidatesPath - DiffReport.affordanceDelta + showAffordanceDelta in analyze.ts - "Top affordances" line in formatReportTable - LLM-as-judge / Affordance Taxonomy 12-label sections in README + SKILL.md - judge / improvement-candidates references in skill docs # Renamed - meta.json: hypothesizedAffordance -> designNote (37 problems) - ProblemMeta type: same # Verification - 291 tests pass (-31 from judge.test.ts retirement, as expected) - challenge:verify-solution: 37/37 PASS - typecheck / lint / format clean - core/ production: 7,370 -> 6,306 lines (-1,064)
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.
Docs-only fix surfaced by the llm-challenge benchmark. Two adjacent docs (
auth.mdandstaticwebsite.md) implied thatmachineUserAttributesis optional. The SDK types make it required whenevermachineUsersis used without auserProfile, so AI-authored configs that trymachineUsers: { runner: {} }fail typecheck.Why
When the
m18-config-static-website-urlbenchmark problem asks an agent to wiredefineStaticWebSite(...).urlintodefineAuth({...})'s OAuth2 redirect URIs, the agent readsdocs/services/staticwebsite.mdanddocs/services/auth.md. Both showed:staticwebsite.md"OAuth2 Redirect URIs" example useddefineAuthwithoutmachineUserAttributes.auth.mdline 36 commented// Optional when you don't define userProfile:abovemachineUserAttributes.The SDK types tell the opposite story:
defineAuthwithmachineUsersand nouserProfilerequiresmachineUserAttributesto type everymachineUsers[*].attributesentry. Agents copying the docs example silently hitTS2741: Property 'machineUserAttributes' is missing in type ....Evidence
A/B experiment via
pnpm challenge:experimentonm18-config-static-website-url(full-package profile, N=5 iterations):The stdev collapse (0.329 → 0.112) shows the docs fix not only raises the pass rate but also reduces the variance: with the corrected example, agents are converging on the same approach instead of thrashing.
What changed
packages/sdk/docs/services/auth.md: themachineUserAttributescomment now reads "Required when you don't define userProfile (mutually exclusive with userProfile)" instead of "Optional ...".packages/sdk/docs/services/staticwebsite.md: the "OAuth2 Redirect URIs" example now includes themachineUserAttributes+machineUsersshape inline so the snippet compiles standalone. A short prose note explains theuserProfilevsmachineUserAttributesexclusivity and that the samewebsite.urlplaceholder is reused acrosscorsandredirectURIs.No source code or type changes. The types already encoded the contract; the examples now reinforce what the types say.
Notes
Companion to PR #1167 (hook value nullability), which fixed the equivalent issue for
db.type().hooks(). The llm-challenge benchmark surfaces these docs friction signals via the types-only vs full-package profile diff; this PR is the second SDK docs improvement validated by that harness.Benchmark rebuild itself lives in PR #1148.