Skip to content

Reject invalid explicit resource links - #7016

Open
iliya-vidrush wants to merge 3 commits into
anomalyco:devfrom
iliya-vidrush:fix/reject-invalid-links
Open

iliya-vidrush wants to merge 3 commits into
anomalyco:devfrom
iliya-vidrush:fix/reject-invalid-links

Conversation

@iliya-vidrush

Copy link
Copy Markdown

Stacked on #7014 — its commits are included until that merges.

Summary

  • Invalid entries in explicit link arrays now throw actionable errors instead of silently dropping runtime values, permissions, or bindings.
  • Keep automatic resource discovery non-throwing and preserve the existing undefined-link error.

Validation

  • Link tests: 15 passed, covering invalid inputs, rejected Outputs, and valid properties and permissions.
  • Platform typecheck, targeted formatting, and git diff --check passed.
  • Full platform build blocked by missing Docker.

Flow

%%{init: {'themeVariables': {'fontSize': '12px'}}}%%
flowchart TB
  classDef added fill:#dcfce7,stroke:#16a34a,color:#166534
  classDef changed fill:#fef3c7,stroke:#d97706,color:#92400e
  classDef removed fill:#fee2e2,stroke:#dc2626,color:#991b1b

  build["Link.build()"] ==>|"each explicit link"| assertion["Link.assertLinkable()"]
  properties["Link.getProperties()"] ==>|"each explicit link"| assertion
  include["Link.getInclude()"] ==>|"each explicit link"| assertion
  assertion ==>|"validate candidate"| guard["Link.isLinkable()"]
  guard ==>|"false: assertion throws"| error["VisibleError"]
  guard ==>|"true: caller continues"| definition["getSSTLink()"]

  class build,properties,include changed
  class assertion added
Loading

This branch has not been deployed

No deployments
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