Skip to content

docs: update READMEs for apply package - #18

Merged
ewanharris merged 2 commits into
mainfrom
docs/apply-package-readme
Oct 8, 2026
Merged

ewanharris merged 2 commits into
mainfrom
docs/apply-package-readme

Conversation

@ewanharris

Copy link
Copy Markdown
Member

Description

The top-level README described the module as two packages. The apply package is now a first-class part of the module and needs to be surfaced there: added to the package list in About, added to the Documentation section, and given a Getting Started example showing how to wire up a TupleClient and call Execute end-to-end.

The apply package README had two stale sections after recent bug fixes. The Validate Check 2 description now correctly states that only patch filter scopes count as coverage, delete filter scopes are excluded because a delete filter cannot write a tuple. The Conflict Detection section gains a third scenario documenting the overlapping-patch conflict: two operations sharing the same filter scope each desiring a different subset of stored tuples, where satisfied desires would otherwise be invisibly deleted.

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

The top-level README described the module as two packages. The apply
package is now a first-class part of the module and needs to be surfaced
there: added to the package list in About, added to the Documentation
section, and given a Getting Started example showing how to wire up a
TupleClient and call Execute end-to-end.

The apply package README had two stale sections after recent bug fixes.
The Validate Check 2 description now correctly states that only patch
filter scopes count as coverage — delete filter scopes are excluded
because a delete filter cannot write a tuple. The Conflict Detection
section gains a third scenario documenting the overlapping-patch conflict:
two operations sharing the same filter scope each desiring a different
subset of stored tuples, where satisfied desires would otherwise be
invisibly deleted.
Copilot AI balanced review requested due to automatic review settings October 8, 2026 11:45
@ewanharris
ewanharris requested a review from a team as a code owner October 8, 2026 11:45

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.

🟡 Changes recommended

The examples can apply partial results, omit required write ordering, and conflict with documented prefix-filter semantics.

4 open findings
What changed in this PR

Updates documentation to present apply as a first-class package and explain its reconciliation behavior.

Changes:

  • Adds apply usage and references to the root README.
  • Documents conflict detection and patch-filter validation updates.
File Description
README.md Adds package overview and store-writing example.
apply/​README.md Updates validation and conflict documentation.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread README.md
Comment thread apply/README.md Outdated
Comment thread README.md
Comment thread apply/README.md Outdated
Fix four issues in the README examples and apply/README.md:

- The Writing to a store example continued to Execute after Evaluate
  returned an error; a failed evaluation returns a partial result that
  can write incomplete state, and a nil result causes Execute to panic.
  Add an explicit return after the error.

- The WriteTuples stub gave no hint about the delete-before-write
  ordering requirement; condition changes fail with
  TupleConditionConflictError when deletes and writes are batched
  together. Add a comment calling this out.

- Validate Check 2 used object: "org:" as a filter example with
  object: "org:acme" desired, presenting a valid type-filter match as
  a scope mismatch. Replace with object: "org:1" / object: "org:2",
  an unambiguous genuine mismatch.

- The conflict detection ordering description said it iterates combined
  in slice order, which is only the second stage. Satisfied-claim
  conflicts are checked first. Document the two-stage order.
@ewanharris
ewanharris merged commit 9860017 into main Oct 8, 2026
19 checks passed
@ewanharris
ewanharris deleted the docs/apply-package-readme branch October 8, 2026 12:12
@openfga-releaser-bot openfga-releaser-bot Bot mentioned this pull request Oct 8, 2026
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