Skip to content

docs: gate new @available methods behind portable alternatives - #1625

Merged
sd-db merged 2 commits into
mainfrom
sd-db/docs/available-method-gate
Aug 10, 2026
Merged

docs: gate new @available methods behind portable alternatives#1625
sd-db merged 2 commits into
mainfrom
sd-db/docs/available-method-gate

Conversation

@sd-db

@sd-db sd-db commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Gate new @available methods behind portable alternatives in the agent guide.

Each @available method is permanent public API — Jinja is late-bound, so nothing flags an unused one — and must be re-implemented in the Fusion engine's Rust adapter before behavior matches across engines. Shared-contract macros get that for free.

### Adding New Adapter Method now opens with that cost, then lists options to work down, stopping at the first that works: a shared-contract macro, plain Jinja, a relation config component, and only then a new @available method. Reaching the last step asks for a justification, portable types, and an acknowledgement that Fusion parity is owed.

Shorter entries added to ### Code Patterns to Follow and ### Common Pitfalls for Agents.

Test plan

Docs only — no runtime change, no CHANGELOG entry, no tests. pre-commit run --all-files passes.

Every `@available` method is permanent public API — Jinja is late-bound, so
nothing warns that one is unused — and each must be re-implemented in the Fusion
engine's Rust adapter (dispatch plus semantic classification) before Databricks
behavior matches across engines. Macros built on the shared adapter contract
inherit that machinery instead.

Replace the "Adding New Adapter Method" steps with an ordered list that an agent
works down, stopping at the first option that works: an existing shared-contract
macro, plain Jinja expressions, a relation config component, and only then a new
`@available` method. Reaching the last step now asks for a justification in the
PR description, portable types in the signature, and an acknowledgement that
Fusion parity work is owed.

Add matching entries to Code Patterns to Follow and Common Pitfalls for Agents,
which are the sections agents actually consult mid-task.
@sd-db

sd-db commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@xuliangs FYI

@sd-db
sd-db marked this pull request as ready for review August 7, 2026 14:28
@sd-db
sd-db requested a review from jprakash-db as a code owner August 7, 2026 14:28
@sd-db
sd-db enabled auto-merge (squash) August 9, 2026 06:14
@sd-db
sd-db merged commit f061902 into main Aug 10, 2026
1 check passed
@sd-db
sd-db deleted the sd-db/docs/available-method-gate branch August 10, 2026 08:33
Comment thread AGENTS.md
9. **Use capability system for version checks** - Never add new `compare_dbr_version()` calls
10. **Remember per-compute caching** - Different clusters may have different capabilities in the same run
11. **Multi-statement SQL**: Don't use semicolons to separate statements - return a list instead and let `execute_multiple_statements()` handle it
12. **Don't add an `@available` method for logic Jinja can already do** - each one is permanent API and owes a matching Fusion implementation. Check the shared adapter contract first.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice!

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