Add shared-root dependency detection for downstream agent sync#3
Open
devansh-dwivedi-glean wants to merge 1 commit into
Open
Add shared-root dependency detection for downstream agent sync#3devansh-dwivedi-glean wants to merge 1 commit into
devansh-dwivedi-glean wants to merge 1 commit into
Conversation
Introduces a `shared-root` input (default `.glean/common/`) that enables automatic detection and re-sync of downstream agents when shared resources change. Agents declare dependencies on shared content via symlinks; when files under shared-root change, the action resolves all symlink targets to identify affected agents and unions them with directly changed agents for a single combined sync run. Key changes: - action.yml: new `shared-root` input passed to detect-changes - scripts/resolve-shared-deps.sh: symlink dependency discovery and impact analysis with canonical path resolution, broken-symlink warnings, and out-of-repo rejection - scripts/detect-changes.sh: partitions changed files into agent-root vs shared-root, calls resolve-shared-deps, unions and deduplicates results - tests/test-resolve-shared-deps.sh: 12-case integration test suite - README.md: documents shared-root usage, repo layout, and dependency contract Generated by Glean Code Writer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
From Glean Code Writer
Implements the shared-root change propagation feature. This enables automatic detection and re-sync of downstream agents when shared resources (skills, sub-agents, prompts, artifacts) change.
Key changes:
action.yml: Addsshared-rootinput (default.glean/common/) for declaring where shared reusable agent resources livescripts/resolve-shared-deps.sh(new): Symlink-based dependency discovery and impact analysis engine that walks agent subtrees, resolves symlinks canonically, builds a dependency map, and computes affected agents from changed shared pathsscripts/detect-changes.sh: Extended to partition changed files into agent-root vs shared-root, call the resolver when shared files change, and union/deduplicate direct + indirect agent triggersREADME.md: Documents shared-root usage, repo layout example, and dependency contractEdge cases handled:
New step outputs:
shared_root_affected,shared_changed_filesfor downstream observability.Testing
12-case integration test suite in
tests/test-resolve-shared-deps.sh:All 12 tests pass.
🤖 Generated by Glean Code Writer
📝 Chat link - https://app.glean.com/chat/7bdf0a961c264c4d9ea4913a9c34eacd