[roll] Roll fuchsia [check-licenses] Refactor directory traversal and testing

This change addresses numerous bugs, performance bottlenecks, and
concurrency risks in the `directory` package. It also completely
overhauls the testing strategy to use fast, isolated unit tests rather
than brittle Golden JSON integration files.

* Symlink Safety: Fixed a critical traversal bug where symlinks
  pointing to directories were incorrectly treated as files. The crawler
  now explicitly resolves symlink targets to avoid infinite loops and
  misattributions.

* Cache Miss Fix: Fixed an issue where the `project.AllProjects` cache
  was being queried with absolute paths instead of relative paths,
  causing a 100% cache miss rate and forcing redundant README parsing.

* Concurrency Safety: Encapsulated the global `AllDirectories` map
  behind a `sync.RWMutex` with thread-safe `AddDirectory()` and
  `GetAllDirectories()` accessors, preventing data races during
  compliance report generation.

* Performance: Optimized `readme.go`'s `readmeFileExists` check to use
  O(1) `os.Stat` calls instead of expensive O(N log N) `os.ReadDir`
  sorting operations.

* Code Cleanup: Deleted duplicate logic blocks in `directory.go`. Moved
  the contents of `init.go` into `config.go` and deleted `init.go`.

* Testing: Purged the `testdata/` directory and `want.json` files.
  Rewrote `directory_test.go` and created `config_test.go` to use
  dynamic `t.TempDir()` scaffolding, aggressively covering symlinks,
  barriers, inheritance, and config merging.

* Documentation: Added a comprehensive `README.md` documenting the
  architecture, with a note regarding the future refactoring of
  `readme.go` logic into the `project` package.

Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1567053
Original-Revision: 10190589bc6a69bf5d568ef85ad13ddf7dd4ff63
GitOrigin-RevId: 4b43897d65c99da7827d1922a41b351f03ee3f7c
Change-Id: Ibb3c322d2ca12389e341ebf524b47066a79863ad
1 file changed
tree: 9228bd3155da7ed463a15949d260a0c3e2411b81
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cobalt
  6. flower
  7. jiri.lock
  8. MILESTONE
  9. minimal
  10. prebuilts
  11. README.md
  12. stem
  13. test_durations
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.