Skip to content

v0.4.4 — fix silent failures in migration publishing, prompt metadata, and prompt:test - #14

Merged
veeqtoh merged 11 commits into
0.xfrom
v0.4.4
Aug 3, 2026
Merged

v0.4.4 — fix silent failures in migration publishing, prompt metadata, and prompt:test#14
veeqtoh merged 11 commits into
0.xfrom
v0.4.4

Conversation

@veeqtoh

@veeqtoh veeqtoh commented Aug 3, 2026

Copy link
Copy Markdown
Member

Motivation and Context

A few defects have been on my todo list. This release fixes the silently failing issues alongside the supporting cleanup around them.

Migrations could not be published. DeckServiceProvider::registerPublishing() pointed at src/database/migrations, but the directory is src/Database/migrations. On case-sensitive filesystems vendor:publish --tag=deck-migrations reported success without copying anything, so the documented install left database/migrations empty on Linux and case-sensitive macOS volumes.

Creating a version silently promoted it to active. make:prompt rewrote the prompt's root metadata.json from scratch, discarding active_version. Scaffolding a draft changed what the application served.

Prompt metadata was unreachable. make:prompt recorded name, description, and roles at the prompt root, but PromptManager only ever read the version-level v{n}/metadata.json. The two halves of the documented scheme were never wired together, so PromptTemplate::metadata() was always empty and the prompt:list description column always blank.

prompt:test --ver=v2 rendered the wrong version. (int) 'v2' evaluates to a falsy 0, so the command fell through to the active version while its header reported the version it had rendered rather than the one requested.

Also in scope: the downloads badge reported only the deprecated veeqtoh/prompt-deck package, and the v0.4.0 rename left the old identity in the docs site name, the logo wordmark, and several links.

Dependencies

None. No new packages.

The autoload change requires a composer dump-autoload to take effect. Anyone with a stale autoloader keeps working regardless, since the old mapping only ever resolved through the broader src/ fallback.

After merge, the downloads badge needs one manual run to create the badges branch, or the README badge renders as a shields error:

gh workflow run "downloads badge" --repo promptphp/deck

Scheduled workflows only fire from the default branch, so the daily cron will not start before then.

Test Instructions

composer install
composer test          
composer test:lint   

Manual QA against a scratch app, reproducing each original symptom:

  1. Migrations publish. php artisan vendor:publish --tag=deck-migrations copies two migration files into database/migrations. Previously it printed success and copied nothing.
  2. Scaffolding does not change what is live. make:prompt order-summary --desc="…"prompt:activate order-summary v1make:prompt order-summary (choose "create a new version") → prompt:list still shows v1 active, and the command prints how to promote v2. Previously v2 became active silently.
  3. Descriptions appear. The prompt:list Description column shows the --desc text. It has never populated before.
  4. Version selection is honoured. prompt:test order-summary --ver=v2 renders v2 while v1 is active. --ver=banana fails with a clear message. --ver=2 still works.

Docs were checked with mint broken-links (clean) and rendered locally with mint dev.

veeqtoh added 11 commits August 3, 2026 17:04
Import ordering, fully-qualified name extraction, and a missing final newline across files untouched by the 0.4.4 fixes. No behaviour change, separated so the fix commits that follow read cleanly.
The mapping pointed at `src/database/factories/`, which does not exist. It resolved only by falling back to the broader `src/` mapping. Also drops the Seeders mapping, which points at no directory in any casing.
`registerPublishing()` pointed at `src/database/migrations`, but the directory is `src/Database/migrations`. On case-sensitive filesystems `vendor:publish
--tag=deck-migrations` reported success without copying anything, leaving `database/migrations` empty on Linux and case-sensitive macOS volumes.

Adds a test asserting every publishable source path the provider registers actually exists on disk.
Two halves of the two-level metadata scheme were never wired up.

`make:prompt` rewrote the prompt's root `metadata.json` from scratch,
discarding `active_version`, so scaffolding a draft silently promoted it to active. The file is now merged, preserving `active_version`, the existing description, the original `created_at`, and any hand-added keys.

`make:prompt` recorded name, description, and roles at the prompt root, but `PromptManager` only ever read the version-level `v{n}/metadata.json`, so
`metadata()` was always empty and the `prompt:list` description column always blank. `make:prompt` now writes version-level metadata, and reads merge the root file under the version file. `active_version` is excluded from `metadata()`, being routing state rather than template metadata.

Since a new version no longer becomes active, `make:prompt` now prints how to promote it.
(int) 'v2' is a falsy 0, so --ver=v2 fell through to the active version
while reporting the wrong number in its header. Now resolves through the
ResolvesVersion trait, accepting both 2 and v2, and fails with a clear
message on unparseable input.
Deck ships under two Packagist names, and the deprecated
`veeqtoh/prompt-deck` still takes a large share of installs. Shields cannot
sum packages, so a scheduled workflow publishes the combined total to a shields endpoint on an orphan badges branch.
The `v0.4.0` rename left the docs site name, the logo wordmark, the docs
landing page link, and the README licence link pointing at the old
identity.
@mintlify

mintlify Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Deck 🟢 Ready View Preview Aug 3, 2026, 4:36 PM

@veeqtoh veeqtoh changed the title 0.4.4 — fix silent failures in migration publishing, prompt metadata, and prompt:test v0.4.4 — fix silent failures in migration publishing, prompt metadata, and prompt:test Aug 3, 2026
@veeqtoh
veeqtoh merged commit bb5e098 into 0.x Aug 3, 2026
6 checks passed
@veeqtoh
veeqtoh deleted the v0.4.4 branch August 3, 2026 16:44
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