Commit Graph

68 Commits

Author SHA1 Message Date
Laszlo Nagy ead58fe113 chore: add tracking label for maintainer-authored work items
Distinguishes project work items the maintainer files against the
project board from user-reported enhancements. Used to keep
`enhancement` semantically clean (= user-reported idea).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 15:09:12 +00:00
Laszlo Nagy f492d34194 chore: add labels.yml as source of truth for issue and PR labels
Records the full label set (existing plus newly created area:* and
needs-repro labels) in a format consumable by label-sync actions.
Lets future label changes go through PR review rather than ad-hoc
gh label create calls.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 14:45:40 +00:00
Laszlo Nagy 26b955f621 chore: disable blank issues and link Discussions from issue picker
Forces new issues through the structured bug form so the load-bearing
fields are always captured. Adds a contact link to Discussions as the
escape hatch for questions and feature ideas.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 14:31:35 +00:00
Laszlo Nagy 035d17f989 chore: convert bug report template to structured issue form
Replace the legacy markdown template with a YAML issue form. Lifts
load-bearing fields (build tool, compiler, install method, OS, arch)
out of free-text "Additional context" prose into validated dropdowns
and required inputs, and adds explicit fields for the exact bear
command, expected vs actual output, and the RUST_LOG=debug log. The
pre-flight checklist is now enforced via required checkboxes, and a
top-of-form note routes general questions to Discussions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 14:24:44 +00:00
Laszlo Nagy ae2493d5ec test: replace BEAR_TEST_VERBOSE with RUST_LOG
Collapse the integration-test verbosity controls onto a single
inherited RUST_LOG. run_bear no longer forces RUST_LOG=debug; it
inherits the test-process value, defaulting to info when unset --
this keeps warn/info/error log lines in captured stderr (so tests
that assert on them still work) while filtering the per-event
debug traces from the preload library that ccache was caching and
replaying through Command::status() leaks. CI sets RUST_LOG=debug
explicitly for full per-event traces on platforms that can't be
reproduced locally.

Drop::preserve_on_panic now dumps the last captured BearOutput
unconditionally; cargo's per-test capture handles the show-on-
failure filter for both Err returns and panics. The verbose-gated
inline debug-info blocks in CompilationDatabase / InterceptEvents
assertion methods, the new_with_verbose constructor, the
verbose: macro arm of bear_test!, and all the
show_verbose_if_enabled / force_show_verbose / show_last_bear_output
helpers are gone. BEAR_TEST_PRESERVE_FAILURES stays unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 11:26:53 +00:00
Laszlo Nagy d7305bac20 fix(intercept): resolve past masquerade compiler wrappers in wrapper mode
Wrapper mode previously stored whatever `which(gcc)` returned as the
"real compiler" for each wrapper. On distributions with a ccache
masquerade in PATH (Fedora/Arch/Gentoo by default), that is the
ccache symlink, so the wrapper's child process was ccache. ccache
then searched PATH for gcc, skipping only symlinks to itself; Bear's
hard-linked wrapper in `.bear/` passed the self-check and was
re-executed, producing an infinite loop.

environment.rs now detects masquerade wrappers at discovery time by
canonicalising candidate paths and checking the target's basename
against a fixed set (ccache, distcc, icecc, colorgcc, buildcache).
The containing directory is stripped from the lookup PATH and
resolution retries, so the wrapper config always names the real
compiler. Both the CC-env and PATH-scan discovery paths are covered.

Other changes in the same fix:
- Requirement reworked around "resolve past masquerade wrappers at
  discovery time"; the original CCACHE_COMPILER proposal is
  documented as rejected, verified empirically to reproduce the
  hang via CCACHE_COMPILER pointing at the ccache symlink.
- Nine new unit tests cover detection, filtering, and the
  no-real-compiler fallback.
- New integration test wrapper_mode_survives_masquerade_wrapper_in_path
  prepends the masquerade dir to its own child PATH so the
  recursion scenario is exercised regardless of host PATH, while
  keeping other tests ccache-free.
- build.rs scans well-known masquerade locations (/usr/lib/ccache,
  /usr/lib64/ccache, /usr/libexec/ccache), exposes the found dir
  via CCACHE_MASQUERADE_DIR, and sets cfg(host_has_ccache_masquerade)
  to gate the new test.
- The manual ccache_free_path_and_compiler workaround in the
  wrapper-mode tests is gone; the tests now run against the host's
  real PATH and also protect this requirement.
- CI: Ubuntu job runs apt-get install ccache so the masquerade dir
  exists on every PR. The job PATH is deliberately not modified --
  ccache first on PATH would inflate event counts for preload-mode
  tests that assert exact compiler-event counts.

