Commit Graph
15 Commits
Author SHA1 Message Date
Ansho ReiandClaude Opus 5 32a43b5201 (c28bc04) Report the version and the commit it was built from
worklane --version exited 2: the Cli derive set name and about but never
version, so clap generated no flag. Nothing could say what a given binary
was, which matters here because the opencode tools shell out to whatever
worklane is on PATH, so an agent can be driving a stale build with no way
to notice.

The crate version alone would not have answered it. Cargo.toml is pinned
at 0.1.0 and nobody bumps it per install, so a stale install and a fresh
build both claim the same thing. A build script stamps the short sha
alongside it, giving "worklane 0.1.0 (df97b06)", and falls back to
"unknown" where there is no git directory, as when installing from a
published crate.

propagate_version lets subcommands answer too. This overrides the ticket's
own plan step, which said to skip the sha if it needed a build script.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 14:48:37 +02:00
Ansho ReiandClaude Opus 5 a434f82928 (665719e) Report an ambiguous search as an error, not a print and exit
resolve_ticket printed the candidate list to stdout and called
process::exit(1) from inside a helper. That combination is the one thing
the opencode wrapper cannot relay: it throws on the non-zero exit and
keeps stderr, so the list was thrown away and the agent saw a bare exit
code with nothing to choose from.

Return an error carrying the rendered list instead. It reaches stderr the
way every other error does, the exit code stays non-zero so `show x && ...`
still fails, and no process::exit remains in util.rs.

The wrapper half, which was dropping stderr on the floor regardless,
follows in 3e8b6fa.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 14:10:02 +02:00
Ansho ReiandClaude Opus 5 c675da1d2a (7ac39e3) Fix byte-slice panics in id shortening and date formatting
Three places sliced strings by byte offset on values that come from a
filename or a file field, neither of which is validated.

The disambiguation list took &short_id[..7], so two tickets whose names
were shorter than that aborted the process while printing the options.
collect_ticket_items guarded on length but still cut at byte 7, so a
multibyte character straddling the cut panicked. format_created_at read
four fixed offsets after a length check that a multibyte value passes.

Add short_id, which counts characters, and use it in both display paths.
Parse the timestamp with chrono instead of slicing, dropping the column
when the value will not parse. The format string it writes and the one it
reads are now the same constant, so they cannot drift.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 13:56:10 +02:00
Ansho ReiandClaude Opus 5 8ff64614fc (c230d2c) Fix mv corrupting the Status metadata field
cmd_mv spliced the metadata line by byte offset and wrote the field name
as **-Status**, because the format string re-added the "- " prefix that
the preceding slice already carried. parse_ticket_field could never read
Status back, and the next move failed to find "- **Status**" so it
silently skipped the rewrite, leaving the ticket in one status directory
while its metadata claimed another.

Replace the splicing with set_status_field, a line based rewrite that
keeps every other line verbatim, inserts no stray newline, and errors
when the Metadata section has no Status field. It also accepts the
**-Status** spelling so tickets damaged by the old code are repaired as
they move.

The content is now computed before the rename, so a ticket without a
Status field is never half-moved.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 13:33:44 +02:00
Anshorei 73e5aee2a2 (415e1c3) Fix worklane.ts tool when passed multi-line args 2026-05-15 20:59:29 +02:00
Anshorei 75e9ea2309 (1240895) Add colour to disambiguation 2026-05-15 17:21:43 +02:00
Anshorei dd5692d0a3 (724dc03) Add -o <owner> flag to comment subcommand 2026-05-15 16:32:03 +02:00
Anshorei bc3ee0c53b (339c65a) Add comment command 2026-05-15 11:11:40 +02:00
Anshorei aef8002d23 (101c2444) Add colours to ls command 2026-05-15 02:18:04 +02:00
Anshorei d668a24a3d (0b1a129) Add the mv command 2026-05-15 01:52:59 +02:00
Anshorei 26807621ae (3a68c7) Add created at timestamp 2026-05-14 23:10:04 +02:00
Anshorei 94da69a1b2 Make ls status non-flag argument 2026-05-14 22:32:17 +02:00
Anshorei 7d40159959 (e97d55) Add show command 2026-05-14 22:28:00 +02:00
Anshorei fd216b056c (177665) Add ls command 2026-05-14 21:37:11 +02:00
Anshorei 17a02b906e Initial commit 2026-05-14 20:41:40 +02:00