PASSAGE of a rivers and harbors bill used to be an important festival in Congress. Not since the early 1970s has there been one of any size. The main reason has been a dispute, first with President Carter, then with President Reagan, over the extent to which the federal government should any longer bear the cost. Now it appears that dispute may be ending. The Senate this week passed a sensible bill that, on the one hand, authorizes $11 billion in new projects but, on the other, requires beneficiaries to share the cost. The House passed similar albeit less disciplined legislation last year -- $20 billion in projects and less cost- sharing. The administration has said the House bill is unacceptable, but the matter now goes to conference. A fair compromise ought to be possible.

The Reagan administration has insisted on cost- sharing on fiscal and philosophical grounds. It likes user fees, in part for the money they save, in part on the theory that government subsidies distort investment decisions and detract from efficient use of resources. The Senate bill would require the immediate beneficiaries of flood control projects to put up a fourth to a third of the cost. Communities will think twice about projects they used to accept happily because they were "free." That at least is the theory. There will be cargo fees to help pay for work on ports and a barge fuel tax increase to support work on inland waterways.

These partial deterrents may also have useful environmental effects. That was one of the reasons the Carter administration was drawn to them. Large water projects disturb the environment almost by definition; some do serious damage. Environmentalists tend to think the fewer the better.

Some of the projects in both bills remain dubious, both on environmental grounds and because the benefits don't match the costs. Not all these will be dropped in conference; they never are. But some will also be caught up by the new cost-sharing rules, and all these projects are authorizations only. It remains for the appropriations committees to choose -- and to spread the expenditures so as not to burden the deficit.

It is tempting for all who live at a distance to write off all public works expenditures as pork. Not fair. Kept from excess, this is a necessary process in national investment; the cost-sharing principle is important. Congress seems headed down the right path.