Side effect: ccache is bypassed while Bear is observing. That
matches Bear's observe-don't-optimise stance and keeps
compile_commands.json recording the real compiler.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 09:35:38 +00:00
Laszlo Nagy de1fdee2e1 use relative paths to reach wrapper and preload artifacts 2026-03-14 04:42:22 +00:00
Laszlo Nagy 355a5c905f ci: update actions/checkout 2026-02-27 15:50:23 +11:00
Laszlo Nagy 05594989e7 ci: test against stable windows 2026-02-25 11:20:26 +11:00
Laszlo Nagy 8c641611a7 build: ignore windows build on stable rust toolchain 2026-01-14 23:45:30 +11:00
Laszlo Nagy 8b4d1b83d6 build: updated the ci commands and checked in the lockfile 2026-01-03 11:41:20 +11:00
Laszlo Nagy 668e91ed21 ci: probing windows build failure 2026-01-01 15:39:51 +11:00
Laszlo Nagy 61aac30897 test: drafting integration tests and framework 2026-01-01 02:11:51 +11:00
Laszlo Nagy 2f84b86863 documentation: update readme and agents files 2025-12-20 21:06:20 +11:00
Laszlo Nagy c5b7dde942 ci: fix build error 2025-11-07 18:45:21 +11:00
Laszlo Nagy 7ddc655964 verbose logging only through environment variables 2025-08-02 13:25:35 +10:00
Laszlo Nagy d7b13416c4 craft a copilot instruction file 2025-06-22 16:54:21 +10:00
Laszlo Nagy 34a422fd44 integration tests is a separate crate 2025-06-07 21:30:15 +10:00
Laszlo Nagy 5374f137a6 toolchain version is 9 months old 2025-05-10 18:45:41 +10:00
Laszlo Nagy 276965fa21 github action tuning 2025-05-10 18:34:51 +10:00
Laszlo Nagy e164e0f31f rust: removed C++ implementation 2025-05-10 12:36:50 +10:00
Laszlo Nagy 0623bd6663 ci: run alpine image against aarch64 2024-09-23 11:50:32 +00:00
Laszlo Nagy 5ff94e88c8 draft rust implementation 2024-05-18 22:36:52 +10:00
Laszlo Nagy 8bf9f76cb6 ci: fix macos build 2024-04-28 23:12:31 +10:00
Laszlo Nagy 7efea29f72 ci: fix build_on_arch ci jobs 2024-04-28 20:27:07 +10:00
Laszlo Nagy 2f1eb1ceec fix GitHub action runs 2023-08-28 17:49:49 +10:00
Maria Kozlovtseva f0a7f6d69d Change actions version (#533) 2023-06-29 10:58:51 +00:00
Laszlo Nagy 3be8c91daa fix GitHub action runs 2023-05-13 18:54:19 +02:00
Laszlo Nagy 3b59c0ec14 github: all workflow fails on first error 2021-12-31 19:34:15 +11:00
Laszlo Nagy d38706fd96 github: ci runs with verbose warning flags 2021-12-23 19:21:29 +11:00
Laszlo Nagy be5b1a22e0 github: run build on different architectures 2021-12-23 12:43:43 +11:00
Laszlo Nagy c1d2ecb5fe github: ci does not pass macos build failures 2021-12-22 20:45:01 +11:00
Laszlo Nagy 2cf4f632d9 github: build matrix extended 2021-11-11 23:19:54 +11:00
Laszlo Nagy 80eb9e42eb test: added against libtool 2021-11-07 11:01:13 +11:00
Laszlo Nagy 03befdc70d github: update issue template 2021-09-18 12:43:19 +10:00
Laszlo Nagy c4a129070e github: remove CodeQL workflow 2021-09-04 10:33:10 +10:00
Laszlo Nagy e796080dd1 cmake: change installation target to LIBDIR 2021-09-02 15:54:40 +10:00
Laszlo Nagy 2c55aec5a4 intercept: remove sqlite dependency from build 2021-04-05 23:35:57 +10:00
Laszlo Nagy fcb70c6488 test: use the events_db tool for validation 2021-04-03 22:54:06 +11:00
Laszlo Nagy 07e98d6e11 ci: fix functional test output 2021-01-23 22:23:57 +11:00
Laszlo Nagy dd96f5f381 dependency: sqlite added 2020-12-29 22:27:14 +11:00
Laszlo Nagy 6b80d2143f ci: add codeql scan workflow 2020-10-25 00:20:52 +11:00
Laszlo Nagy 72ee6071b3 ci: build macos as experiment (ignore failure) 2020-10-18 20:03:25 +11:00
Laszlo Nagy d2d02c2310 ci: fix build warnings and tolerate macOS problem 2020-10-10 22:24:44 +11:00
Laszlo Nagy 737fa2cbe6 ci: try to fix openssl problem 2020-09-16 21:38:46 +10:00
Laszlo Nagy 15ce6945c8 ci: try to install for testing 2020-09-11 10:47:59 +10:00
Laszlo Nagy 9d2f9620ba review installed documents 2020-09-10 22:33:30 +10:00
Laszlo Nagy 6947b488c6 improve osx ci coverage 2020-08-07 18:36:03 +10:00
Laszlo Nagy 005355595f fix build 2020-07-23 14:48:27 +10:00
Laszlo Nagy 7970ceaff9 enable to run functional test on osx 2020-07-11 00:02:39 +10:00