Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ The other two take the same commands with their own URL and id:

| Repository | Pinned commit | Whole run | Findings at END | Decisions | Bundle on disk |
|---|---|---|---|---|---|
| ls1intum/Artemis | `d8fc451` | 4.7 min | 219 | 16 | 37 MB |
| shopware/shopware | `ec8b714` | 9.2 min | 179 | 1 | 31 MB |
| Graylog2/graylog2-server | `4912933` | 4.7 min | 189 | 1 | 27 MB |
| ls1intum/Artemis | `d8fc451` | 4.7 min | 219 | 16 | 42 MB |
| shopware/shopware | `ec8b714` | 9.2 min | 179 | 1 | 32 MB |
| Graylog2/graylog2-server | `4912933` | 4.7 min | 189 | 1 | 31 MB |

Each repository has 10 findings in the list to fix first.

Expand Down
438 changes: 219 additions & 219 deletions results/artemis/findings.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions results/artemis/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@
"Model: A file's id is its path at END. A file deleted before END keeps the path it had at the snapshot, so its id changes if it was renamed before it was deleted.",
"Model: Classes and functions are nodes directly under their file. Calls between functions are not established, so the map has no function-level links."
],
"params_hash": "8ad46cab21dc8d4d00a2b53c4cf2345bf198298f39d59df87ebf9b617f97defc",
"params_hash": "78516ac3e5d47bdf91baa165442d2ef0795652b11909084928d0d8407f4ace94",
"repo": "ls1intum/Artemis",
"repo_id": "artemis",
"repo_url": "https://github.com/ls1intum/Artemis.git",
Expand Down Expand Up @@ -1982,7 +1982,7 @@
"cheap_loop",
"foundation_on_features"
],
"max_refs_per_cell": 3,
"max_refs_per_cell": 10,
"offending_role_prefix": "offending",
"yardstick_units": {
"against_grain_links": "links",
Expand Down
378 changes: 189 additions & 189 deletions results/graylog/findings.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions results/graylog/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@
"Model: A file's id is its path at END. A file deleted before END keeps the path it had at the snapshot, so its id changes if it was renamed before it was deleted.",
"Model: Classes and functions are nodes directly under their file. Calls between functions are not established, so the map has no function-level links."
],
"params_hash": "1e285507b98fd92b52c7a643932ee9ec2c899d587fb57436d3d56d6e3b0157a2",
"params_hash": "b98590fc6ea5d6494ba76af6d4426bc3f391877719374c6bb6f839bbeb3d194d",
"repo": "Graylog2/graylog2-server",
"repo_id": "graylog",
"repo_url": "https://github.com/Graylog2/graylog2-server.git",
Expand Down Expand Up @@ -1944,7 +1944,7 @@
"cheap_loop",
"foundation_on_features"
],
"max_refs_per_cell": 3,
"max_refs_per_cell": 10,
"offending_role_prefix": "offending",
"yardstick_units": {
"against_grain_links": "links",
Expand Down
358 changes: 179 additions & 179 deletions results/shopware/findings.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions results/shopware/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@
"Model: A file's id is its path at END. A file deleted before END keeps the path it had at the snapshot, so its id changes if it was renamed before it was deleted.",
"Model: Classes and functions are nodes directly under their file. Calls between functions are not established, so the map has no function-level links."
],
"params_hash": "80db6d3a01863978e1ff235f4d2f5bdd2a37fc93424cb17609af220fbaaf46e0",
"params_hash": "3efcc3126ee6ae4dabcfccdaf34b32aae6ffdbc60a30378667a18bc15552c2dc",
"repo": "shopware/shopware",
"repo_id": "shopware",
"repo_url": "https://github.com/shopware/shopware.git",
Expand Down Expand Up @@ -1996,7 +1996,7 @@
"cheap_loop",
"foundation_on_features"
],
"max_refs_per_cell": 3,
"max_refs_per_cell": 10,
"offending_role_prefix": "offending",
"yardstick_units": {
"against_grain_links": "links",
Expand Down
2 changes: 1 addition & 1 deletion spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ A two-point comparison at March 2025 is confounded. In Artemis, three planned re

"Drift isn't automatically bad", so every structural change gets a label and its evidence:

1. **Same code, old layout.** Re-measure the newer snapshot using the older snapshot's module map. If most of the change disappears, it was a reorganisation. On Artemis's May 2026 split, exceptions per 1,000 lines rose 59% under the new layout and 5% under the old one.
1. **Same code, old layout.** Re-measure the newer snapshot using the older snapshot's module map, on two measures: exceptions per 1,000 lines and links between modules. If at least half of the change in one of them disappears, it was a reorganisation. From 2026-04-01 to 2026-07-01 Artemis went from 48 to 66 modules; links between modules went from 12,140 to 14,103 under the new layout (+16.2%) and to 12,677 under the old one (+4.4%), so 73% of that change disappears and the split counts as a reorganisation. Exceptions per 1,000 lines moved little under either layout: 0.153 to 0.141 under the new one (-8.3%) and 0.142 under the old one (-7.1%).
2. **Restructuring commits** flagged in Stage 1.
3. **Dated decision documents** that announce the change. Shopware has 59 written since March 2025.
4. **The stated goal of the pull request or issue** behind the change (R10). Job B reads it and says whether the structural change is a step toward that goal; the answer is labelled as AI and cites the pull request.
Expand Down
7 changes: 4 additions & 3 deletions src/codexray/settings/report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ titles:

bundle:
# Evidence lines kept per grid cell (one module using another). Every cited file is
# copied into the bundle, so this bounds its size. 3, as for a link change below: the
# count stays exact, and 10 cost 3.2, 1.1 and 3.1 MB more on Artemis, Shopware, Graylog.
max_refs_per_cell: 3
# copied into the bundle, so this bounds its size. 10 against 3 cost 3.2, 1.1 and 3.1
# MB more on Artemis, Shopware and Graylog, accepted so a reader sees more example
# lines per cell.
max_refs_per_cell: 10
# Evidence roles that mark a line as going against a decision, by their first word.
offending_role_prefix: "offending"
# Finding types whose offending lines count as exceptions in the node numbers.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"blob_sha": "00dc77ef416526d5a5dedcb924e9b1784ad0fb70",
"language": "java",
"path": "src/main/java/de/tum/cit/aet/artemis/videosource/repository/GocastCourseBindingRepository.java",
"schema": "codexray.code/1",
"text": "package de.tum.cit.aet.artemis.videosource.repository;\n\nimport static de.tum.cit.aet.artemis.core.config.Constants.PROFILE_CORE;\n\nimport java.time.Instant;\nimport java.util.Optional;\n\nimport org.springframework.context.annotation.Lazy;\nimport org.springframework.context.annotation.Profile;\nimport org.springframework.data.jpa.repository.Modifying;\nimport org.springframework.data.jpa.repository.Query;\nimport org.springframework.data.repository.query.Param;\nimport org.springframework.stereotype.Repository;\nimport org.springframework.transaction.annotation.Transactional;\n\nimport de.tum.cit.aet.artemis.core.repository.base.ArtemisJpaRepository;\nimport de.tum.cit.aet.artemis.videosource.domain.GocastCourseBinding;\n\n@Profile(PROFILE_CORE)\n@Lazy\n@Repository\npublic interface GocastCourseBindingRepository extends ArtemisJpaRepository<GocastCourseBinding, Long> {\n\n @Query(\"SELECT b FROM GocastCourseBinding b WHERE b.courseId = :courseId AND b.status <> de.tum.cit.aet.artemis.videosource.domain.GocastBindingStatus.PENDING\")\n Optional<GocastCourseBinding> findByCourseId(@Param(\"courseId\") long courseId);\n\n @Query(\"SELECT b FROM GocastCourseBinding b WHERE b.courseId = :courseId\")\n Optional<GocastCourseBinding> findConnectionRowByCourseId(@Param(\"courseId\") long courseId);\n\n @Query(\"SELECT b FROM GocastCourseBinding b WHERE b.courseId = :courseId AND b.status = de.tum.cit.aet.artemis.videosource.domain.GocastBindingStatus.PENDING\")\n Optional<GocastCourseBinding> findPendingByCourseId(@Param(\"courseId\") long courseId);\n\n @Query(\"SELECT b FROM GocastCourseBinding b WHERE b.stateHash = :stateHash AND b.status = de.tum.cit.aet.artemis.videosource.domain.GocastBindingStatus.PENDING\")\n Optional<GocastCourseBinding> findPendingByStateHash(@Param(\"stateHash\") String stateHash);\n\n Optional<GocastCourseBinding> findByGocastCourseId(long gocastCourseId);\n\n /**\n * Replaces a pending or revoked connection atomically, never an active connection.\n *\n * @param courseId the Artemis course\n * @param stateHash the new state hash\n * @param integrationId the authenticated integration\n * @param expiresAt the approval expiry\n * @return the number of replaced rows\n */\n @Transactional // ok because of modifying query\n @Modifying(clearAutomatically = true, flushAutomatically = true)\n @Query(\"\"\"\n UPDATE GocastCourseBinding b\n SET b.status = de.tum.cit.aet.artemis.videosource.domain.GocastBindingStatus.PENDING,\n b.stateHash = :stateHash, b.expiresAt = :expiresAt, b.integrationId = :integrationId,\n b.gocastCourseId = NULL, b.gocastGrantId = NULL, b.courseSlug = NULL, b.courseName = NULL,\n b.visibility = NULL, b.version = b.version + 1\n WHERE b.courseId = :courseId AND b.status <> de.tum.cit.aet.artemis.videosource.domain.GocastBindingStatus.ACTIVE\n \"\"\")\n int replacePending(@Param(\"courseId\") long courseId, @Param(\"stateHash\") String stateHash, @Param(\"integrationId\") long integrationId, @Param(\"expiresAt\") Instant expiresAt);\n\n /**\n * Completes only the exact usable approval. The unique remote-course constraint prevents duplicate connections.\n *\n * @param stateHash the state hash\n * @param integrationId the verified integration\n * @param now the current time\n * @param remoteCourseId the verified course\n * @param grantId the verified grant\n * @param slug the course slug\n * @param name the course name\n * @param visibility the course visibility\n * @return the number of completed rows\n */\n @Transactional // ok because of modifying query\n @Modifying(clearAutomatically = true, flushAutomatically = true)\n @Query(\"\"\"\n UPDATE GocastCourseBinding b\n SET b.status = de.tum.cit.aet.artemis.videosource.domain.GocastBindingStatus.ACTIVE,\n b.gocastCourseId = :remoteCourseId, b.gocastGrantId = :grantId,\n b.courseSlug = :slug, b.courseName = :name, b.visibility = :visibility,\n b.stateHash = NULL, b.expiresAt = NULL, b.version = b.version + 1\n WHERE b.status = de.tum.cit.aet.artemis.videosource.domain.GocastBindingStatus.PENDING\n AND b.stateHash = :stateHash AND b.integrationId = :integrationId AND b.expiresAt > :now\n \"\"\")\n int completePending(@Param(\"stateHash\") String stateHash, @Param(\"integrationId\") long integrationId, @Param(\"now\") Instant now, @Param(\"remoteCourseId\") long remoteCourseId,\n @Param(\"grantId\") long grantId, @Param(\"slug\") String slug, @Param(\"name\") String name, @Param(\"visibility\") String visibility);\n\n @Transactional // ok because of delete\n @Modifying(clearAutomatically = true, flushAutomatically = true)\n @Query(\"DELETE FROM GocastCourseBinding b WHERE b.courseId = :courseId AND b.status = de.tum.cit.aet.artemis.videosource.domain.GocastBindingStatus.PENDING\")\n int deletePendingByCourseId(@Param(\"courseId\") long courseId);\n\n @Transactional // ok because of delete\n @Modifying(clearAutomatically = true, flushAutomatically = true)\n @Query(\"DELETE FROM GocastCourseBinding b WHERE b.stateHash = :stateHash AND b.status = de.tum.cit.aet.artemis.videosource.domain.GocastBindingStatus.PENDING\")\n int deletePendingByStateHash(@Param(\"stateHash\") String stateHash);\n\n @Transactional // ok because of delete\n @Modifying(clearAutomatically = true, flushAutomatically = true)\n @Query(\"\"\"\n DELETE FROM GocastCourseBinding b\n WHERE b.courseId = :courseId AND b.integrationId = :integrationId AND b.gocastCourseId = :remoteCourseId AND b.gocastGrantId = :grantId\n \"\"\")\n int deleteExactGrant(@Param(\"courseId\") long courseId, @Param(\"integrationId\") long integrationId, @Param(\"remoteCourseId\") long remoteCourseId,\n @Param(\"grantId\") long grantId);\n\n @Transactional // ok because of modifying query\n @Modifying(clearAutomatically = true, flushAutomatically = true)\n @Query(\"\"\"\n UPDATE GocastCourseBinding b SET b.courseSlug = :slug, b.courseName = :name, b.visibility = :visibility, b.version = b.version + 1\n WHERE b.courseId = :courseId AND b.integrationId = :integrationId AND b.gocastCourseId = :remoteCourseId AND b.gocastGrantId = :grantId\n AND b.version = :version AND b.status = de.tum.cit.aet.artemis.videosource.domain.GocastBindingStatus.ACTIVE\n \"\"\")\n int updateExactGrantMetadata(@Param(\"courseId\") long courseId, @Param(\"integrationId\") long integrationId, @Param(\"remoteCourseId\") long remoteCourseId,\n @Param(\"grantId\") long grantId, @Param(\"version\") long version, @Param(\"slug\") String slug, @Param(\"name\") String name, @Param(\"visibility\") String visibility);\n\n @Transactional // ok because of modifying query\n @Modifying(clearAutomatically = true, flushAutomatically = true)\n @Query(\"\"\"\n UPDATE GocastCourseBinding b SET b.status = de.tum.cit.aet.artemis.videosource.domain.GocastBindingStatus.REVOKED, b.version = b.version + 1\n WHERE b.courseId = :courseId AND b.integrationId = :integrationId AND b.gocastCourseId = :remoteCourseId AND b.gocastGrantId = :grantId AND b.version = :version\n \"\"\")\n int markExactGrantRevoked(@Param(\"courseId\") long courseId, @Param(\"integrationId\") long integrationId, @Param(\"remoteCourseId\") long remoteCourseId,\n @Param(\"grantId\") long grantId, @Param(\"version\") long version);\n}\n"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"blob_sha": "00e444e656d2dbb021976ccd3d816faa8ef4f588",
"language": "java",
"path": "src/main/java/de/tum/cit/aet/artemis/notification/domain/GlobalNotificationSetting.java",
"schema": "codexray.code/1",
"text": "package de.tum.cit.aet.artemis.notification.domain;\n\nimport jakarta.persistence.Column;\nimport jakarta.persistence.Entity;\nimport jakarta.persistence.EnumType;\nimport jakarta.persistence.Enumerated;\nimport jakarta.persistence.Table;\nimport jakarta.persistence.UniqueConstraint;\n\nimport org.jspecify.annotations.NonNull;\n\nimport de.tum.cit.aet.artemis.core.domain.DomainObject;\nimport de.tum.cit.aet.artemis.core.domain.Parent;\n\n@Entity\n@Table(name = \"global_notification_setting\", uniqueConstraints = @UniqueConstraint(columnNames = { \"user_id\", \"global_notification_type\" }))\npublic class GlobalNotificationSetting extends DomainObject {\n\n @NonNull\n @Column(name = \"user_id\", nullable = false)\n @Parent\n private Long userId;\n\n @Enumerated(EnumType.STRING)\n @NonNull\n @Column(name = \"global_notification_type\", nullable = false, columnDefinition = \"varchar(32)\")\n private GlobalNotificationType notificationType;\n\n @NonNull\n @Column(name = \"enabled\", nullable = false)\n private boolean enabled;\n\n public Long getUserId() {\n return userId;\n }\n\n public void setUserId(Long userId) {\n this.userId = userId;\n }\n\n public GlobalNotificationType getNotificationType() {\n return notificationType;\n }\n\n public void setNotificationType(GlobalNotificationType notificationType) {\n this.notificationType = notificationType;\n }\n\n public boolean getEnabled() {\n return enabled;\n }\n\n public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }\n}\n"
}
Loading