Skip to content

docs(guidelines): internal-doc conventions from six harvest runs - #10421

Open
saltas888 wants to merge 3 commits into
stablefrom
ds-harvest-conventions-to-stable
Open

docs(guidelines): internal-doc conventions from six harvest runs#10421
saltas888 wants to merge 3 commits into
stablefrom
ds-harvest-conventions-to-stable

Conversation

@saltas888

@saltas888 saltas888 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Why

This PR is the same net patch as #10030, on a branch cut from stable.

Ports the remaining content of #10030 onto stable. That PR's branch has
develop merged into it, so retargeting it would have turned a 35-file docs
change into a 157-commit develop-to-stable merge; this carries the same net
patch on a branch cut from stable instead.

The harvesting-review skill, the internal-doc house style, the pre-ci
CI-parity step, and the citation-rot pruning sweep already reached stable via
#10270 and #10259. What was still missing is the conventions themselves:

- dev/guidelines/backend/exceptions.md and asgi-middleware.md, split out of
  python.md so each loads only on its trigger
- backend rules: Sequence[T] over T | Sequence[T], concrete-only n.kind,
  changelog secret masking, InfrahubBatch concurrency, retry_db_transaction
  scope, query limit/offset and auto-pagination
- testing rules: verify wiring by parsing source, assert intermediate signals
  on converging paths, poll instead of sleep, parametrize with dataclasses
- frontend rules: reset shared atoms and URL state between tests, assert the
  value not the text beside it, no owned state mirrored into a Jotai atom
- process: PR ceremony scales with the change, migration-layer fixes over
  lazy repair in save(), Settings fields reach the hand-maintained compose
  anchor
- development/grafana/AGENTS.md for dashboard conventions

query-pattern.md's five near-identical walkthroughs collapse into one example
plus an accessor table, paying for the additions.

Docs only. Every symbol the new rules name resolves on stable, and all
relative links and section anchors check out.
@saltas888
saltas888 requested review from a team as code owners August 26, 2026 11:02
@saltas888
saltas888 requested a review from lancamat1 August 26, 2026 11:02
@github-actions github-actions Bot added type/documentation Improvements or additions to documentation group/backend Issue related to the backend (API Server, Git Agent) labels Aug 26, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 35 files

Confidence score: 5/5

  • dev/guidelines/backend/checklist.md makes an overly broad claim that every new setting must be reachable from every Compose entry point, which could mislead contributors about documented development-only INFRAHUB_* settings; narrow the wording to explicitly exclude that category.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="dev/guidelines/backend/checklist.md">

<violation number="1" location="dev/guidelines/backend/checklist.md:64">
P3: The opening claim that a new setting 'must be reachable from every Compose entry point' is over-broad: the codebase has a documented category of development-only `INFRAHUB_*` settings (such as the dev-only experimental dark-theme flag) that is intentionally excluded from the root generated `docker-compose.yml` and exposed only through `development/docker-compose.yml`. Under that rule a contributor adding a dev-only setting would be instructed to add it to the production-facing root compose. Qualify the statement (e.g. 'every Compose entry point unless the setting is intentionally dev-only') so the guidance matches the existing dev-only exposure policy.</violation>
</file>

Shadow auto-approve: would not auto-approve because issues were found.

Re-trigger cubic

Comment thread development/grafana/AGENTS.md Outdated
Comment thread dev/guidelines/backend/python.md Outdated
Comment thread dev/guides/backend/creating-async-tasks.md
Comment thread AGENTS.md Outdated
Comment thread dev/guidelines/git-workflow.md
Comment thread dev/guidelines/backend/checklist.md
Comment thread dev/guidelines/backend/testing.md Outdated
Comment thread dev/guidelines/backend/testing.md Outdated
Comment thread dev/knowledge/backend/mutations.md Outdated
Comment thread .agents/skills/creating-changelog-entries/SKILL.md Outdated

@polmichel polmichel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving based on the fact this is the same PR than #10030 with minor changes due to the rebase. I've initially approved the PR#10030

@codspeed-hq

codspeed-hq Bot commented Aug 26, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 13 untouched benchmarks


Comparing ds-harvest-conventions-to-stable (7325612) with stable (8aa985f)

Open in CodSpeed

Each was checked against stable's code before changing:

- grafana: rabbitmq_instance_monitoring.json really does define a plain
  ${datasource}, so the blanket "never a generic $datasource" was wrong;
  the rule is now to check the dashboard's own templating block
- python.md: lead with list[str]/tuple[str] rather than Sequence[str]. A
  bare str satisfies Sequence[str], so that annotation left open the very
  character-iteration bug the section is about
- creating-async-tasks.md: Step 5 and Step 6 demonstrated the anti-pattern
  the new caution warns about. Step 6 now passes the branch tag at
  submission, and Step 5 says which tags belong where. Step 6 also called
  workflow.submit(), which does not exist — corrected to submit_workflow()
- AGENTS.md: invoke lint also runs yamllint repo-wide; only its ruff checks
  are directory-scoped
- git-workflow.md: dropped the older, vaguer lint/tooling bullet the new
  one supersedes rather than leaving both
- creating-migrations.md: per-item try/collect only works for an
  ArbitraryMigration running auto-commit statements. GraphMigration and
  SchemaMigration wrap execute in start_transaction(), where a failed
  statement aborts the transaction
- docs/AGENTS.md: the site defaults to light mode and supports a dark theme;
  it does not render on one
- testing.md: the cited wiring test walks flow source for service.database
  access, not decorators off a module tree
- testing.md: the good example's loop body was a literal no-op against an
  unused cache, so the assertion passed trivially. Rewritten against the
  real MemoryCache API (list_keys/delete/set) with a seeded store
- mutations.md: mutate_upsert reaches only the undecorated mutate_create
  and _call_mutate_update, so it is the single retry point today; nesting
  is the hazard to avoid, not the current state
- creating-changelog-entries: dependency bumps are `changed`, which
  changelog.mdx already states; housekeeping covers build/tooling/CI

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 10 files (changes from recent commits).

Shadow auto-approve: would not auto-approve because issues were found.

Re-trigger cubic

Comment thread .agents/skills/creating-changelog-entries/SKILL.md Outdated
Comment thread development/grafana/AGENTS.md Outdated
Comment thread dev/guides/backend/creating-async-tasks.md
- creating-changelog-entries is a project-agnostic skill, and it already
  states further down that dependency-bump classification is
  project-specific. Dropped the unqualified "a dependency bump is
  `changed`" claim I had added, which contradicted it; the Infrahub answer
  stays in changelog.mdx, which the skill already points to
- grafana: "most define both" was wrong. All six non-rabbitmq dashboards
  define ${datasource_prometheus}; only the three with Loki panels also
  define ${datasource_loki}, and loki_monitoring.json is not one of them
- creating-async-tasks: Step 6 submits a branch parameter, so the Step 2
  flow it targets now declares one

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 3 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would auto-approve. PR updates internal developer documentation, agent skill/rule files, and dev guidelines across .agents/ and dev/ — no production code, config, API, or schema changes.

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/backend Issue related to the backend (API Server, Git Agent) type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants