Skip to content

fix(keyshare): stop logging confusing mode=development for tasks - #578

Open
dobby-coder[bot] wants to merge 3 commits into
masterfrom
fix/keyshare-tasks-mode-log-413
Open

fix(keyshare): stop logging confusing mode=development for tasks#578
dobby-coder[bot] wants to merge 3 commits into
masterfrom
fix/keyshare-tasks-mode-log-413

Conversation

@dobby-coder

@dobby-coder dobby-coder Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

The keyshare tasks command logs mode=development on every startup, which is confusing because — unlike the keyshare/myirma/irma servers — the tasks command has no development/production distinction at all (it defines no --production flag).

This is the conservative fix requested in #413: stop logging the misleading line for tasks, without changing any operational defaults.

Changes

  • readConfig now only includes the mode field in the startup log line for commands that actually have a dev/production distinction, i.e. those defining a --production flag (irma server, keyshare server, myirma server). The keyshare tasks command logs no mode.
  • Added a small helper commandHasProductionMode(cmd) and a regression test (config_test.go) asserting that tasks reports no mode while the server commands do.
  • CHANGELOG entry.

Operational behaviour and production defaults are unchanged for all commands.

Testing

  • go build ./yivi/..., go vet ./yivi/cli/irmacli/, gofmt — clean
  • go test ./yivi/cli/irmacli/ -run TestCommandHasProductionMode -v — passes

Closes #413

🤖 Generated with Claude Code

The keyshare `tasks` command has no development/production distinction
(it defines no --production flag), yet readConfig always logged
`mode=development` on startup, which is misleading.

Only log the mode for commands that actually have a dev/production
distinction (those defining a --production flag). The keyshare tasks
command now logs no mode at all. Operational defaults are unchanged.

Adds a regression test covering which commands report a mode.

Closes #413

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rubenhensen
rubenhensen self-requested a review July 22, 2026 06:28
@rubenhensen
rubenhensen marked this pull request as ready for review July 22, 2026 07:09
@rubenhensen

Copy link
Copy Markdown
Contributor

/dobby fix conflicts

rubenhensen
rubenhensen previously approved these changes Jul 22, 2026
@dobby-coder

dobby-coder Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Got it — I'm on it. I'll take a look at PR #578, resolve the merge conflicts, and push the update to the same PR.

@dobby-coder dobby-coder Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

VERDICT: approve

Rules Dobby 2 — sign-off (clean)

Conflict resolution verified clean and non-noop against master; build, go vet, gofmt, and the irmacli tests (including the new TestCommandHasProductionMode regression test) pass.

Rule sweep on the changed Go files found no violations:

  • Conventional-commit PR title (fix(keyshare): …) ✓
  • Closes #413 closing keyword present ✓
  • Regression test committed for the fix ✓
  • No Go struct/pointer equality traps introduced ✓
  • Merge kept the CHANGELOG union and the diff intact ✓

Review Dobby 2 handed forward no findings. No bug- or style-severity issues to fix. Approving.

@dobby-coder

dobby-coder Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Conflicts resolved and verified clean on PR #578 — build, go vet, gofmt, and the irmacli tests (including the new TestCommandHasProductionMode regression test) all pass. My rule sweep found no issues, so I posted a VERDICT: approve review comment (using COMMENT since it's self-authored). It's ready for a human sign-off and merge.

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.

Keyshare task reports mode=development

1 participant