Skip to content

Commit c3bbfe4

Browse files
Merge remote-tracking branch 'upstream/develop' into ppcg
# Conflicts: # source/source_hsolver/test/CMakeLists.txt
2 parents 00f39b9 + a02d7c7 commit c3bbfe4

180 files changed

Lines changed: 6906 additions & 1282 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coderabbit.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ reviews:
1515
Focus on newly introduced GlobalV/GlobalC/PARAM dependencies, default
1616
parameters in headers, module placement, CMakeLists.txt linkage, C++11
1717
compatibility, and focused tests for behavior changes.
18+
During the legacy global-state migration period, treat a net increase in
19+
GlobalV/GlobalC/PARAM code references as blocking, and treat
20+
migration-neutral added usage as reviewer-visible warnings requiring
21+
reason, scope, risk, and cleanup rationale.
1822
- path: "source/source_io/module_parameter/**"
1923
instructions: |
2024
Treat INPUT parameter metadata, parsing, defaults, descriptions, and

.github/instructions/abacus-governance.instructions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ Apply these instructions when reviewing or changing ABACUS code:
1212
newly introduced symbols, and changed text files for line-ending checks.
1313
- Do not treat untouched historical debt as a default blocker. Mention it only
1414
when it affects the changed area, and label it as advisory.
15-
- Flag newly introduced `GlobalV`, `GlobalC`, or `PARAM` cross-layer control.
15+
- Flag PRs that increase `GlobalV`, `GlobalC`, or `PARAM` code references as
16+
blocker-level governance issues. Flag migration-neutral added usage as a
17+
warning that requires reason, scope, risk, and cleanup/follow-up rationale.
1618
Prefer explicit dependencies or narrow local interfaces.
1719
- Flag new default arguments in existing header interfaces. Prefer explicit
1820
call-site updates, overloads, or a clearer configuration object.

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Fix #...
2222
- Example: My changes might affect the performance of the application under certain conditions, and I have tested the impact on various scenarios...
2323

2424
### Governance Checklist
25-
- Global dependencies: no new `GlobalV`, `GlobalC`, or `PARAM` cross-layer control, or exception requested below.
25+
- Global dependencies: no net increase in `GlobalV`, `GlobalC`, or `PARAM` code references, or exception requested below with reason, scope, risk, and cleanup plan.
2626
- Default parameters: no new default arguments added to existing interfaces, or exception requested below.
2727
- Headers: no unnecessary header dependencies or `.hpp` propagation, or rationale provided below.
2828
- Line endings: text files use LF; only `.bat` and `.cmd` use CRLF.

.github/workflows/agent_governance.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ on:
77
permissions:
88
contents: read
99
pull-requests: read
10+
issues: write
1011

1112
jobs:
1213
governance:
1314
name: Governance checks
1415
runs-on: ubuntu-latest
1516
steps:
1617
- name: Checkout
17-
uses: actions/checkout@v4
18+
uses: actions/checkout@v7
1819
with:
1920
fetch-depth: 0
2021

@@ -53,3 +54,40 @@ jobs:
5354
if: always()
5455
run: |
5556
cat agent_governance_summary.md >> "$GITHUB_STEP_SUMMARY"
57+
58+
- name: Comment governance warnings
59+
if: >-
60+
always() &&
61+
github.event.pull_request.head.repo.full_name == github.repository
62+
env:
63+
GH_TOKEN: ${{ github.token }}
64+
PR_NUMBER: ${{ github.event.pull_request.number }}
65+
run: |
66+
if ! grep -qi '^| warning |' agent_governance_summary.md; then
67+
exit 0
68+
fi
69+
70+
marker='<!-- agent-governance-warning -->'
71+
body_file="$(mktemp)"
72+
json_file="$(mktemp)"
73+
{
74+
echo "$marker"
75+
echo
76+
cat agent_governance_summary.md
77+
} > "$body_file"
78+
jq -Rs '{body: .}' < "$body_file" > "$json_file"
79+
80+
existing_comment_id="$(gh api --paginate \
81+
"repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" \
82+
--jq ".[] | select(.body | contains(\"${marker}\")) | .id" \
83+
| head -n 1)"
84+
85+
if [ -n "$existing_comment_id" ]; then
86+
gh api --method PATCH \
87+
"repos/${GITHUB_REPOSITORY}/issues/comments/${existing_comment_id}" \
88+
--input "$json_file"
89+
else
90+
gh api --method POST \
91+
"repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" \
92+
--input "$json_file"
93+
fi

AGENTS.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ rules. Read the complete governance document before making or reviewing changes:
99
## Required Baseline
1010

1111
- Follow the seven ABACUS coding rules summarized from the project governance:
12-
1. Do not introduce new cross-layer control through `GlobalV`, `GlobalC`, or
13-
`PARAM`; pass dependencies explicitly.
12+
1. Do not increase cross-layer control through `GlobalV`, `GlobalC`, or
13+
`PARAM`; pass dependencies explicitly where practical. Migration-neutral
14+
moves must keep the PR-level global dependency budget non-increasing and
15+
explain the remaining global usage.
1416
2. Do not hide workflow switches in mutable member variables that can be
1517
changed from multiple places.
1618
3. Keep header dependencies minimal.

0 commit comments

Comments
 (0)