Skip to content

docs: fix stale identity model, incorrect examples, and missing documentation#219

Merged
pinodeca merged 2 commits into
microsoft:mainfrom
iemejia:docs/fix-stale-and-incorrect-documentation
Jun 11, 2026
Merged

docs: fix stale identity model, incorrect examples, and missing documentation#219
pinodeca merged 2 commits into
microsoft:mainfrom
iemejia:docs/fix-stale-and-incorrect-documentation

Conversation

@iemejia

@iemejia iemejia commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes 12 documentation issues found during a deep reliability audit.

Critical Fixes

  • Stale identity model (C2): The "How Identity Is Captured" section described the removed v0.1.1 model (login_role + SET ROLE). Rewrote to describe the current v0.2.0+ model where the worker connects directly as submitted_by (which must have LOGIN).
  • Incorrect df.join() arity (C3): Multi-party approval examples called df.join(a, b, c) with 3 arguments — the correct function is df.join3(a, b, c). Fixed in USER_GUIDE.md and spec-signals.md.

High-Severity Fixes

  • Added df.wait_for_completion() to the DSL Reference table (H9)
  • Marked df.run() as a stub in the manual grants list (H8)
  • Added "Superuser Cannot Start Workflows" troubleshooting entry (H11)
  • Added "current_user lacks LOGIN attribute" troubleshooting entry (H12)
  • Documented the result JSON shape {"rows": [...], "row_count": N} (H13)
  • Updated all 3 security review docs to remove login_role references and reflect the current model (H14)

Medium-Severity Fixes

  • Fixed CHANGELOG: $name? substitutes NULL, not "empty string" (M15)
  • Fixed grammar.md: use {sku} syntax for setvars, not $sku (M16)
  • Fixed df.list_instances() examples to use lowercase status values (M17)
  • Fixed broken JSON accessor in scheduled API polling example (M18)

Files Changed

  • USER_GUIDE.md — Identity model rewrite, new troubleshooting entries, result format docs, example fixes
  • CHANGELOG.md — Fix $name? wording
  • docs/grammar.md — Fix variable substitution syntax
  • docs/spec-signals.md — Fix join3 example
  • docs/security-review/ThreatModelDFD.md — Remove login_role references
  • docs/security-review/security-review.md — Remove login_role references
  • docs/security-review/workbook-data.md — Remove login_role references

iemejia added 2 commits June 10, 2026 12:09
…entation

Fixes found during a reliability audit of the documentation:

Critical:
- Rewrite 'How Identity Is Captured' section to describe the current v0.2.0+
  model (direct connection as submitted_by) instead of the removed v0.1.1
  login_role/SET ROLE model
- Fix df.join(a,b,c) → df.join3(a,b,c) in multi-party approval examples
  (USER_GUIDE.md and spec-signals.md)

High:
- Add df.wait_for_completion() to DSL Reference table
- Mark df.run() as stub in manual grants list
- Add 'Superuser Cannot Start Workflows' troubleshooting entry
- Add 'current_user lacks LOGIN attribute' troubleshooting entry
- Document the result JSON shape ({rows, row_count})
- Update security review docs to remove all login_role references and
  reflect the current identity model

Medium:
- Fix CHANGELOG: $name? substitutes NULL, not empty string
- Fix grammar.md: use {sku} syntax for setvars, not $sku
- Fix df.list_instances() examples to use lowercase status values
- Fix broken JSON accessor in scheduled API polling example
The redirect test hit httpbin.org without an explicit HTTP timeout and
used the default 30s wait_for_completion. When httpbin.org is slow, the
wait races the HTTP timeout causing flaky CI failures.

Add 10s HTTP timeout and 60s wait_for_completion to give headroom.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates pg_durable’s documentation to reflect the current v0.2.0+ identity/privilege model, corrects several stale or incorrect DSL examples (notably df.join3() usage and JSON access patterns), and adds missing reference/troubleshooting content. It also tightens one E2E HTTP/SSRF test by making timeouts explicit.

Changes:

  • Update USER_GUIDE DSL reference, examples, result-format documentation, identity model explanation, and troubleshooting entries.
  • Fix stale/incorrect signal/join docs and variable-substitution grammar examples; correct CHANGELOG semantics for $name?.
  • Refresh security-review docs to remove login_role references and describe the current per-user connection model.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
USER_GUIDE.md Adds/updates DSL reference and multiple examples; rewrites identity model and troubleshooting; documents result JSON shape.
tests/e2e/sql/06_http_and_ssrf.sql Makes HTTP timeout explicit and increases wait_for_completion timeout for redirect test stability.
docs/spec-signals.md Fixes multi-party approval example to use df.join3() for 3 branches.
docs/security-review/workbook-data.md Updates identity inventory, activity inventory, and schema tables to remove login_role and reflect current columns.
docs/security-review/ThreatModelDFD.md Updates threat model diagrams/tables to the new identity and per-user connection model.
docs/security-review/security-review.md Updates security review findings to the new identity and per-user connection model.
docs/grammar.md Corrects variable substitution syntax to {name} and clarifies $name result binding usage.
CHANGELOG.md Fixes $name? semantics to state it substitutes NULL (not empty string).

Comment thread USER_GUIDE.md
Comment thread USER_GUIDE.md
Comment thread docs/security-review/workbook-data.md
Comment thread docs/security-review/ThreatModelDFD.md
Comment thread docs/security-review/ThreatModelDFD.md
Comment thread docs/security-review/security-review.md
Comment thread USER_GUIDE.md
Comment thread USER_GUIDE.md
@pinodeca

Copy link
Copy Markdown
Contributor

@iemejia Thanks for your PR! The docs do need a lot of love.

I kicked off the Copilot review but I haven't read its findings yet. I also want to take a look myself - and will post my own review.

@pinodeca pinodeca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot PR review and GPT-5.5 each found some issues.

Since this is a doc-only PR (and a fix for a flaky test), I'm approving it and will submit a separate PR to address the issues found.

@pinodeca pinodeca merged commit aa1b1fe into microsoft:main Jun 11, 2026
5 checks passed
@iemejia iemejia deleted the docs/fix-stale-and-incorrect-documentation branch June 18, 2026 14:59
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.

3 participants