Skip to content

fix(server): name a file 'explores' actually lists in the tile warning's fix - #1223

Merged
jswir merged 1 commit into
mainfrom
jswir/tile-remedy-wording
Sep 23, 2026
Merged

jswir merged 1 commit into
mainfrom
jswir/tile-remedy-wording

Conversation

@jswir

@jswir jswir commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #1206, from Nathan's re-review of lintTilesAgainstSurface.

The index.malloy case he raised can't be reached. With no explores key, the surface is index.malloy alone. Dashboards only come from dashboards/*.malloy, and none of those are on that surface, so every dashboard is held back before the tile check runs. The held-back warning already branches on surfaceIsIndexModel(). The test now pins this: with no key, the dashboard isn't served and there is no tile warning. If a later change to the gate lets one through, that test fails.

A real problem in the same text. The fix always said "import it into a listed file such as index.malloy". It went wrong like this:

  1. explores lists orders.malloy and dashboards/dash.malloy.
  2. A root index.malloy exists but isn't listed.
  3. The author imports the source into index.malloy.
  4. Nothing changes, because an unlisted file publishes nothing.

Changes:

  • The example is now the first model explores actually lists, not counting dashboard files. If there isn't one, the text says "a file you list there".
  • The first half now says to add the declaring file "keeping the entries already there", so it can't be read as replacing the key.
  • A comment explains why this remedy doesn't branch on surfaceIsIndexModel().

Tested: query_boundary.spec.ts passes (26 tests), and the old wording fails the new assertions.

🤖 Generated with Claude Code

…g's fix

The tile warning suggested importing the source into "index.malloy"
whatever the package listed. With 'explores' naming, say, orders.malloy
and the dashboard, a root index.malloy is on disk but unlisted, and
importing into it publishes nothing. The example is now the first
non-dashboard model the key lists, or "a file you list there" if none.

The first half of the fix now says to add the declaring file and keep
the existing entries, so it cannot be read as replacing the key.

It does not branch on surfaceIsIndexModel() the way the held-back
warning does, because that case never reaches this lint: a surface of
index.malloy alone lists no dashboards/ file, so the dashboard is held
back first. The test pins that, so a change to the gate that lets one
through would fail here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: James Swirhun <james@credibledata.com>
@jswir
jswir merged commit 1ed2897 into main Sep 23, 2026
15 checks passed
@jswir
jswir deleted the jswir/tile-remedy-wording branch September 23, 2026 19:01
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.

2 participants