Skip to content

Conversation

@cristi-
Copy link
Member

@cristi- cristi- commented Jan 16, 2026

Summary

  • Move submodule from s2-internal/src/main/proto to s2-specs at repo root
  • Update s2-internal/build.gradle.kts to use new proto source path

Test plan

  • Verify submodule at root points to s2-specs
  • Verify ./gradlew :s2-internal:generateProto works with new path

🤖 Generated with Claude Code

@greptile-apps
Copy link

greptile-apps bot commented Jan 16, 2026

Greptile Summary

Relocated the proto specs submodule from s2-internal/src/main/proto to the repository root at s2-specs, changing the source repository from s2-protos to s2-specs. Updated the Gradle build configuration to reference the new submodule location at ../s2-specs/s2. Added an automated GitHub Actions workflow that listens for repository dispatch events to sync submodule updates, regenerate proto files, and create pull requests with signed commits using the s2-helper[bot] account.

Key Changes:

  • Submodule migrated to root for better repository organization
  • Build configuration updated to use new proto source path
  • Automated sync workflow enables continuous integration with spec updates
  • Workflow includes conditional execution based on whether submodule was actually updated

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are well-structured infrastructure updates involving submodule relocation and workflow automation. All file paths are correctly updated, the workflow follows best practices with conditional execution and signed commits, and the build configuration properly references the new submodule location. No logical errors or security concerns identified.
  • No files require special attention

Important Files Changed

Filename Overview
.github/workflows/sync_specs.yaml Added automated workflow to sync s2-specs submodule updates and create PRs with regenerated proto files
.gitmodules Migrated submodule from s2-protos at s2-internal/src/main/proto to s2-specs at repository root
s2-internal/build.gradle.kts Updated proto source directory configuration to point to ../s2-specs/s2 for the relocated submodule

Sequence Diagram

sequenceDiagram
    participant ExtRepo as s2-specs Repository
    participant GHDispatch as GitHub Dispatch Event
    participant Workflow as sync_specs Workflow
    participant Submodule as s2-specs Submodule
    participant Gradle as Gradle Build
    participant PR as Pull Request

    ExtRepo->>GHDispatch: Trigger s2-specs-update event
    GHDispatch->>Workflow: Start sync-specs job
    Workflow->>Workflow: Checkout with submodules
    Workflow->>Submodule: Update to latest commit
    
    alt Submodule was updated
        Submodule-->>Workflow: s2-specs--updated = true
        Workflow->>Gradle: Setup Java 21 & Gradle
        Workflow->>Gradle: Run generateProto task
        Gradle->>Gradle: Process proto files from ../s2-specs/s2
        Gradle-->>Workflow: Generated Java files
        Workflow->>PR: Create pull request with changes
        PR-->>Workflow: PR created with signed commits
    else No update
        Submodule-->>Workflow: s2-specs--updated = false
        Workflow->>Workflow: Skip remaining steps
    end
Loading

- Move submodule from s2-internal/src/main/proto to s2-specs at root
- Update s2-internal/build.gradle.kts to use new proto source path

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@cristi- cristi- changed the title chore: migrate submodule to s2-specs at root and add sync workflow chore: migrate submodule to s2-specs at root Jan 16, 2026
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