Skip to content

Add EMTA KMD draft tooling and harden EMTA/LHV session persistence - #11

Open
TonisOrmisson wants to merge 4 commits into
stefanoamorelli:mainfrom
TonisOrmisson:add-kmd
Open

Add EMTA KMD draft tooling and harden EMTA/LHV session persistence#11
TonisOrmisson wants to merge 4 commits into
stefanoamorelli:mainfrom
TonisOrmisson:add-kmd

Conversation

@TonisOrmisson

Copy link
Copy Markdown

This PR adds KMD support to emta-cli so agents can list declarations, read draft data, update the KMD main form, read/
update/delete INF A and INF B rows, and use a separate guarded submit command. It also hardens EMTA/LHV session handling
for WSL/Linux by adding file-based fallback session storage and updating the current EMTA govsso + customer-kmd2 flow.
Main changes:

  • Added emta-cli kmd list
  • Added emta-cli kmd main create|read|update
  • Added emta-cli kmd inf-a read|update|delete
  • Added emta-cli kmd inf-b read|update|delete
  • Added guarded emta-cli kmd submit --confirm
  • Added file-session fallback for EMTA and LHV when keyring/secrets is unavailable
  • Added parser/merge/session tests
  • Sanitized tests/examples and added repo instruction forbidding real private data in tracked files/history
  • Updated GitHub Actions runtimes and branch-push workflow triggers

Validation:

  • go test ./... passes in cli/emta
  • go test ./internal/config passes in cli/lhv
  • Live-tested against EMTA KMD draft workflow
  • Live-tested KMD main save, INF A update/delete, INF B validation path, and declaration submit flow

Notes:

  • JSON is the default machine-readable input/output format for the new KMD commands
  • submit remains a separate explicit command because users may want to review saved drafts before final submission

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Thank you for your contribution! Before we can merge it, we need you to agree to the Contributor License Agreement. Please read it, then post the following comment in this PR to sign:


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@stefanoamorelli
stefanoamorelli self-requested a review June 6, 2026 20:02
Comment thread .github/workflows/ci.yml
@@ -2,9 +2,7 @@ name: CI

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

nit: I appreciate those improvements but maybe worth another PR to keep diff cleaner? WDYT?

Comment thread cli/emta/cmd/root.go
}
}

func loadSessionData() ([]byte, error) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

blocking: I think this change deserves more conversation as we're changing from encrypted keychain to plaintext storage of the credentials.

IMHO worth discussing in more detail on another issue and PR.

@stefanoamorelli stefanoamorelli left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

thanks a lot @TonisOrmisson! Really appreciate the kmd implementation. I left a couple of comments, overall if we could scope down this PR just for the kmd feature to avoid mix of concerns it would be fantastic.

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.

2 participants