Skip to content

docs(skills/no-sql-web-sdk): surface CUSTOM-rule propagation gotcha in main pitfalls#586

Merged
binggg merged 1 commit intomainfrom
fix/skill-security-rule-propagation-hint
Apr 23, 2026
Merged

docs(skills/no-sql-web-sdk): surface CUSTOM-rule propagation gotcha in main pitfalls#586
binggg merged 1 commit intomainfrom
fix/skill-security-rule-propagation-hint

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 23, 2026

Summary

Add one pitfall bullet to config/source/skills/no-sql-web-sdk/SKILL.md telling agents that CUSTOM security rules take 2–5 minutes to propagate after a managePermissions write, so a write attempted immediately after configuring rules may silently fail with DATABASE_PERMISSION_DENIED — even when the expression itself is correct.

This guidance already exists in security-rules.md → "Propagation And Verification", but agents loading the main SKILL.md frequently do not drill into that reference before writing code.

Motivation

Attribution issue issue_moasatof_tj63yv (CMS scaffold case): agent correctly sets CUSTOM rules with auth.uid != null for create, then grader clicks save and zero rows land in the articles collection. The trace shows no wait or verification between updateResourcePermission and the first .add().

Evaluation impact on application-js-react-cloudbase-cms-scaffold:

  • With this guidance missing in the main skill file, score is 0.927 with the "创建文章成功 (create)" check failing on backend lookup (13/14 tests passing).
  • No amount of re-running fixes this on its own because the agent never reads security-rules.md.

Scope

  • Single-line addition in config/source/skills/no-sql-web-sdk/SKILL.md → Common mistakes / gotchas
  • Reference file content is unchanged — only surfacing the gotcha where agents actually read

Test plan

  • cd mcp && ./node_modules/.bin/vitest run ../tests/build-skills-repo.test.js ../tests/build-compat-config.test.js ../tests/skill-quality-standards.test.js10/10 passed
  • CI green on PR
  • (optional, after merge) re-run CMS scaffold evaluation against this branch to confirm score and grader check both go green

🤖 Generated with Claude Code

…n main pitfalls

The security-rule propagation window (backend caches rule evaluators for
2-5 minutes after managePermissions write) is already documented in
references/security-rules.md under 'Propagation And Verification'. However
agents loading the main no-sql-web-sdk/SKILL.md frequently do not drill
into the references file, so they finish configuring a CUSTOM rule and
immediately attempt the first write — which silently fails or returns
DATABASE_PERMISSION_DENIED because the rule has not propagated yet.

Seen in attribution issue_moasatof_tj63yv (CMS scaffold): agent correctly
set CUSTOM rules with auth.uid != null for create, but grader click-save
landed zero rows. Trace shows no wait or verification between rule-set
and first write.

Fix: add one pitfall bullet in SKILL.md that (a) warns about the 2-5
minute propagation window, (b) gives two working strategies (wait-retry
or verify-via-get), (c) reminds not to treat a resolved promise as
success, and (d) points to security-rules.md for the full pattern. Main
file content stays small; details remain in the reference.
@binggg binggg merged commit dd79458 into main Apr 23, 2026
5 checks passed
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.

1 participant