Skip to content

chore: sync modules to v0.8.0 - #43

Open
yanivt-jfrog wants to merge 2 commits into
mainfrom
chore/sync-modules-v0.8.0
Open

chore: sync modules to v0.8.0#43
yanivt-jfrog wants to merge 2 commits into
mainfrom
chore/sync-modules-v0.8.0

Conversation

@yanivt-jfrog

Copy link
Copy Markdown
Contributor

Vendored from jfrog-agent-hooks/v0.8.0 of JFROG/jfrog-agent-hooks.

Updated paths under .:

  • ./modules

Also updated: .github/scripts/sync-modules-vendor.json (source pin + copies manifest).

Not included: hooks/hooks.json assembly — verify sessionStart argv wiring separately.

Source: https://github.jfrog.info/JFROG/jfrog-agent-hooks/actions/runs/1201471

@yanivt-jfrog
yanivt-jfrog requested a review from a team as a code owner July 30, 2026 11:45
Document gradle as its own type, multi-package-manager autoSetup
families, and schema-2 receipts keyed by package-manager token.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@sankerr

sankerr commented Jul 30, 2026

Copy link
Copy Markdown

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

@YoniMelki YoniMelki left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated thorough review: 3 findings scored 75/100 across bug-scan, historical-context, and risk-coverage lenses. See inline comments.

npm: "npm",
pypi: "pypi",
maven: "maven",
gradle: "gradle",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Requesting changes: adding gradle as its own governed package type here isn't matched by the vendored jfrog-setup-package-managers skill, which still maps jf setup gradle into the maven key (see skills/jfrog-setup-package-managers/references/workspace-binding.md line 45 and references/global-cache-file.md — both say maven, gradle -> maven and weren't touched by this PR).

Concretely: a user who runs jf setup gradle per the skill's current instructions ends up with repositories.maven written to .jfrog/local/package-resolution.json. But resolver.mjs's workspace overlay assigns straight into SESSION.byType[type] keyed by this new gradle type — so gradle either shows unresolved even after setup, or the write silently clobbers an existing maven binding, depending on ordering.

This only affects the workspace-override path (global admin defaultGlobalRepos config is fine), but it's a real, currently-reachable inconsistency, not a hypothetical. Worth updating the skill's PM->type table in this PR or a paired follow-up before merging.

typeof data !== "object" ||
data.schemaVersion !== RECEIPT_SCHEMA_VERSION
) {
return emptyReceipt();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Requesting changes: this wipes the entire package-setup.json (every server, every previously-configured package type — not just anything gradle-related) on any schema mismatch, not just the mismatched entries.

Combined with this PR's Option C fan-out in eager-setup.mjs (one job per package-manager-family-member instead of one per type), the very next session for any user with autoSetup on multiple types will re-run jf setup for every family member of every governed+resolved+autoSetup type at once — worst case ~13 jobs vs ~7 pre-upgrade. It's disclosed in the docs and runs backgrounded, so it's not blocking, but it rests entirely on jf setup being a harmless no-op when re-run, which a comment elsewhere in this same file (the TTL section) explicitly flags as not free ("would thrash user-global PM config").

Consider at least logging/surfacing when a full-file wipe happens, so this one-time burst is visible to whoever's debugging a slow or noisy session after upgrade.

function staleThresholdMs(pmCount) {
return Math.max(PER_PM_TIMEOUT_MS * Math.max(pmCount, 1), 120_000);
function staleThresholdMs(packageManagerCount) {
return Math.max(PER_PACKAGE_MANAGER_TIMEOUT_MS * Math.max(packageManagerCount, 1), 120_000);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Requesting changes: this timeout formula is correct, but the worst-case job count it scales with just roughly doubled (7 types -> up to 13 package-manager jobs via Option C's fan-out), so the global lock's stale threshold now maxes out around ~13 minutes instead of ~7.

There's only one global lock file (~/.jfrog/skills-cache/package-setup.lock) serializing jf setup across every session on a machine. When acquireLock() fails, the whole worker exits immediately with no queue and no retry, logged only at DEBUG (invisible by default). On a shared dev box or CI runner with several concurrent agent sessions and autoSetup enabled across multiple types, a session can now silently skip its own zero-touch setup for up to ~13 minutes with no user-visible indication.

Worth either bumping the log level for a lock-contention skip to WARN, or reconsidering whether one global lock (vs. per-server, or per-package-manager) still makes sense now that a single run can span many more jobs.

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.

3 participants