Skip to content

Print the warnings the instance returns for a synced file - #854

Open
godot wants to merge 1 commit into
masterfrom
sync-print-warnings
Open

godot wants to merge 1 commit into
masterfrom
sync-print-warnings

Conversation

@godot

@godot godot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Why

The instance's sync endpoint (PUT /api/app_builder/marketplace_releases/sync) answers with warnings next to refresh_index, but pos-cli sync dropped them; pos-cli deploy already prints its warnings (lib/push.js).

A companion platform change (mdyd-dev/desksnearme#11671) makes deploy and sync report pages that answer the same route. For example, views/pages/marketplace.liquid and views/pages/marketplace/index.liquid both answer /marketplace, so only one of them is served and edits to the other do nothing. A partner ran into exactly this: an old page file was resurrected by a sync, then pulled by everyone.

What changed

  • lib/watch.js pushFile: after [Sync] Synced: <path>, prints [Sync] <path>: followed by each warning, via logger.Warn. The file is still saved; nothing else changes.
  • test/unit/watch.test.js: warnings are printed; an empty list prints nothing.
  • CHANGELOG.md: entry under Unreleased → New Features.

Older instances that send no warnings, or an empty list, behave as before.

Not changed

The MCP sync-file tool (mcp-min/sync/single-file.js) still drops the warnings.

Tests

npx vitest run test/unit/watch.test.js: 54 passed.

The sync endpoint answers with `warnings` alongside `refresh_index`, and
`pos-cli sync` never showed them; `pos-cli deploy` already does. The file
is still saved; the warning says what the instance found, e.g. that the
synced page answers the same route as another page, so only one of them
is served (views/pages/marketplace.liquid and
views/pages/marketplace/index.liquid both answer /marketplace).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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