Skip to content

Name a stubbed Policy rule in the first run - #86

Merged
raghubetina merged 1 commit into
mainfrom
policy-stubs
Oct 12, 2026
Merged

raghubetina merged 1 commit into
mainfrom
policy-stubs

Conversation

@raghubetina

Copy link
Copy Markdown
Contributor

From the next First Draft deploy, a Policy the Compiler cannot lower keeps its class and every surface it guards. Its rule returns false, so those pages, links, and controls deny every account, and its relation scope raises NotImplementedError, so pages that list or look up records through it raise. The generated README's Behavior to write lists each stub, and the generated AGENTS.md now says:

A spec that fails through behavior README.md's Behavior to write lists is work to do: write that behavior until its specs pass. A stubbed scope raises NotImplementedError, a stubbed Policy rule returns false, and a deletion outcome First Draft left out fails its spec with RecordNotDestroyed. Write every item that section lists, including a denying rule no failing spec names. Any other failure is a First Draft defect.

A Policy used only as a gate has no scope, so its stub makes no generated spec fail. The notes (from #84) told the agent to write only what a failing spec named, so it would leave such a rule unwritten and preview pages that deny every account.

This changes only the first bullet of Setup and specs in .devcontainer/workshop/app-instructions.md: it names a stubbed scope, a stubbed Policy rule, and a left-out deletion, and says to write every item Behavior to write lists, including a denying rule no failing spec names. Everything else in the file is unchanged. Before the deploy no README lists a Policy, so the rule holds on both sides of it.

Verified. The wording follows the AGENTS.md template at service main 4ff78c87. A Compile of the service's Policy stubs smoke Plan on that commit produced a README listing four stubs, and the smoke passed with five failures, each through a stubbed scope. The stubbed moderate gate, which denies every Report page, failed no spec.

Not run: a Codespace, and an agent reading the notes.

Not for merging until the owner approves: merging changes what new workshop Codespaces get.

Docs: updated .devcontainer/workshop/app-instructions.md (Setup and specs).

Review: Codex (codex-review 0.8.0, max effort), session 67e4e102-6a01-4d30-8f38-8040dcd986a7, approve.

The next First Draft deploy keeps a Policy the Compiler cannot lower
as a stub. Its rule returns false, so the pages it guards deny every
account, and its relation scope raises NotImplementedError. The
README's Behavior to write lists each stub, and the generated
AGENTS.md now names a denying rule beside a raising scope.

A Policy used only as a gate has no scope, so its stub makes no
generated spec fail. The workshop notes sent the agent to write only
what a failing spec named, so it would leave such a rule unwritten
and preview pages that deny every account. The Setup and specs
bullet now names a stubbed Policy rule and says to write every item
Behavior to write lists, including a denying rule no failing spec
names, as the app's AGENTS.md does. Before the deploy no README
lists a Policy, so the rule holds on both sides of it.
@raghubetina
raghubetina merged commit 674665b into main Oct 12, 2026
1 check 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