2.9 KiB
2.9 KiB
#703 Git Wrapper Interactive and Auth Resilience
Objective
Restore the deployed Git wrapper contract: issue-create supports interactive invocation and Gitea mutation behavior tolerates a stale Tea authenticated user by validating current identity and using the existing host-scoped API fallback.
Scope
packages/mosaic/framework/tools/git/issue-create.shpackages/mosaic/framework/tools/git/detect-platform.sh- Git wrapper regression harnesses
- This scratchpad
Requirements / acceptance evidence
issue-create -iand--interactiveprompt for missing issue fields without exposing credentials.- Explicit command-line fields retain precedence and do not trigger prompt input.
- Gitea wrapper resolves the current user dynamically from the target host and does not rely on the saved Tea user identity.
- A Tea
GetUserByNamefailure falls back to authenticated API creation. - Existing body-safety, login-resolution, issue-create, and pr-create paths remain green.
- Source framework is re-seeded to deployed
~/.config/mosaic, then deployed wrappers are verified end to end.
Plan
- Add failing shell regression harness for interactive input and stale Tea user fallback.
- Implement minimal helper and parser changes.
- Run wrapper harnesses, syntax checks, and repository baseline checks.
- Re-seed deployed framework and run live wrapper verification.
- Commit, queue guard, push, open PR, and stop for independent review.
Progress
- Issue #703 filed before code; issue comment records #536 root cause and stale-login trigger.
- Deployed wrapper
issue-create.sh -ireproduced:Unknown option: -i(exit 1). - Live Tea mutation did not reproduce
GetUserByNameon this host because the current mosaicstack Tea login is valid. The test harness models the reported stale authenticated-user condition. - Implemented
-i/--interactiveprompt collection and a dynamic Tea/uservalidation. A stale Tea identity now selects the existing host-scoped Gitea API fallback before mutation for both issue and PR creation. - Re-seeded the framework with
MOSAIC_INSTALL_MODE=keep MOSAIC_SYNC_ONLY=1 bash packages/mosaic/framework/install.sh. Installed and source wrapper SHA-256 values matched. - Live deployed verification: interactive issue-create opened then closed #704; installed dynamic identity resolved
jason.woltje.
Verification
- PASS:
packages/mosaic/framework/tools/git/test-issue-create-interactive-auth.sh - PASS:
packages/mosaic/framework/tools/git/test-issue-create-body-safety.sh - PASS:
packages/mosaic/framework/tools/git/test-gitea-login-resolution.sh - PASS:
packages/mosaic/framework/tools/git/test-pr-metadata-gitea.sh - PASS:
packages/mosaic/framework/tools/git/test-pr-merge-gitea-empty-uid.sh - PASS:
bash packages/mosaic/framework/tools/git/test-lane-brief-pr-linkage.sh - PASS:
bash -n packages/mosaic/framework/tools/git/*.sh - PASS: Prettier check for this scratchpad