Skip to content

fix(examples): make shop.speq pass speq check#4

Open
dutch2005 wants to merge 1 commit into
mainfrom
fix/shop-speq-validation
Open

fix(examples): make shop.speq pass speq check#4
dutch2005 wants to merge 1 commit into
mainfrom
fix/shop-speq-validation

Conversation

@dutch2005

Copy link
Copy Markdown
Owner

Summary

The flagship v0.3 example failed speq check on four content errors.

Changes

  • contract subject checkout.total -> cart.total (checkout is not an ENTITY)
  • STORAGE CALLS DATABASE -> CALLS none (no DATABASE layer is declared)
  • AUTH_SECRET / CACHE_URL scoped to undeclared layer SERVICE -> BACKEND / CACHE

Test plan

Verified clean against speq-tools v0.3 (✓ Spec is clean, state file generates). AUDIT/TESTING content already valid.

Risks / rollback

None — example-only content fix.

The flagship v0.3 example failed validation on four content errors:
- contract subject 'checkout.total' -> 'cart.total' ('checkout' is not an ENTITY)
- STORAGE 'CALLS DATABASE' -> 'CALLS none' (no DATABASE layer is declared)
- AUTH_SECRET / CACHE_URL scoped to undeclared layer SERVICE -> BACKEND / CACHE

Verified clean against speq-tools v0.3 (check passes, state file generates).
@dutch2005 dutch2005 added the bug Something isn't working label Jun 8, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the examples/shop.speq file by modifying secret mappings, changing the STORAGE layer's calls, and updating a contract from checkout.total to cart.total. A review comment points out that declaring CALLS none in the STORAGE layer violates SpeQ validation rules because none is not a declared layer; the CALLS statement should be omitted entirely if a layer does not call any other layers.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread examples/shop.speq
Comment on lines 61 to +62
OWNS persistence, migrations
CALLS DATABASE
CALLS none

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

According to Rule 11 of the SpeQ validation rules, CALLS lists may only reference layer names declared in the same LAYERS block. Since none is not a declared layer, declaring CALLS none is a validation violation. If a layer does not call any other layers, the CALLS statement should be omitted entirely (similar to the PAYMENT and CACHE layers).

    OWNS      persistence, migrations

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ecad6bef2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread examples/shop.speq
STORAGE
OWNS persistence, migrations
CALLS DATABASE
CALLS none

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Omit CALLS when there are no callees

This example now declares none as a call target, but the published SpeQ rules say CALLS lists may only reference layer names declared in the same LAYERS block, and the other examples represent layers with no outbound calls by omitting CALLS entirely. In contexts where readers or tools follow SPEC.md rather than the v0.3 checker's apparent sentinel handling, STORAGE now references an undeclared/lowercase layer and the flagship example is no longer spec-conformant; removing this line preserves the intended “no outbound calls” behavior without inventing a target.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant