Skip to content

Introduces significant updates to streamline project management and module codebase#61

Open
ss-o wants to merge 158 commits intomainfrom
develop
Open

Introduces significant updates to streamline project management and module codebase#61
ss-o wants to merge 158 commits intomainfrom
develop

Conversation

@ss-o
Copy link
Copy Markdown
Member

@ss-o ss-o commented Jul 20, 2025

This pull request makes significant updates to project configuration, documentation, and CI/CD workflows, focusing on modernizing build processes, improving code quality automation, and cleaning up legacy files. The changes transition the project from legacy autoconf/Makefile tooling to CMake-based workflows, introduce new CI pipelines, and enhance developer guidance and code linting standards.

Build System and CI/CD Modernization:

  • Added new CMake-based CI workflow (.github/workflows/ci.yml) for building and testing on both Linux and macOS, replacing legacy shell-based workflows. This includes matrix builds, dependency installation, and parallel test execution.
  • Introduced a documentation build and deployment workflow (.github/workflows/docs.yml) using Doxygen and GitHub Pages for automated docs generation and hosting.
  • Removed old shell-based GitHub Actions workflows for Linux and macOS builds (.github/workflows/test-linux.yml, .github/workflows/test-macos.yml). [1] [2]

Project Structure and Legacy Cleanup:

  • Deleted legacy autoconf/Makefile-related files and ignore lists (.cvsignore, .distfiles, .preconfig), reflecting the move to CMake and cleaning up obsolete build artifacts. [1] [2] [3]
  • Added .gitmodules to track the vendor/zsh submodule, formalizing external dependency management.

Documentation and Developer Guidance:

  • Added comprehensive Copilot instructions (.github/copilot-instructions.md) detailing project knowledge graph usage, entity types, relations, and problem-solving workflow for contributors.
  • Removed outdated README and license files, preparing for updated documentation and licensing. (.github/README.md, .github/LICENCE) [1] [2]

Code Quality and Linting:

  • Added .trunk/configs/.clang-tidy with tailored linting rules for C code, disabling noisy or irrelevant checks and setting zsh module-specific conventions.
  • Updated .trunk/configs/.yamllint.yaml and added .trunk/configs/.prettierignore to improve YAML style and ignore build artifacts. [1] [2]

Miscellaneous Cleanup:

  • Removed unused cspell word lists and Dependabot configuration, streamlining repository settings. (.github/.cspell/project-ignored.txt, .github/.cspell/project-words.txt, .github/dependabot.yml) [1] [2] [3]

@ss-o ss-o added ci 🤖 Work that improves the continuous integration. performance 🚀 Improving performance of the project, not introducing new features. labels Jul 20, 2025
ss-o added 21 commits August 8, 2025 06:28
…idy tuned for zsh C; docs: restructure, add site + workflows; code: safer path build, size_t offsets, NOLINT for zsh style
…gnment; avoid brace expansion; keep FORCE_REBUILD commented
…nstall-system; detect Zi modules dir; copy staged zpmod.so to appropriate targets
…dle/dylib/dll); preserve filename on copy; update messages and tests
…heck (zp_icons_enabled) to avoid repeated work
… shared helpers, subcommands, docs, tests; wire CTest; improve staging
ss-o added 4 commits August 21, 2025 02:21
…st_mini.zsh adapter to run ztst-like cases via CTest labels\n- Add docs/how-to/add-ztst-adapter.md with usage and scope\n- Does not affect existing zsh+CTest harness; opt-in via label 'ztst'
…st() helper\n- Register options_mapping, param_hash_semantics, sigcount_shim, emulate_setopt_matrix as label 'ztst'\n- Preserve existing categories and timeouts
…rts -oARG and -o ARG forms; advances argv cursor\n- Used by zpmod subcommands for cleaner parsing
… Add zpmod_emoji.h usage for zwarnnam/usage strings only\n- Use zp_take_opt_with_arg for -f and -d options\n- Minor help text reformat; consistent error icons
Copy link
Copy Markdown
Member Author

@ss-o ss-o left a comment

Choose a reason for hiding this comment

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

Update: compaudit-cache v3 parity slice & migration

Summary
Adds cache format v3 introducing refined security parity (sticky-bit + extended owner allowances) plus automatic migration from legacy v2.

Key Changes

  • Cache file renamed: compaudit_v3.zcache (header version:3).
  • Security logic: respects sticky bit; treats world/group writable dirs as insecure unless sticky; allows root, EUID, and zsh executable owner; still flags world-writable non-sticky even if owned.
  • Executable owner discovery via /proc/self/exe (best-effort, fallback root).
  • Automatic migration: if only v2 file found, triggers rebuild to v3 and removes v2.
  • Tests added: v3 header verification, migration path; all prior compaudit-cache tests updated implicitly to expect v3.
  • Docs: roadmap annotated with v2 vs v3 milestones; new Migration section.
  • JSON schema unchanged (reasons array still dir_perms / ancestor_perms / zwc_perms); refined logic only affects which dirs become insecure + reasons composition.

Compatibility & Performance

  • Single rebuild cost on first invocation post-upgrade; afterward reuse path identical.
  • On-disk entry columns unchanged from late v2 (parent_insecure + zwc_insecure preserved); only version header & filename differ.
  • Safe fallback if /proc not accessible: exe owner defaults to 0 (root).

Risk / Mitigations

  • Potential edge case: unusual filesystems without sticky semantics—logic falls back cleanly (no extra ops beyond stat).
  • v2 unlink is best-effort; failure leaves stale file harmless.

Test Status

  • Full suite: 36/36 passing (includes new v3 + migration tests).

Follow-Ups (Not included here)

  • Symlink chain explicit lstat traversal & ancestor evaluation.
  • Group nuance parity (per-user group / Debian staff handling) mirroring upstream compaudit filters.
  • Potential additional reason codes once group nuance implemented.

Let me know if you’d like a separate CHANGELOG or release note entry drafted.

ss-o and others added 9 commits September 12, 2025 22:44
…rd source study

- Fix uninitialized variable in zp_build_source_report function
- Guard zp_build_source_report behind ZPMOD_HAVE_SOURCE_STUDY to avoid undefined symbols
- Add missing zsh internals prototypes for docker builds (dummy_eprog, lineno, pwd, etc)
- Remove conflicting PrintTableStats typedef and add arrlen proto for minimal builds
- Guard real zsh headers unless ZPMOD_ANALYSIS set
- Avoid stub type conflicts and add portable stat fallback for macOS
- Include zsh headers conditionally for preload symbols (Shfunc/addhashnode)
- Enforce gateway include policy with vendor shims and guards
…hecks

- Modify .clang-tidy to disable specific checks for improved linting
- Add skip_missing_compile_command option in trunk.yaml for better CI integration
- Introduce gen-compile-commands.sh script to ensure compile_commands.json is generated
- Remove outdated gen-compile-commands.zsh script
- Enhance check_include_order.zsh to disallow direct vendor includes and enforce include order
- Add include-order enforcement as a CTest in CMakeLists.txt

Signed-off-by: Salvydas Lukosius <ss-o@users.noreply.github.com>
…ainability

- Reorganized includes in `rehash_diff.c`, `source.c`, `source_hot.c`, `utils.c`, and `source_study_stub.c` for consistency.
- Enhanced formatting and indentation across multiple files for better code clarity.
- Added comments to clarify the purpose of certain functions and sections of code.
- Improved error handling and memory management in `rehash_diff.c` and `source_hot.c`.
- Updated function signatures and added NOLINT comments to suppress specific warnings.
- Ensured consistent use of whitespace and line breaks to enhance code readability.

Signed-off-by: Salvydas Lukosius <ss-o@users.noreply.github.com>
… order checks

Signed-off-by: Salvydas Lukosius <ss-o@users.noreply.github.com>
…alidation logic

Signed-off-by: Salvydas Lukosius <ss-o@users.noreply.github.com>
On macOS SDKs, <linux/limits.h> doesn’t exist and PATH_MAX may not be
defined depending on headers. Use standard <limits.h> and provide a
portable fallback (#61 CI failure).

- Remove linux-only include from compaudit_cache.c and bundle_build.c
- Add conservative PATH_MAX fallback (4096) after includes
- No behavior change on Linux; unblocks native-macos job
Signed-off-by: Salvydas Lukosius <ss-o@users.noreply.github.com>
fix: add missing NOLINTEND comment in bundle_build.c

Signed-off-by: Salvydas Lukosius <ss-o@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci 🤖 Work that improves the continuous integration. performance 🚀 Improving performance of the project, not introducing new features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant