Skip to content

ci(guards): retire 100 floor= pins in 88 guard files, computed from the base instead (#19676) - #20735

Merged
mrveiss merged 6 commits into
mainfrom
issue-19676-pins-1
Nov 4, 2026
Merged

mrveiss merged 6 commits into
mainfrom
issue-19676-pins-1

Conversation

@mrveiss

@mrveiss mrveiss commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Thinking Path

This is the first of two batches retiring the population-derived floor= pins (#19676). It is stacked on #20731, which computes a floor nobody pinned from the base commit, so it lands after #20731 in the same train. Its 88 guard files plus #20731's 10 files come to 98 files changed against main, which is under the 100-file cap.

What Changed

  • 100 literal floor= keywords are removed from module-level declare(...) calls in 88 guard files. Those guards now use population at the base - skips - growth.
  • Comments that cited the removed pinned value, window or re-pin history are deleted or reworded, in 24 files. Any reasoning for growth= and skips= is kept. Only comments changed; no other code.
  • Not touched: one older comment in audio_extension_allowlist_test.py about skips=300. It predates this change and is not about the removed pin.

Verification

  • pytest on all 88 changed guard files: 1385 passed, 2 skipped.
  • After the edits, the stale-pin comment grep over the 88 files has one remaining hit: no_secret_in_response_model_17865_test.py:578, which is about a route count, not a reach floor.

After review (#20731 reworked)

  • Re-synced on ci(guards): a reach floor nobody pinned is computed from the base commit (#19676) #20731's fix: the base floor is now measured by the base's own declaration.
  • Every remaining stale pin comment is removed, including the case variants the first pass missed ("Mid-window, from REACH.window()", "Re-pinned MID-window ..."). A case-insensitive grep for mid-window|window [n|window (n|re-pinned over this batch's files now finds nothing.
  • Small guards keep floor=, because their growth is as large as their population, so a computed floor would be zero or less, which computed_floor refuses:
    • chromadb-compose-services, chromadb-compose-port-sites, dpkg-list-call-sites, git-repo-root-call-site-files
  • Now: 96 pins in 85 files, 96 files against main including ci(guards): a reach floor nobody pinned is computed from the base commit (#19676) #20731's 11. Its guard files: 1379 passed, with 6 failures all from these four guards; after restoring their pins, 44 passed in those 3 files.

Refs #19676. Stacks on #20731. Batch 2 is #20733.

Model Used

Claude Opus 5.5, with Claude Sonnet 5.5 for the comment rewording.

🤖 Generated with Claude Code

@mrveiss mrveiss added enhancement New feature or request ci phase:M5.6 M5 phase 6: conflict-free guard state (nothing regenerable is committed) labels Nov 3, 2026
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 59ec30b and 73e7b4f.

Files selected for processing: 96
  • autobot-backend/security/prompt_injection_detector_strict_mode_test.py
  • docs/developer/RATCHET_BASELINES.md
  • repo_tests/_compose_files.py
  • repo_tests/_hardcoded_colour_detect.py
  • repo_tests/_hardcoded_ui_literal_detect.py
  • repo_tests/_reach.py
  • repo_tests/_reach_base.py
  • repo_tests/_reach_window.py
  • repo_tests/ansible_apt_repo_add_retry_17230_test.py
  • repo_tests/ansible_concept_forks_17856_test.py
  • repo_tests/ansible_credentials_never_logged_19764_test.py
  • repo_tests/ansible_inventory_path_exists_test.py
  • repo_tests/ansible_status_queries_run_in_check_mode_19663_test.py
  • repo_tests/anti_pattern_type_emitted_18189_test.py
  • repo_tests/async_sqlalchemy_declares_greenlet_17432_test.py
  • repo_tests/audio_extension_allowlist_test.py
  • repo_tests/audit_writer_single_source_17225_test.py
  • repo_tests/autobot_has_no_pro_edition_19982_test.py
  • repo_tests/blanket_skips_carry_a_reason_test.py
  • repo_tests/browser_port_single_home_19324_test.py
  • repo_tests/browser_service_routes_exist_19490_test.py
  • repo_tests/cache_never_in_repo_19553_test.py
  • repo_tests/captcha_type_fork_guard_18131_test.py
  • repo_tests/chat_history_async_calls_awaited_18316_test.py
  • repo_tests/chat_single_delete_implementation_18316_test.py
  • repo_tests/chromadb_port_one_home_19321_test.py
  • repo_tests/chunk_identity_single_home_18142_test.py
  • repo_tests/chunker_private_embedding_hooks_18185_test.py
  • repo_tests/ci_requirements_one_install_20191_test.py
  • repo_tests/collected_modules_inert_on_import_test.py
  • repo_tests/compat_module_needs_importer_18552_test.py
  • repo_tests/compose_nodes_one_home_19323_test.py
  • repo_tests/concept_forks_17856_test.py
  • repo_tests/config_router_auth_coverage_test.py
  • repo_tests/conftest_stubset_primitives_13596_test.py
  • repo_tests/connector_redaction_guard_test.py
  • repo_tests/container_hardening_single_source_17267_test.py
  • repo_tests/credential_field_name_only_17336_test.py
  • repo_tests/dead_icon_selector_ratchet_19491_test.py
  • repo_tests/defined_twice_18094_test.py
  • repo_tests/dependabot_root_coverage_19523_test.py
  • repo_tests/deployment_profile_one_source_19315_test.py
  • repo_tests/detect_environment_env_files_test.py
  • repo_tests/direct_secrets_service_callers_17773_test.py
  • repo_tests/disaster_recovery_names_real_units_19459_test.py
  • repo_tests/docker_admin_seed_18729_test.py
  • repo_tests/docs_liquid_tags_are_defined_17930_test.py
  • repo_tests/docstring_restatement_guard_17165_test.py
  • repo_tests/duplicate_names_ratchet_14908_test.py
  • repo_tests/egress_default_guard_17576_test.py
  • repo_tests/embedding_model_literal_guard_18143_test.py
  • repo_tests/embedding_model_preserved_15502_test.py
  • repo_tests/enum_hand_copy_guard_test.py
  • repo_tests/env_file_family_18555_test.py
  • repo_tests/excluded_tree_size_debt_test.py
  • repo_tests/fastapi_validation_handler_guard_test.py
  • repo_tests/feature_routers_strict_one_home_19319_test.py
  • repo_tests/file_type_sets_one_home_19339_test.py
  • repo_tests/frontend_hand_built_relative_time_19606_test.py
  • repo_tests/frontend_local_date_formatter_ratchet_19905_test.py
  • repo_tests/frontend_local_formatter_ratchet_19680_test.py
  • repo_tests/frontend_single_api_client_12363_test.py
  • repo_tests/frontend_url_served_by_19326_test.py
  • repo_tests/generated_type_names_not_redeclared_19334_test.py
  • repo_tests/github_api_single_module_15411_test.py
  • repo_tests/guard_reach_meta_test.py
  • repo_tests/icon_rule_sets_font_size_only_19875_test.py
  • repo_tests/import_hermeticity_test.py
  • repo_tests/infra_scripts_no_backend_imports_18288_test.py
  • repo_tests/job_name_names_what_it_runs_test.py
  • repo_tests/kb_admin_read_bypass_guard_test.py
  • repo_tests/kb_construction_baseline_18122_test.py
  • repo_tests/kb_content_redaction_chokepoint_guard_test.py
  • repo_tests/kb_populate_one_home_19339_test.py
  • repo_tests/kb_read_visibility_guard_test.py
  • repo_tests/kit_export_shadow_ratchet_14908_test.py
  • repo_tests/kit_loading_ratchet_19906_test.py
  • repo_tests/knowledge_metadata_parse_canonical_18220_test.py
  • repo_tests/landing_page_claims_19279_test.py
  • repo_tests/migration_gate_filter_covers_what_its_tests_import_test.py
  • repo_tests/model_revision_pinning_enforced_17804_test.py
  • repo_tests/model_tier_single_definition_15502_test.py
  • repo_tests/monitoring_versions_one_home_19329_test.py
  • repo_tests/nginx_sites_enabled_link_enforced_16979_test.py
  • repo_tests/no_created_by_admin_literal_test.py
  • repo_tests/no_doubled_api_prefix_18722_test.py
  • repo_tests/no_partial_key_mask_18221_test.py
  • repo_tests/no_second_ceiling_table_19544_test.py
  • repo_tests/no_secret_in_response_model_17865_test.py
  • repo_tests/no_tracked_key_material_test.py
  • repo_tests/reach_base_floor_19676_test.py
  • repo_tests/reach_declarations_test.py
  • repo_tests/reach_floor_window_17356_test.py
  • repo_tests/reach_scope_claim_17844_test.py
  • repo_tests/relative_reach_floor_17142_test.py
  • scripts/repin_reach_floors.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Notice: 29 open PRs — past the runaway threshold (25)

This is not a request to defer this PR. There is no cap on open PRs (#19397) -- nothing blocks opening or pushing a PR.

This notice only means the count is high enough to be worth a glance for a runaway — something opening PRs in a loop, or a merge pipeline that has stalled so nothing is draining.

Currently open:

If the queue is draining normally, ignore this. Otherwise:

  1. Check whether CI is dispatching at all — see the ci-dispatch-watchdog status on these PRs
  2. Approved PRs land through the merge train the coordinator sequences (merge commits, never squash) -- check the open chore(merge-train) PR is moving, not each PR on its own
  3. Look for a loop opening near-identical PRs

Warn-only runaway detector — .github/workflows/pr-queue-gate.yml. It never blocks a merge.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No new hardcoded values of either class — ssot and other both block.

Known backlog in pipeline-scripts/hardcoded_values_baseline.txt is suppressed and tracked in #14371.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Auto-sync: merging main into issue-19676-pins-1 conflicts

The sync aborted the merge and pushed nothing. Conflicts are information, so it never resolves one itself. Below, for each conflicted file, are the commits that touched it on each side since the merge base ae35848bb7. Merge main in yourself and push; the label clears on the first run that finds this branch 0 behind.

repo_tests/chunker_private_embedding_hooks_18185_test.py

side commit subject issue refs
main 73b09af8e fix(train): the chat budget refusal is a canonical audit action, the watchdog test uses the shared repo root, and the reach floors follow the merged tree (#20589) #20589
this branch e7a860b94 ci(guards): retire 100 floor= pins in 88 guard files, computed from the base instead (#19676) #19676

repo_tests/credential_field_name_only_17336_test.py

side commit subject issue refs
main 73b09af8e fix(train): the chat budget refusal is a canonical audit action, the watchdog test uses the shared repo root, and the reach floors follow the merged tree (#20589) #20589
this branch e7a860b94 ci(guards): retire 100 floor= pins in 88 guard files, computed from the base instead (#19676) #19676

repo_tests/frontend_hand_built_relative_time_19606_test.py

side commit subject issue refs
main 73b09af8e fix(train): the chat budget refusal is a canonical audit action, the watchdog test uses the shared repo root, and the reach floors follow the merged tree (#20589) #20589
this branch e7a860b94 ci(guards): retire 100 floor= pins in 88 guard files, computed from the base instead (#19676) #19676

repo_tests/kit_export_shadow_ratchet_14908_test.py

side commit subject issue refs
main 73b09af8e fix(train): the chat budget refusal is a canonical audit action, the watchdog test uses the shared repo root, and the reach floors follow the merged tree (#20589) #20589
this branch e7a860b94 ci(guards): retire 100 floor= pins in 88 guard files, computed from the base instead (#19676) #19676

repo_tests/kit_loading_ratchet_19906_test.py

side commit subject issue refs
main 73b09af8e fix(train): the chat budget refusal is a canonical audit action, the watchdog test uses the shared repo root, and the reach floors follow the merged tree (#20589) #20589
this branch e7a860b94 ci(guards): retire 100 floor= pins in 88 guard files, computed from the base instead (#19676) #19676

@github-actions github-actions Bot added the sync-conflict Set by the branch sync (#19548) label Nov 3, 2026

@mrveiss mrveiss left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Code review (required pre-train pass) -- verdict: APPROVE as a mechanical change, BLOCKED on #20731

Checked against the merge base with its stacked parent (deeb421): 88 files, 24 insertions, 354 deletions.

  • Removed floor= lines: 100 (every one a floor=<int>, line, some with a trailing comment).
  • Every other removed line is a comment. Every added line (24) is a comment.
  • Mechanical proof on all 88 files: with # comments stripped and floor= keyword arguments dropped from the AST, old and new files are identical in all 88 (AST dump equal, so docstrings, discover, roots, skips, growth and what are unchanged).
  • 15 files read in full from the diff (strict-mode prompt-injection test, ansible credentials, audit-writer, captcha fork, chunker hooks, config router auth, defined-twice, docker admin seed (2 declarations), embedding literal, feature routers, frontend url served-by, infra scripts, kb read visibility, model revision pinning, partial key mask): nothing but the floor line and its comment.
Severity Location Issue Fix
MEDIUM whole PR Depends on #20731: without it declare() on main refuses a missing/zero floor, and the removed pins become computed floors that inherit #20731's flaw (a narrowed discover narrows the base measurement too, so the guard no longer fails). Removing the pins is what makes that flaw live. Land only after #20731 is fixed; do not board the same train ahead of it.
LOW ansible_credentials_never_logged_19764, audit_writer_single_source_17225, chunker_private_embedding_hooks_18185, docker_admin_seed_18729, embedding_model_literal_guard_18143, infra_scripts_no_backend_imports_18288 A comment such as "Mid-window, from REACH.window(); ..." or "Mid-window from REACH.window(): population 15 ..." now sits over a declaration with no floor. Reword to the computed-floor sentence the other files got.
LOW PR head Stacked on the older #20731 head (deeb421); #20731 has since moved (main-sync merge). Re-sync after #20731 settles.

Not checked: whether any of the 100 guards has a discover that reads untracked or generated files, or ignores its root argument (the base measurement would then equal the live tree and the floor would follow it). That needs a per-guard read of 100 declarations; I did not do it. Also not checked: any test run.

@mrveiss

mrveiss commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

Code review on PR #20735 (head 73e7b4f): APPROVE

The stack carries #20731's head 761018e, so this was checked against that, not against main.

# Check Result Evidence
1 Mechanical OK All 85 changed files are modified .py. With comments dropped and the floor= keyword removed from declare() calls in the base copy, the AST equals the head copy in 85 of 85 files. This covers every changed file, not a sample. 93 floor= keywords were removed and none of the 85 files lost nothing. No other token changed.
2 Keeps floor= OK Three files from the original retire commit were restored and are unchanged vs #20731: chromadb_bind_not_hardcoded_15317 (4 declarations), dpkg_tests_installed_state_not_knowledge_17387 (2), git_repo_root_calls_are_guarded_17418 (1). That is 7 declarations, each with a literal floor=, and 100 minus 93 matches.
3 Small-population risk LOW, unverified Three retired pins are small relative to growth: async_sqlalchemy_declares_greenlet_17432 (floor 3, growth 3), detect_environment_env_files (5, 2), env_file_family_18555 (6, 4). If a base population is at or below growth, the computed floor is <= 0. It fails closed (BaseUnavailable), never passes silently. Worth a CI confirmation.

Not checked: the count of 8 named guards (this PR keeps 7 declarations in 3 files, #20733 keeps 4 in 4), and CI execution.

@mrveiss
mrveiss merged commit 90e960f into main Nov 4, 2026
44 of 77 checks passed
mrveiss added a commit that referenced this pull request Nov 4, 2026
@mrveiss
mrveiss deleted the issue-19676-pins-1 branch November 4, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci enhancement New feature or request phase:M5.6 M5 phase 6: conflict-free guard state (nothing regenerable is committed) sync-conflict Set by the branch sync (#19548)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant