Skip to content

Add safe embedded manage-tink refresh - #59

Merged
jon-devlapaz merged 6 commits into
mainfrom
codex/manage-tink-refresh
Aug 12, 2026
Merged

Add safe embedded manage-tink refresh#59
jon-devlapaz merged 6 commits into
mainfrom
codex/manage-tink-refresh

Conversation

@jon-devlapaz

Copy link
Copy Markdown
Owner

Summary

  • detect when receipt-free embedded manage-tink differs from the active binary and fail check/lock with the exact repair command
  • implement explicit missing/current/stale behavior for tink skill refresh manage-tink using rollback-safe publication
  • preserve remote-provenance project and library entries, reconcile project/library/catalog state, and align update guidance and documentation

Verification

  • cargo test (112 unit, 164 acceptance, traceability, and workflow contract tests)
  • cargo fmt --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo audit
  • independent Standards and Spec reviews: clean after corrective increments

Merge and release remain separately approval-gated.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9678fe1a57

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/manage_tink.rs
}

pub(crate) fn is_current(installed: &Skill) -> Result<bool, Error> {
let (_staging, embedded) = prepare_manage_tink()?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep current-payload comparison read-only

Whenever a receipt-free manage-tink is installed, tink skill check reaches this call through require_current, and prepare_manage_tink creates a temporary directory and writes three files into it. This violates the C4 contract that skill check performs no filesystem writes and also makes an otherwise read-only check fail when the project is readable but the temporary filesystem is unavailable or unwritable; compare against an in-memory representation or precomputed digest instead.

Useful? React with 👍 / 👎.

Comment thread src/update.rs
Comment on lines +705 to +708
output::stdout_line(format_args!(
"{}",
style.muted("Next: run `tink skill refresh manage-tink` in each Tink project")
))?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Do not fail a completed update on advisory output

When an output consumer accepts the first two update-report lines and then closes stdout before this new Next: line, the binary has already been replaced but the propagated write error makes tink update exit nonzero. That reports a successful irreversible mutation as a failure and creates retry ambiguity solely because an advisory could not be delivered; this final guidance should use best-effort output that cannot retroactively fail the update.

Useful? React with 👍 / 👎.

Comment thread src/check.rs
Comment on lines +32 to +33
if skill.name == "manage-tink" && provenance.is_none() {
crate::manage_tink::require_current(&skill)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Limit embedded drift enforcement to check and lock

After upgrading the binary while a project still has the previous receipt-free manage-tink, putting this validation in load_project_skills blocks every caller of the generic loader, not just the C8 check/lock boundaries. In particular, project listing, verification, synchronization, and refreshing an unrelated imported skill all fail on manage-tink drift before performing their requested operation; keep the currentness gate in the check and lock command paths so unrelated project operations remain usable while the explicit repair is pending.

Useful? React with 👍 / 👎.

@jon-devlapaz
jon-devlapaz merged commit 777705f into main Aug 12, 2026
6 checks passed
@jon-devlapaz
jon-devlapaz deleted the codex/manage-tink-refresh branch August 17, 2026 05:43
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